summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/pcipc.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-03-01 17:24:54 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2021-03-01 17:24:54 +0100
commita0404ff58245f16d2117542d2dffd1fc6199943d (patch)
tree1eea09a3c9b1426c73858e90f13c77f1bc315bbd /sys/src/9/pc/pcipc.c
parent35558431105e4c793673310bd5bfa7f8a99d89e3 (diff)
devpccard, pci: fix pccard support and handle pci expansion roms
let pci.c deal with the special cardbus controller bar0 and expansion roms. handle apic interrupt routing for devices behind a cardbus slot. do not free the pcidev on card removal, as the drivers most certanly are not prepared to handle this yet. instead, we provide a pcidevfree() function that just unlinks the device from pcilist and the parent bridge.
Diffstat (limited to 'sys/src/9/pc/pcipc.c')
-rw-r--r--sys/src/9/pc/pcipc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/9/pc/pcipc.c b/sys/src/9/pc/pcipc.c
index 3355e7b0c..f5bb530bb 100644
--- a/sys/src/9/pc/pcipc.c
+++ b/sys/src/9/pc/pcipc.c
@@ -557,6 +557,10 @@ pcireserve(void)
upaalloc(pa, p->mem[i].size, 0);
}
}
+ if(p->rom.size && (p->rom.bar & 1) != 0){
+ pa = p->rom.bar & ~0x7FFULL;
+ upaalloc(pa, p->rom.size, 0);
+ }
}
/*
@@ -688,7 +692,7 @@ pcicfginit(void)
list = &pciroot;
for(bno = 0; bno <= pcimaxbno; bno++) {
int sbno = bno;
- bno = pciscan(bno, list);
+ bno = pciscan(bno, list, nil);
while(*list)
list = &(*list)->link;