From fa89c9f21a2c9646d43d65419505ca09410f6308 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 11 Jan 2015 19:59:56 +0000 Subject: [PATCH] Tolerate checksum errors in ACPI tables (but complain about them). Apparently there are machines out there with broken BIOSen with such checksum errors in thier RSDT tables. Windows runs fine on these machines, so it probably does not check. Linux ignores checksum errors as well (and prints a warning). ok deraadt@, krw@ --- sys/dev/acpi/acpi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 4f6ce7bc428..4860aa2cdf7 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.278 2014/12/18 16:31:50 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.279 2015/01/11 19:59:56 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -1042,10 +1042,10 @@ acpi_maptable(struct acpi_softc *sc, paddr_t addr, const char *sig, if (acpi_map(addr, len, &handle)) return NULL; hdr = (struct acpi_table_header *)handle.va; - if (acpi_checksum(hdr, len)) { - acpi_unmap(&handle); - return NULL; - } + if (acpi_checksum(hdr, len)) + printf("\n%s: %.4s checksum error", + DEVNAME(sc), hdr->signature); + if ((sig && memcmp(sig, hdr->signature, 4)) || (oem && memcmp(oem, hdr->oemid, 6)) || (tbl && memcmp(tbl, hdr->oemtableid, 8))) { -- 2.20.1