1
0
Fork 0
alistair23-linux/tools
Lv Zheng 0f929fbf0d ACPICA: Tables: Add new mechanism to skip NULL entries in RSDT and XSDT.
It is reported that there are buggy BIOSes in the world: AMI uses an XSDT
compiler for early BIOSes, this compiler will generate XSDT with a NULL
entry.  The affected BIOS versions are "AMI BIOS F2-F4".

Original solution on Linux is to use an alternative heathy root table
instead of the ill one.  This commit is:
  Commit: 671cc68dc6
  Subject: ACPICA: Back port and refine validation of the XSDT root table.

This is an example of such XSDT dumped from B85-HD3 (AMI F3 BIOS):
[000h 0000   4]                    Signature : "XSDT"    [Extended System Description Table]
[004h 0004   4]                 Table Length : 00000074
[008h 0008   1]                     Revision : 01
[009h 0009   1]                     Checksum : 18
[00Ah 0010   6]                       Oem ID : "ALASKA"
[010h 0016   8]                 Oem Table ID : "A M I"
[018h 0024   4]                 Oem Revision : 01072009
[01Ch 0028   4]              Asl Compiler ID : "AMI "
[020h 0032   4]        Asl Compiler Revision : 00010013

[024h 0036   8]       ACPI Table Address   0 : 00000000BA5F8180
[02Ch 0044   8]       ACPI Table Address   1 : 00000000BA5F8290
[034h 0052   8]       ACPI Table Address   2 : 00000000BA5F8308
[03Ch 0060   8]       ACPI Table Address   3 : 00000000BA5F8848
[044h 0068   8]       ACPI Table Address   4 : 00000000BA5F9320
[04Ch 0076   8]       ACPI Table Address   5 : 00000000BA5F9360
[054h 0084   8]       ACPI Table Address   6 : 00000000BA5F9398
[05Ch 0092   8]       ACPI Table Address   7 : 00000000BA5F9708
[064h d100   8]       ACPI Table Address   8 : 00000000BA5FC9A8
[06Ch 0108   8]       ACPI Table Address   9 : 0000000000000000

But according to the bug report, the XSDT in fact is not broken. In the
above XSDT, ACPI Table Address 1-8 contains the same value as RSDT.  The
differences can only be seen on the following 2 entries:
1. The first entry points to a FADT whose Revision is 5 while the first
   entry in RSDT points to a FADT whose Revision is 2.
   The FADT dumped from the address indicated by the first entry of XSDT:
    FACP @ 0x00000000BA5F8180
      0000: 46 41 43 50 0C 01 00 00<05>4B 41 4C 41 53 4B 41  FACP.....KALASKA
      ...
   The FADT dumped from the address indicated by the first entry of RSDT:
    FACP @ 0x00000000BA5ED0F0
      0000: 46 41 43 50 84 00 00 00<02>A7 41 4C 41 53 4B 41  FACP......ALASKA
      ...
2. The last entry is a NULL terminator.
According to the test result, the Revision 5 FADT is accessible.  Thus the
original solution turns out to be a work around that is preventing the
higher revision tables to be used for such platforms (they are all x86-64
platforms, and should use XSDT and higher revision FADT).

This patch offers a new solution, where a sanity check is performed before
installing a table address from XSDT. If the entry is NULL, it is simply
discarded.

Note that, this patch doesn't remove the original solution, so for Linux
kernel, this commit is actually a no-op, but it allows acpidump to be
working on such platforms. By doing so, we allow another easy revertable
commit to enable this feature so that when that commit is reverted, the
useful sanity check will not be affected. Lv Zheng.

References: https://bugzilla.kernel.org/show_bug.cgi?id=73911
References: https://bugs.archlinux.org/task/39811
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reported-and-tested-by: Bruce Chiarelli <mano155@gmail.com>
Reported-and-tested-by: Spyros Stathopoulos <spystath@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-05-07 00:55:02 +02:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv Tools: hv: Handle the case when the target file exists correctly 2014-04-16 14:10:36 -07:00
include perf tools: Move hash.h header 2014-02-18 09:34:49 -03:00
lguest tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. 2013-07-15 11:18:32 +09:30
lib perf tools: Remove extra '/' character in events file path 2014-04-30 17:02:24 +02:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-14 22:31:55 -04:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf perf tests x86: Fix stack map lookup in dwarf unwind test 2014-04-30 17:02:31 +02:00
power ACPICA: Tables: Add new mechanism to skip NULL entries in RSDT and XSDT. 2014-05-07 00:55:02 +02:00
scripts tools lib traceevent: Add global QUIET_CC_FPIC build output 2013-12-19 16:18:10 -03:00
testing This just contains a single update by Satoru Takeuchi, which adds 2014-04-04 21:27:43 -07:00
thermal/tmon tools/thermal: Introduce tmon, a tool for thermal subsystem 2013-11-07 08:45:34 +08:00
usb usb: tools: fix a regression issue that gcc can't link to pthread 2013-12-04 15:10:54 -08:00
virtio tools/virtio: add a missing ) 2014-03-13 11:23:25 +10:30
vm tools/vm/page-types.c: page-cache sniffing feature 2014-04-07 16:35:52 -07:00
Makefile Adding makefile for tools/hv 2014-02-15 11:52:35 -08:00