From 5cf6d493abf66b546eb690719bd629e0b176e436 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Wed, 18 Aug 2004 05:56:07 +0000 Subject: [PATCH] When one entry in the RSDT is corrupted, just skip it instead of bailing out. This gets us the info we need on systems which have proprietary tables that don't match the standard. For instance, an AMI system has a table of type "OEMB" with an invalid checksum. Tested by: Maxim Maximov MFC after: 1 day --- usr.sbin/acpi/acpidump/acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index e22aad410656..af8ea27a97d3 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -670,8 +670,11 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp) } sdp = (struct ACPIsdt *)acpi_map_sdt(addr); - if (acpi_checksum(sdp, sdp->len)) - errx(1, "RSDT entry %d is corrupt", i); + if (acpi_checksum(sdp, sdp->len)) { + warnx("RSDT entry %d (sig %.4s) is corrupt", i, + sdp->signature); + continue; + } if (!memcmp(sdp->signature, "FACP", 4)) acpi_handle_fadt(sdp); else if (!memcmp(sdp->signature, "APIC", 4))