From 5a3c5ce9aa59b31e6288be7218672b4f373a76db Mon Sep 17 00:00:00 2001 From: njl Date: Sun, 14 Sep 2003 00:37:52 +0000 Subject: 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. --- usr.sbin/acpi/acpidump/acpi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.sbin/acpi') 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); -- cgit v1.1