summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi/acpidump
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-05-28 07:25:23 +0000
committernjl <njl@FreeBSD.org>2004-05-28 07:25:23 +0000
commit570d897affb333ce6fa78195f223bf5b00f7f36d (patch)
treee064b6c10e7a7f4e2ed6216de3c87cfc5f684c32 /usr.sbin/acpi/acpidump
parent0659d93cbd1a1dc89edfc811c14fd48cf1b6da60 (diff)
downloadFreeBSD-src-570d897affb333ce6fa78195f223bf5b00f7f36d.zip
FreeBSD-src-570d897affb333ce6fa78195f223bf5b00f7f36d.tar.gz
Unify the start/size parameters for the RSDP search area. Don't bother
trying to exclude the top end of the range since it should hurt to overlap by 4 bytes in the off-chance the RSDP signature appears incorrectly at the very top of our search space.
Diffstat (limited to 'usr.sbin/acpi/acpidump')
-rw-r--r--usr.sbin/acpi/acpidump/acpi_user.c4
-rw-r--r--usr.sbin/acpi/acpidump/acpidump.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi_user.c b/usr.sbin/acpi/acpidump/acpi_user.c
index 2166e88..550420c 100644
--- a/usr.sbin/acpi/acpidump/acpi_user.c
+++ b/usr.sbin/acpi/acpidump/acpi_user.c
@@ -142,7 +142,9 @@ acpi_scan_rsd_ptr(void)
for (; addr < end; addr += 16)
if ((rsdp = acpi_get_rsdp(addr)) != NULL)
return (rsdp);
- for (addr = RSDP_HI_START; addr < RSDP_HI_END; addr += 16)
+ addr = RSDP_HI_START;
+ end = addr + RSDP_HI_SIZE;
+ for (; addr < end; addr += 16)
if ((rsdp = acpi_get_rsdp(addr)) != NULL)
return (rsdp);
#endif /* __i386__ */
diff --git a/usr.sbin/acpi/acpidump/acpidump.h b/usr.sbin/acpi/acpidump/acpidump.h
index 6cd7a8e..1ebc56d 100644
--- a/usr.sbin/acpi/acpidump/acpidump.h
+++ b/usr.sbin/acpi/acpidump/acpidump.h
@@ -296,13 +296,13 @@ struct ECDTbody {
/*
* Addresses to scan on ia32 for the RSD PTR. According to section 5.2.2
* of the ACPI spec, we only consider two regions for the base address:
- * 1. EBDA (0x0 - 0x3FF)
+ * 1. EBDA (1 KB area addressed to by 16 bit pointer at 0x40E)
* 2. High memory (0xE0000 - 0xFFFFF)
*/
#define RSDP_EBDA_PTR 0x40E
-#define RSDP_EBDA_SIZE (1024 - sizeof(struct ACPIrsdp))
+#define RSDP_EBDA_SIZE 0x400
#define RSDP_HI_START 0xE0000
-#define RSDP_HI_END (0x100000 - sizeof(struct ACPIrsdp))
+#define RSDP_HI_SIZE 0x20000
/* Find and map the RSD PTR structure and return it for parsing */
struct ACPIsdt *sdt_load_devmem(void);
OpenPOWER on IntegriCloud