diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-12-28 22:27:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-12-28 22:27:11 +0000 |
commit | f15425484be04e34b3302255b5412a05b3247df4 (patch) | |
tree | 713f42e2384bd7b44134c212adab6fa6c50518fe | |
parent | 458e0a5bff35351ad58928b6809093b53753d747 (diff) |
No longer look for RSDP in memory marked as "ACPI Reclaim" in the BIOS memory
map. The standard doesn't tell us to look there, Linux and NetBSD don't look
there either. It seems that some BIOSes use this memory as a scratch area
to build the final ACPI tables which means we can accidentally find what
seems like a valid RSDP there. Fixes PR 5847.
ok krw@, marco@
-rw-r--r-- | sys/arch/amd64/amd64/acpi_machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_machdep.c | 26 |
2 files changed, 6 insertions, 36 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index cbb2cc83437..1a51f04b79f 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/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/28 22:27:10 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -105,19 +105,9 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args struct acpi_mem_map handle; u_int8_t *ptr; paddr_t ebda; - bios_memmap_t *im; /* - * First look for ACPI entries in the BIOS memory map - */ - for (im = bios_memmap; im->type != BIOS_MAP_END; im++) - if (im->type == BIOS_MAP_ACPI) { - if ((ptr = acpi_scan(&handle, im->addr, im->size))) - goto havebase; - } - - /* - * Next try to find ACPI table entries in the EBDA + * First try to find ACPI table entries in the EBDA */ if (acpi_map(0, NBPG, &handle)) printf("acpi: failed to map BIOS data area\n"); @@ -133,7 +123,7 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args } /* - * Finally try to find the ACPI table entries in the + * Next try to find the ACPI table entries in the * BIOS memory */ if ((ptr = acpi_scan(&handle, ACPI_BIOS_RSDP_WINDOW_BASE, diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index 65358152934..e4244315dd8 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.14 2008/12/26 17:09:52 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.15 2008/12/28 22:27:10 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -32,13 +32,8 @@ #include <dev/acpi/acpireg.h> #include <dev/acpi/acpivar.h> -#include "bios.h" #include "apm.h" -#if NBIOS > 0 -#include <machine/biosvar.h> -#endif - #if NAPM > 0 int haveacpibutusingapm; #endif @@ -119,23 +114,8 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args extern int apm_attached; #endif -#if NBIOS > 0 - { - bios_memmap_t *im; - - /* - * First look for ACPI entries in the BIOS memory map - */ - for (im = bios_memmap; im->type != BIOS_MAP_END; im++) - if (im->type == BIOS_MAP_ACPI) { - if ((ptr = acpi_scan(&handle, im->addr, im->size))) - goto havebase; - } - } -#endif - /* - * Next try to find ACPI table entries in the EBDA + * First try to find ACPI table entries in the EBDA */ if (acpi_map(0, NBPG, &handle)) printf("acpi: failed to map BIOS data area\n"); @@ -151,7 +131,7 @@ acpi_probe(struct device *parent, struct cfdata *match, struct bios_attach_args } /* - * Finally try to find the ACPI table entries in the + * Next try to find the ACPI table entries in the * BIOS memory */ if ((ptr = acpi_scan(&handle, ACPI_BIOS_RSDP_WINDOW_BASE, |