diff options
author | Nate Lawson <njl@FreeBSD.org> | 2004-05-25 05:52:48 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2004-05-25 05:52:48 +0000 |
commit | 2c0d74e8e8303a902498ed62762d4fb008f0c008 (patch) | |
tree | 82341581c4ee6b42fab868b4bc7a17ff765736ef /sys/boot | |
parent | 3ffbc0cd8e31bf6acb7028d76eee81dffb6575fc (diff) | |
download | src-2c0d74e8e8303a902498ed62762d4fb008f0c008.tar.gz src-2c0d74e8e8303a902498ed62762d4fb008f0c008.zip |
Use the correct location of the EBDA for searching for the RSDP.
The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.
Pointed out by: robert.moore AT intel.com
Notes
Notes:
svn path=/head/; revision=129702
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/libi386/biosacpi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/boot/i386/libi386/biosacpi.c b/sys/boot/i386/libi386/biosacpi.c index c8ee1c7c46d1..f9b2d774b054 100644 --- a/sys/boot/i386/libi386/biosacpi.c +++ b/sys/boot/i386/libi386/biosacpi.c @@ -84,22 +84,24 @@ biosacpi_detect(void) } /* - * Find the RSDP in low memory. + * Find the RSDP in low memory. See section 5.2.2 of the ACPI spec. */ static RSDP_DESCRIPTOR * biosacpi_find_rsdp(void) { RSDP_DESCRIPTOR *rsdp; + uint16_t *addr; - /* search the EBDA */ - if ((rsdp = biosacpi_search_rsdp((char *)0, 0x400)) != NULL) - return(rsdp); + /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. */ + addr = (uint16_t *)0x40E; + if ((rsdp = biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) != NULL) + return (rsdp); - /* search the BIOS space */ + /* Check the upper memory BIOS space, 0xe0000 - 0xfffff. */ if ((rsdp = biosacpi_search_rsdp((char *)0xe0000, 0x20000)) != NULL) - return(rsdp); + return (rsdp); - return(NULL); + return (NULL); } static RSDP_DESCRIPTOR * |