diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-06 23:39:02 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-06 23:39:02 +0100 |
commit | 0d5c57a1325410fd6f1362facc45802afb953be3 (patch) | |
tree | 5aed3153af9d4b96edfd62447922cb368a7ad404 /sys/src | |
parent | 5ed845f7e9092295dd5dea3ef0740da35737d872 (diff) |
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.
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/pc/vgas3.c | 1 | ||||
-rw-r--r-- | sys/src/9/pc/vgavesa.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/9/pc/vgas3.c b/sys/src/9/pc/vgas3.c index bbf034560..ed203af65 100644 --- a/sys/src/9/pc/vgas3.c +++ b/sys/src/9/pc/vgas3.c @@ -120,6 +120,7 @@ s3linear(VGAscr* scr, int, int) * 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; diff --git a/sys/src/9/pc/vgavesa.c b/sys/src/9/pc/vgavesa.c index ea1f26ad3..fbe051f5f 100644 --- a/sys/src/9/pc/vgavesa.c +++ b/sys/src/9/pc/vgavesa.c @@ -136,6 +136,8 @@ vesalinear(VGAscr *scr, int, int) 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){ |