shithub: riscv

Download patch

ref: 1b8d87555a0905e5a83000066518c85a2a85b204
parent: 3c36cadefd5675ad290a607c3be0450eccde1f54
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 28 20:49:07 EDT 2020

pc, pc64: ignore the 64-bit bar flag when reserving membar

a bar with bit 3 set means the bar is the low half of
a 64-bit wide bar.

--- a/sys/src/9/pc/pci.c
+++ b/sys/src/9/pc/pci.c
@@ -1083,7 +1083,7 @@
 	 */
 	for(p=pciroot; p; p=p->list)
 		for(i=0; i<nelem(p->mem); i++)
-			if(p->mem[i].bar && (p->mem[i].bar&1) == 0)
+			if((p->mem[i].bar&~4) != 0 && (p->mem[i].bar&1) == 0)
 				upareserve(p->mem[i].bar&~0x0F, p->mem[i].size);
 }