aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/bus/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/bus/pci.c')
-rw-r--r--src/drivers/bus/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c
index 1b7350c8b..5891e42ff 100644
--- a/src/drivers/bus/pci.c
+++ b/src/drivers/bus/pci.c
@@ -121,6 +121,11 @@ static void pci_read_bases ( struct pci_device *pci ) {
unsigned long bar;
int reg;
+ /* Clear any existing base addresses */
+ pci->ioaddr = 0;
+ pci->membase = 0;
+
+ /* Get first memory and I/O BAR addresses */
for ( reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4 ) {
bar = pci_bar ( pci, reg );
if ( bar & PCI_BASE_ADDRESS_SPACE_IO ) {