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.
This commit is contained in:
cinap_lenrek 2020-03-29 00:49:07 +01:00
parent 3c36cadefd
commit 1b8d87555a

View file

@ -1083,7 +1083,7 @@ pcireservemem(void)
*/
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);
}