Module Name:    src
Committed By:   martin
Date:           Tue Oct 15 19:30:50 UTC 2019

Modified Files:
        src/sys/dev/acpi [netbsd-9]: acpi_mcfg.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #333):

        sys/dev/acpi/acpi_mcfg.c: revision 1.17

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.16.4.1 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.16.4.1
--- src/sys/dev/acpi/acpi_mcfg.c:1.16	Thu Dec 20 19:16:17 2018
+++ src/sys/dev/acpi/acpi_mcfg.c	Tue Oct 15 19:30:50 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.16.4.1 2019/10/15 19:30:50 martin 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.16.4.1 2019/10/15 19:30:50 martin 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,

Reply via email to