From 3715322bb326bd3a4693382236af82a0331f999c Mon Sep 17 00:00:00 2001 From: soren Date: Wed, 24 Oct 2001 15:53:04 +0000 Subject: [PATCH] Determine PCI config mode before the ACPI probe; some methods need to access PCI configuration space early. --- sys/arch/i386/i386/mainbus.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c index e4a687a9bc31..902f4fb26f77 100644 --- a/sys/arch/i386/i386/mainbus.c +++ b/sys/arch/i386/i386/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.33 2001/09/28 03:56:21 thorpej Exp $ */ +/* $NetBSD: mainbus.c,v 1.34 2001/10/24 15:53:04 soren Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -140,6 +140,11 @@ mainbus_attach(parent, self, aux) printf("\n"); + /* + * ACPI needs to be able to access PCI configuration space. + */ + pci_mode = pci_mode_detect(); + #if NACPI > 0 if (acpi_probe()) { mba.mba_acpi.aa_busname = "acpi"; @@ -179,7 +184,7 @@ mainbus_attach(parent, self, aux) * XXX that's not currently possible. */ #if NPCI > 0 - if (pci_mode_detect() != 0) { + if (pci_mode != 0) { mba.mba_pba.pba_busname = "pci"; mba.mba_pba.pba_iot = I386_BUS_SPACE_IO; mba.mba_pba.pba_memt = I386_BUS_SPACE_MEM;