diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 2008-01-15 22:22:27 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 2008-01-15 22:22:27 +0000 |
commit | 35a801ffe94f0838a493bd0b9a9298987cbf3b91 (patch) | |
tree | ed4a44490d04a8778bc7de6934b1c991cd991928 /sys/arch | |
parent | 301314a981bd46fd1503bb61af86bcf97082f152 (diff) |
Work around an intel BIOS bug where it locates the ACPI tables in
a region of memory marked free for use by the OS.
Ok beck@, kettenis@, and --ok && ++!!ok tedu@.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 0bda082ae28..4554b068d9f 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.415 2008/01/13 14:03:21 mikeb Exp $ */ +/* $OpenBSD: machdep.c,v 1.416 2008/01/15 22:22:26 weingart Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2997,13 +2997,28 @@ init386(paddr_t first_avail) if (a < 8 * NBPG) a = 8 * NBPG; - /* skip shorter than page regions */ - if (a >= e || (e - a) < NBPG) { + /* skip regions which are zero or negative in size */ + if (a >= e) { #ifdef DEBUG printf("-S"); #endif continue; } + + /* + * XXX - This is a hack to work around BIOS bugs and + * a bug in the msgbuf allocation. We skip regions + * smaller than the message buffer or 16-bit segment + * limit in size. + */ + if ((e - a) < max((MSGBUFSIZE / NBPG), (64 * 1024))) { +#ifdef DEBUG + printf("-X"); +#endif + continue; + } + + /* skip legacy IO region */ if ((a > IOM_BEGIN && a < IOM_END) || (e > IOM_BEGIN && e < IOM_END)) { #ifdef DEBUG |