diff options
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 21 | ||||
-rw-r--r-- | sys/arch/i386/i386/mpbios.c | 15 |
2 files changed, 26 insertions, 10 deletions
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index b2159967be9..65358152934 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.13 2008/06/01 17:59:55 marco Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.14 2008/12/26 17:09:52 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -39,13 +39,13 @@ #include <machine/biosvar.h> #endif +#if NAPM > 0 +int haveacpibutusingapm; +#endif + #define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000 #define ACPI_BIOS_RSDP_WINDOW_SIZE 0x20000 -#if NAPM > 0 && NBIOS > 0 -extern bios_apminfo_t *apm; -#endif - u_int8_t *acpi_scan(struct acpi_mem_map *, paddr_t, size_t); int @@ -117,10 +117,8 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args paddr_t ebda; #if NAPM > 0 extern int apm_attached; - - if (apm_attached) - return (0); #endif + #if NBIOS > 0 { bios_memmap_t *im; @@ -165,7 +163,12 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args havebase: ba->ba_acpipbase = ptr - handle.va + handle.pa; acpi_unmap(&handle); - +#if NAPM > 0 + if (apm_attached) { + haveacpibutusingapm = 1; + return (0); + } +#endif return (1); } diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c index f97a6dac3f2..003feeccf40 100644 --- a/sys/arch/i386/i386/mpbios.c +++ b/sys/arch/i386/i386/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.27 2008/12/22 18:01:46 kettenis Exp $ */ +/* $OpenBSD: mpbios.c,v 1.28 2008/12/26 17:09:52 deraadt Exp $ */ /* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */ /*- @@ -123,6 +123,11 @@ #include "pci.h" +#include "apm.h" +#include "acpi.h" +#if NAPM > 0 && NACPI > 0 +extern int haveacpibutusingapm; +#endif static struct mpbios_ioapic default_ioapic = { 2, 0, 1, IOAPICENTRY_FLAG_EN, (caddr_t)IOAPIC_BASE_DEFAULT @@ -264,6 +269,14 @@ mpbios_probe(struct device *self) struct mp_map t; /* + * If we have acpi but chose to use apm, then we really should + * not go use mpbios. Systems with usable acpi typically have + * unuseable mpbios + */ + if (haveacpibutusingapm) + return (0); + + /* * Skip probe if someone else (e.g. acpi) already provided the * necessary details. */ |