diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c --- a/sys/amd64/pci/pci_cfgreg.c +++ b/sys/amd64/pci/pci_cfgreg.c @@ -296,7 +296,7 @@ region = &mcfg_regions[mcfg_numregions]; /* XXX: We should make sure this really fits into the direct map. */ - region->base = pmap_mapdev_pciecfg(base, (maxbus + 1 - minbus) << 20); + region->base = pmap_mapdev_pciecfg(base + (minbus << 20), (maxbus + 1 - minbus) << 20); region->domain = domain; region->minbus = minbus; region->maxbus = maxbus; diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c --- a/sys/i386/pci/pci_cfgreg.c +++ b/sys/i386/pci/pci_cfgreg.c @@ -574,7 +574,7 @@ sizeof(*mcfg_regions) * (mcfg_numregions + 1), M_DEVBUF, M_WAITOK); region = &mcfg_regions[mcfg_numregions]; - region->base = base; + region->base = base + (minbus << 20); region->domain = domain; region->minbus = minbus; region->maxbus = maxbus;