ref: 87d9c267bb518357e8141c81ed4a81ab7f52b49e
parent: 3ed482109a8759f0129f7b83bb44ecb9a3062d45
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Jan 6 18:39:02 EST 2013
vga: dont confuse io bar with mem bar in vgas3 and vgavesa harmless bug. just make sure we loop over the memory bars only and skip the io bars.
--- a/sys/src/9/pc/vgas3.c
+++ b/sys/src/9/pc/vgas3.c
@@ -120,6 +120,7 @@
* much space they would need in the first design.
*/
for(j=0; j<nelem(p->mem); j++){+ if((p->mem[j].bar&1) == 0)
if((p->mem[j].bar&~0x0F) != scr->paddr)
if(p->mem[j].size==512*1024 || p->mem[j].size==16*1024*1024){mmiobase = p->mem[j].bar & ~0x0F;
--- a/sys/src/9/pc/vgavesa.c
+++ b/sys/src/9/pc/vgavesa.c
@@ -136,6 +136,8 @@
for(i=0; i<nelem(pci->mem); i++){ulong a, e;
+ if(pci->mem[i].bar&1) /* not memory */
+ continue;
a = pci->mem[i].bar & ~0xF;
e = a + pci->mem[i].size;
if(paddr >= a && (paddr+size) <= e){--
⑨