summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-09-14 00:37:52 +0000
committernjl <njl@FreeBSD.org>2003-09-14 00:37:52 +0000
commit5a3c5ce9aa59b31e6288be7218672b4f373a76db (patch)
treec391924191d32a2b2bf636fcf15ad7ef50cb4054 /usr.sbin/acpi
parent38dcb116a3ab8ea054473093c1cd0debf016a8ec (diff)
downloadFreeBSD-src-5a3c5ce9aa59b31e6288be7218672b4f373a76db.zip
FreeBSD-src-5a3c5ce9aa59b31e6288be7218672b4f373a76db.tar.gz
For dumping the DSDT (-o option), be sure to use the X_DSDT address if
appropriate. This should be the last change to make ia64 work.
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index 91aec03..9e69166 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -792,7 +792,13 @@ dsdt_from_fadt(struct FADTbody *fadt)
{
struct ACPIsdt *sdt;
- sdt = (struct ACPIsdt *)acpi_map_sdt(fadt->dsdt_ptr);
+ /* Use the DSDT address if it is valid and version 2, else X_DSDT */
+ if (addr_size == 4 ||
+ (addr_size == 8 && fadt->dsdt_ptr != 0 &&
+ (fadt->x_dsdt_ptr & 0xffffffff) != fadt->dsdt_ptr))
+ sdt = (struct ACPIsdt *)acpi_map_sdt(fadt->dsdt_ptr);
+ else
+ sdt = (struct ACPIsdt *)acpi_map_sdt(fadt->x_dsdt_ptr);
if (acpi_checksum(sdt, sdt->len))
errx(1, "DSDT is corrupt\n");
return (sdt);
OpenPOWER on IntegriCloud