Module Name: src Committed By: jmcneill Date: Mon Oct 14 00:15:13 UTC 2019
Modified Files: src/sys/dev/acpi: acpi_mcfg.c Log Message: The MCFG base address field is the physical address of the base of mmio space relative to bus 0, not the start bus number specified in the table entry. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/acpi/acpi_mcfg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/acpi_mcfg.c diff -u src/sys/dev/acpi/acpi_mcfg.c:1.16 src/sys/dev/acpi/acpi_mcfg.c:1.17 --- src/sys/dev/acpi/acpi_mcfg.c:1.16 Thu Dec 20 19:16:17 2018 +++ src/sys/dev/acpi/acpi_mcfg.c Mon Oct 14 00:15:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_mcfg.c,v 1.16 2018/12/20 19:16:17 jmcneill Exp $ */ +/* $NetBSD: acpi_mcfg.c,v 1.17 2019/10/14 00:15:13 jmcneill Exp $ */ /*- * Copyright (C) 2015 NONAKA Kimihiro <non...@netbsd.org> @@ -28,7 +28,7 @@ #include "opt_pci.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.16 2018/12/20 19:16:17 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.17 2019/10/14 00:15:13 jmcneill Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -575,7 +575,7 @@ acpimcfg_map_bus(device_t self, pci_chip return 0; mb = &seg->ms_bus[boff]; - baddr = seg->ms_address + (boff * ACPIMCFG_SIZE_PER_BUS); + baddr = seg->ms_address + (bus * ACPIMCFG_SIZE_PER_BUS); /* Map extended configration space of all dev/func. */ error = bus_space_map(seg->ms_bst, baddr, ACPIMCFG_SIZE_PER_BUS, 0, @@ -832,7 +832,7 @@ acpimcfg_configure_bus(device_t self, pc for (b = seg->ms_bus_start; b <= seg->ms_bus_end; b++) { boff = b - seg->ms_bus_start; mb = &seg->ms_bus[boff]; - baddr = seg->ms_address + (boff * ACPIMCFG_SIZE_PER_BUS); + baddr = seg->ms_address + (b * ACPIMCFG_SIZE_PER_BUS); /* Map extended configration space of all dev/func. */ error = bus_space_map(seg->ms_bst, baddr, ACPIMCFG_SIZE_PER_BUS, 0,