diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-01-11 19:59:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-01-11 19:59:57 +0000 |
commit | 7e972fdf553804f837b13ccec99b2ad5e2ee676a (patch) | |
tree | e4d426490ac5cba5f04127021a2b67badd22d772 | |
parent | d37df5ec70f196bf3422c89074f8fa3de1707489 (diff) |
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@
-rw-r--r-- | sys/dev/acpi/acpi.c | 10 |
1 files 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 <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -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))) { |