diff -Nru fwts-14.03.00/data/klog.json fwts-14.03.01/data/klog.json --- fwts-14.03.00/data/klog.json 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/data/klog.json 2014-03-27 02:14:17.000000000 +0000 @@ -4343,7 +4343,7 @@ }, { "compare_mode": "string", - "log_level": "LOG_LEVEL_HIGH", + "log_level": "LOG_LEVEL_LOW", "pattern": "No _BQC method", "advice": "_BQC (Brightness Query Current level) seems to be missing. This method returns the current brightness level of a built-in display output device.", "label": "KlogAcpiMissingBqc" diff -Nru fwts-14.03.00/debian/changelog fwts-14.03.01/debian/changelog --- fwts-14.03.00/debian/changelog 2014-03-24 10:21:24.000000000 +0000 +++ fwts-14.03.01/debian/changelog 2014-03-27 03:37:36.000000000 +0000 @@ -1,8 +1,39 @@ -fwts (14.03.00-0ubuntu2) trusty; urgency=low +fwts (14.03.01-0ubuntu2) trusty; urgency=low - * skip fwts-test on arm64 + [Alex Hung] + * klog: ACPI does not specify _BQC as a mandatory method + * s3: add a "s3-hybrid" option to enable hybrid sleep for s3 (LP: #1295146) + * fwts-test: klog: updates for _BQC changes in + 76c3ffd814cc882564f680b16f2c2d314ae58b07 + * fwts-test: arg-help-0001: updates tests for new --s3-hybrid option + * fwts-test: arg-help-0001: fix test-0002.sh incorrectly uses + arg-help-0001.log + * doc: add --s3-hybrid man page entry - -- Keng-Yu Lin Mon, 24 Mar 2014 17:02:29 +0800 + [Colin Ian King] + * acpi: wmi: add some newer UUIDs that are supported by linux (LP: #1292515) + * fwts_hwinfo: don't compare network addresses (LP: #1293297) + * acpi: acpidump: fix dump offsets in various table dumps (LP: #1293613) + * fwts-test: re-sync with fwts fix to acpidump + * lib: fwts_alloc: fix low 32 bit memory allocator (LP: #1295849) + * fwts-test: arg-help-0001: don't check the version field + * fwts-test: wmi-0001: update test to sync with WMI changes in fwts + * fwts-test: arg-log-format-0001: fix aarch64 failures + * acpi: method: add more advice for failed _PTS, _TTS and _WAK (LP: #1296737) + * lib: fwts_acpi_object_eval: report better advice on exec failure + (LP: #1296710) + * acpi: method: fix _ACx test (LP: #1297323) + * fwts-test: keep method-0001 test in sync with changes in fwts method + * acpica: update to version 20140325 (LP: #1297531) + * fwts-test: update ACPICA related tests due to ACPICA updates + + [Keng-Yu Lin] + * debian: skip fwts-test on arm64 + + [Matt Fleming] + * lib: fwts_log: Add missing log field flags + + -- Ivan Hu Thu, 27 Mar 2014 10:09:59 +0800 fwts (14.03.00-0ubuntu1) trusty; urgency=low diff -Nru fwts-14.03.00/doc/fwts.1 fwts-14.03.01/doc/fwts.1 --- fwts-14.03.00/doc/fwts.1 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/doc/fwts.1 2014-03-27 02:14:17.000000000 +0000 @@ -208,6 +208,9 @@ before a device configuration check is run. The default is 15 seconds. If this option is used the device checking is assumed so one does not also need to use the \-\-s3\-device\-check flag. .TP +.B \-\-s3\-hybrid +Enables fwts to run Hybrid Sleep. +.TP .B \-\-s3\-min\-delay=N minimum time between S3 iterations. .TP diff -Nru fwts-14.03.00/fwts-test/acpidump-0001/acpidump-0001.log fwts-14.03.01/fwts-test/acpidump-0001/acpidump-0001.log --- fwts-14.03.00/fwts-test/acpidump-0001/acpidump-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/acpidump-0001/acpidump-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -698,8 +698,8 @@ acpidump [0x018 0024 4] OEM Revision: 0x06040000 acpidump [0x01c 0028 4] Creator ID: LOHR acpidump [0x020 0032 4] Creator Revision: 0x0000005a -acpidump [0x056 0086 2] Reserved: 0x0000 -acpidump [0x058 0088 4] Log Zone Length: 0x00010000 -acpidump [0x05c 0092 8] Log Zone Address: 0x0000000000000000 +acpidump [0x024 0036 2] Reserved: 0x0000 +acpidump [0x026 0038 4] Log Zone Length: 0x00010000 +acpidump [0x02a 0042 8] Log Zone Address: 0x0000000000000000 acpidump acpidump diff -Nru fwts-14.03.00/fwts-test/arg-help-0001/arg-help-0001.log fwts-14.03.01/fwts-test/arg-help-0001/arg-help-0001.log --- fwts-14.03.00/fwts-test/arg-help-0001/arg-help-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-help-0001/arg-help-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -108,6 +108,10 @@ suspend. Default is 15 seconds, e.g. --s3-device-check-delay=20 +--s3-hybrid Run S3 with hybrid + sleep, i.e. saving + system states as S4 + does. --s3-max-delay Maximum time between S3 iterations, e.g. --s3-max-delay=20 diff -Nru fwts-14.03.00/fwts-test/arg-help-0001/arg-help-0002.log fwts-14.03.01/fwts-test/arg-help-0001/arg-help-0002.log --- fwts-14.03.00/fwts-test/arg-help-0001/arg-help-0002.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-help-0001/arg-help-0002.log 2014-03-27 02:14:17.000000000 +0000 @@ -108,6 +108,10 @@ suspend. Default is 15 seconds, e.g. --s3-device-check-delay=20 +--s3-hybrid Run S3 with hybrid + sleep, i.e. saving + system states as S4 + does. --s3-max-delay Maximum time between S3 iterations, e.g. --s3-max-delay=20 diff -Nru fwts-14.03.00/fwts-test/arg-help-0001/test-0001.sh fwts-14.03.01/fwts-test/arg-help-0001/test-0001.sh --- fwts-14.03.00/fwts-test/arg-help-0001/test-0001.sh 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-help-0001/test-0001.sh 2014-03-27 02:14:17.000000000 +0000 @@ -23,8 +23,9 @@ echo SKIP: $TEST, $NAME exit 77 fi -$FWTS -h | grep -v "Show version" | grep -v "Usage" > $TMPLOG -diff $TMPLOG $FWTSTESTDIR/arg-help-0001/arg-help-0001.log >> $FAILURE_LOG +$FWTS -h | grep -v "Show version" | grep -v "Usage" | sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG +sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ < $FWTSTESTDIR/arg-help-0001/arg-help-0001.log > $TMP/help.log.$$.orig +diff $TMPLOG $TMP/help.log.$$.orig >> $FAILURE_LOG ret=$? if [ $ret -eq 0 ]; then echo PASSED: $TEST, $NAME diff -Nru fwts-14.03.00/fwts-test/arg-help-0001/test-0002.sh fwts-14.03.01/fwts-test/arg-help-0001/test-0002.sh --- fwts-14.03.00/fwts-test/arg-help-0001/test-0002.sh 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-help-0001/test-0002.sh 2014-03-27 02:14:17.000000000 +0000 @@ -24,15 +24,16 @@ exit 77 fi -$FWTS --help | grep -v "Show version" | grep -v "Usage" > $TMPLOG -diff $TMPLOG $FWTSTESTDIR/arg-help-0001/arg-help-0002.log >> $FAILURE_LOG +$FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG +sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ < $FWTSTESTDIR/arg-help-0001/arg-help-0002.log > $TMP/help.log.$$.orig +diff $TMPLOG $TMP/help.log.$$.orig >> $FAILURE_LOG ret=$? if [ $ret -eq 0 ]; then echo PASSED: $TEST, $NAME else echo FAILED: $TEST, $NAME fi -if [ $cols -ne 0]; then +if [ $cols -ne 0 ]; then stty cols $cols 2> /dev/null fi tset 2> /dev/null diff -Nru fwts-14.03.00/fwts-test/arg-log-format-0001/test-0003.sh fwts-14.03.01/fwts-test/arg-log-format-0001/test-0003.sh --- fwts-14.03.00/fwts-test/arg-log-format-0001/test-0003.sh 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-log-format-0001/test-0003.sh 2014-03-27 02:14:17.000000000 +0000 @@ -3,16 +3,19 @@ TEST="Test --log-format, %line field" NAME=test-0003.sh TMPLOG=$TMP/klog.log.$$ +TMPLOG_ORIG=$TMP/klog-0003.log.$$ TODAY=`date +%d/%m/%y` -$FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog.txt --log-format="%owner %line: " klog - | grep "^klog" | sed sx12\/10\/11x${TODAY}x > $TMPLOG -diff $TMPLOG $FWTSTESTDIR/arg-log-format-0001/klog-0003.log >> $FAILURE_LOG +$FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog.txt --log-format="%owner %line: " klog - | grep "^klog" | sed sx12\/10\/11x${TODAY}x | sed "sx[0-9][0-9][0-9][0-9][0-9]:xXXXXX:x" > $TMPLOG +sed "sx[0-9][0-9][0-9][0-9][0-9]:xXXXXX:x" < $FWTSTESTDIR/arg-log-format-0001/klog-0003.log > $TMPLOG_ORIG +diff $TMPLOG $TMPLOG_ORIG >> $FAILURE_LOG ret=$? if [ $ret -eq 0 ]; then echo PASSED: $TEST, $NAME else echo FAILED: $TEST, $NAME + cat $FAILURE_LOG fi -rm $TMPLOG +rm $TMPLOG $TMPLOG_ORIG exit $ret diff -Nru fwts-14.03.00/fwts-test/arg-table-path-0001/acpidump-0001.log fwts-14.03.01/fwts-test/arg-table-path-0001/acpidump-0001.log --- fwts-14.03.00/fwts-test/arg-table-path-0001/acpidump-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/arg-table-path-0001/acpidump-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -112,6 +112,7 @@ acpidump [0x021 0033 3] Reserved: 0x00 [1] acpidump [0x021 0033 3] Reserved: 0x00 [2] acpidump [0x024 0036 1] CMOS offset: 0x36 +acpidump [0x024 0036 2] Reserved: 0x0000 acpidump [0x024 0036 4] Entry 00 APIC: 0xbff00000 acpidump [0x024 0036 4] Event Timer ID: 0x8086a201 acpidump [0x024 0036 4] FACS Address: 0xbf6e2fc0 @@ -120,6 +121,7 @@ acpidump [0x024 0036 4] Type: 0x00000000 acpidump [0x024 0036 8] Entry 00 APIC: 0x00000000bff00000 acpidump [0x024 0036 8] Reserved: 0x0000000000000000 +acpidump [0x026 0038 4] Log Zone Length: 0x00010000 acpidump [0x028 0040 12] Base Address: (Generic Address Structure) acpidump [0x028 0040 1] addr_space_id: 0x00 (System Memory) acpidump [0x028 0040 4] DSDT Address: 0xbf6d9b6a @@ -128,6 +130,7 @@ acpidump [0x028 0040 4] Length: 0x0000009c acpidump [0x029 0041 1] reg_bit_width: 0x00 acpidump [0x02a 0042 1] reg_bit_offset: 0x00 +acpidump [0x02a 0042 8] Log Zone Address: 0x0000000000000000 acpidump [0x02b 0043 1] access_width: 0x00 (Undefined (legacy reasons)) acpidump [0x02c 0044 1] Key Type: 0x06 acpidump [0x02c 0044 1] Model: 0x00 @@ -227,13 +230,11 @@ acpidump [0x055 0085 1] Length: 0x0a acpidump [0x055 0085 1] Source: 0x09 acpidump [0x056 0086 1] Bus: 0x00 -acpidump [0x056 0086 2] Reserved: 0x0000 acpidump [0x056 0086 4] Gbl Sys Int: 0x00000009 acpidump [0x057 0087 1] Source: 0x00 acpidump [0x058 0088 1] PM1 Event Block Length: 0x04 acpidump [0x058 0088 4] Entry 13 SSDT: 0xbff06aad acpidump [0x058 0088 4] Gbl Sys Int: 0x00000002 -acpidump [0x058 0088 4] Log Zone Length: 0x00010000 acpidump [0x059 0089 1] PM1 Control Block Length: 0x02 acpidump [0x05a 0090 1] PM2 Control Block Length: 0x01 acpidump [0x05a 0090 2] Flags: 0x000d @@ -243,7 +244,6 @@ acpidump [0x05c 0092 2] Flags: 0x0005 acpidump [0x05c 0092 4] Entry 14 SSDT: 0xbff06b63 acpidump [0x05c 0092 8] Entry 07 MCFG: 0x00000000bff062c8 -acpidump [0x05c 0092 8] Log Zone Address: 0x0000000000000000 acpidump [0x05d 0093 1] GPE1 Block Length: 0x00 acpidump [0x05d 0093 1] Length: 0x06 acpidump [0x05e 0094 1] ACPI CPU ID: 0x00 diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/DSDT.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/DSDT.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/DSDT.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/DSDT.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_DSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_DSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "DSDT" @@ -16,13 +16,13 @@ * Compiler ID "INTL" * Compiler Version 0x20060608 (537265672) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_DSDT.aml", "DSDT", 2, "TOSCPL", "CRESTLNE", 0x06040000) +DefinitionBlock ("/tmp/fwts_iasl_27987_DSDT.aml", "DSDT", 2, "TOSCPL", "CRESTLNE", 0x06040000) { - External (_PR_.CPU0._PPC) - External (CFGD) - External (PDC0) - External (PDC1) + External (_PR_.CPU0._PPC, UnknownObj) + External (CFGD, UnknownObj) + External (PDC0, UnknownObj) + External (PDC1, UnknownObj) Name (Z000, One) Name (Z001, 0x02) @@ -45,38 +45,38 @@ { If (LEqual (Arg0, Zero)) { - Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) + Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D) /* \P80D */ } If (LEqual (Arg0, One)) { Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08) - ), P80D) + ), P80D) /* \P80D */ } If (LEqual (Arg0, 0x02)) { Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10) - ), P80D) + ), P80D) /* \P80D */ } If (LEqual (Arg0, 0x03)) { Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18) - ), P80D) + ), P80D) /* \P80D */ } - Store (P80D, P80H) + Store (P80D, P80H) /* \P80H */ } Method (_PIC, 1, NotSerialized) // _PIC: Interrupt Model { - Store (Arg0, GPIC) + Store (Arg0, GPIC) /* \GPIC */ } Method (_PTS, 1, NotSerialized) // _PTS: Prepare To Sleep { - Store (Zero, P80D) + Store (Zero, P80D) /* \P80D */ P8XH (Zero, Arg0) If (LEqual (Arg0, 0x03)) { @@ -106,32 +106,32 @@ If (LEqual (RP1D, Zero)) { - Notify (\_SB.PCI0.RP01, Zero) + Notify (\_SB.PCI0.RP01, Zero) // Bus Check } If (LEqual (RP2D, Zero)) { - Notify (\_SB.PCI0.RP02, Zero) + Notify (\_SB.PCI0.RP02, Zero) // Bus Check } If (LEqual (RP3D, Zero)) { - Notify (\_SB.PCI0.RP03, Zero) + Notify (\_SB.PCI0.RP03, Zero) // Bus Check } If (LEqual (RP4D, Zero)) { - Notify (\_SB.PCI0.RP04, Zero) + Notify (\_SB.PCI0.RP04, Zero) // Bus Check } If (LEqual (RP5D, Zero)) { - Notify (\_SB.PCI0.RP05, Zero) + Notify (\_SB.PCI0.RP05, Zero) // Bus Check } If (LEqual (RP6D, Zero)) { - Notify (\_SB.PCI0.RP06, Zero) + Notify (\_SB.PCI0.RP06, Zero) // Bus Check } If (LEqual (Arg0, 0x03)) @@ -145,12 +145,12 @@ P8XH (Zero, 0x40) \_SB.PCI0.LPCB.PHSS (0x0F) Store (WAKF, Local0) - Store (Zero, WAKF) + Store (Zero, WAKF) /* \WAKF */ And (Local0, 0x05, Local0) If (LEqual (Local0, One)) { P8XH (Zero, 0x41) - Notify (\_SB.PWRB, 0x02) + Notify (\_SB.PWRB, 0x02) // Device Wake } If (DTSE) @@ -187,7 +187,7 @@ Multiply (Arg0, 0x08, Local0) Multiply (Arg1, 0x08, Local1) CreateField (Arg2, Local0, Local1, TBF3) - Return (TBF3) + Return (TBF3) /* \GETB.TBF3 */ } Method (PNOT, 0, Serialized) @@ -196,77 +196,77 @@ { If (And (PDC0, 0x08)) { - Notify (\_PR.CPU0, 0x80) + Notify (\_PR.CPU0, 0x80) // Performance Capability Change If (And (PDC0, 0x10)) { Sleep (0x64) - Notify (\_PR.CPU0, 0x81) + Notify (\_PR.CPU0, 0x81) // C-State Change } } If (And (PDC1, 0x08)) { - Notify (\_PR.CPU1, 0x80) + Notify (\_PR.CPU1, 0x80) // Performance Capability Change If (And (PDC1, 0x10)) { Sleep (0x64) - Notify (\_PR.CPU1, 0x81) + Notify (\_PR.CPU1, 0x81) // C-State Change } } } Else { - Notify (\_PR.CPU0, 0x80) + Notify (\_PR.CPU0, 0x80) // Performance Capability Change Sleep (0x64) - Notify (\_PR.CPU0, 0x81) + Notify (\_PR.CPU0, 0x81) // C-State Change } } Method (TRAP, 1, Serialized) { - Store (Arg0, SMIF) - Store (Zero, TRP0) - Return (SMIF) + Store (Arg0, SMIF) /* \SMIF */ + Store (Zero, TRP0) /* \TRP0 */ + Return (SMIF) /* \SMIF */ } Scope (_SB) { Method (_INI, 0, NotSerialized) // _INI: Initialize { - Store (0x9999, MARK) + Store (0x9999, MARK) /* \MARK */ If (DTSE) { TRAP (0x47) ^PCI0.LPCB.PHSS (0x10) } - Store (0x07D0, OSYS) + Store (0x07D0, OSYS) /* \OSYS */ If (CondRefOf (_OSI, Local0)) { If (_OSI ("Linux")) { - Store (One, LINX) - Store (Zero, ECDY) + Store (One, LINX) /* \LINX */ + Store (Zero, ECDY) /* \ECDY */ } If (_OSI ("Windows 2001")) { - Store (0x07D1, OSYS) + Store (0x07D1, OSYS) /* \OSYS */ } If (_OSI ("Windows 2001 SP1")) { - Store (0x07D1, OSYS) + Store (0x07D1, OSYS) /* \OSYS */ } If (_OSI ("Windows 2001 SP2")) { - Store (0x07D2, OSYS) + Store (0x07D2, OSYS) /* \OSYS */ } If (_OSI ("Windows 2006")) { - Store (0x07D6, OSYS) + Store (0x07D6, OSYS) /* \OSYS */ } } @@ -418,7 +418,7 @@ { Method (_L01, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Add (L01C, One, L01C) + Add (L01C, One, L01C) /* \L01C */ P8XH (Zero, One) P8XH (One, L01C) If (LAnd (LEqual (RP1D, Zero), \_SB.PCI0.RP01.HPSX)) @@ -428,7 +428,7 @@ { Store (One, \_SB.PCI0.RP01.PDCX) Store (One, \_SB.PCI0.RP01.HPSX) - Notify (\_SB.PCI0.RP01, Zero) + Notify (\_SB.PCI0.RP01, Zero) // Bus Check } Else { @@ -443,7 +443,7 @@ { Store (One, \_SB.PCI0.RP02.PDCX) Store (One, \_SB.PCI0.RP02.HPSX) - Notify (\_SB.PCI0.RP02, Zero) + Notify (\_SB.PCI0.RP02, Zero) // Bus Check } Else { @@ -458,7 +458,7 @@ { Store (One, \_SB.PCI0.RP03.PDCX) Store (One, \_SB.PCI0.RP03.HPSX) - Notify (\_SB.PCI0.RP03, Zero) + Notify (\_SB.PCI0.RP03, Zero) // Bus Check } Else { @@ -473,7 +473,7 @@ { Store (One, \_SB.PCI0.RP04.PDCX) Store (One, \_SB.PCI0.RP04.HPSX) - Notify (\_SB.PCI0.RP04, Zero) + Notify (\_SB.PCI0.RP04, Zero) // Bus Check } Else { @@ -488,7 +488,7 @@ { Store (One, \_SB.PCI0.RP05.PDCX) Store (One, \_SB.PCI0.RP05.HPSX) - Notify (\_SB.PCI0.RP05, Zero) + Notify (\_SB.PCI0.RP05, Zero) // Bus Check } Else { @@ -503,7 +503,7 @@ { Store (One, \_SB.PCI0.RP06.PDCX) Store (One, \_SB.PCI0.RP06.HPSX) - Notify (\_SB.PCI0.RP06, Zero) + Notify (\_SB.PCI0.RP06, Zero) // Bus Check } Else { @@ -514,7 +514,7 @@ Method (_L02, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Store (Zero, GPEC) + Store (Zero, GPEC) /* \GPEC */ If (\_SB.PCI0.LPCB.ECOK ()) { If (LEqual (DTSW, One)) @@ -548,17 +548,17 @@ Method (_L03, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.USB1, 0x02) + Notify (\_SB.PCI0.USB1, 0x02) // Device Wake } Method (_L04, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.USB2, 0x02) + Notify (\_SB.PCI0.USB2, 0x02) // Device Wake } Method (_L05, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.USB5, 0x02) + Notify (\_SB.PCI0.USB5, 0x02) // Device Wake } Method (_L06, 0, NotSerialized) // _Lxx: Level-Triggered GPE @@ -569,7 +569,7 @@ } Else { - Store (One, SCIS) + Store (One, SCIS) /* \SCIS */ } } @@ -579,53 +579,53 @@ { Store (One, \_SB.PCI0.RP01.PSPX) Store (One, \_SB.PCI0.RP01.PMSX) - Notify (\_SB.PCI0.RP01, 0x02) + Notify (\_SB.PCI0.RP01, 0x02) // Device Wake } If (\_SB.PCI0.RP02.PSPX) { Store (One, \_SB.PCI0.RP02.PSPX) Store (One, \_SB.PCI0.RP02.PMSX) - Notify (\_SB.PCI0.RP02, 0x02) + Notify (\_SB.PCI0.RP02, 0x02) // Device Wake } If (\_SB.PCI0.RP03.PSPX) { Store (One, \_SB.PCI0.RP03.PSPX) Store (One, \_SB.PCI0.RP03.PMSX) - Notify (\_SB.PCI0.RP03, 0x02) + Notify (\_SB.PCI0.RP03, 0x02) // Device Wake } If (\_SB.PCI0.RP04.PSPX) { Store (One, \_SB.PCI0.RP04.PSPX) Store (One, \_SB.PCI0.RP04.PMSX) - Notify (\_SB.PCI0.RP04, 0x02) + Notify (\_SB.PCI0.RP04, 0x02) // Device Wake } If (\_SB.PCI0.RP05.PSPX) { Store (One, \_SB.PCI0.RP05.PSPX) Store (One, \_SB.PCI0.RP05.PMSX) - Notify (\_SB.PCI0.RP05, 0x02) + Notify (\_SB.PCI0.RP05, 0x02) // Device Wake } If (\_SB.PCI0.RP06.PSPX) { Store (One, \_SB.PCI0.RP06.PSPX) Store (One, \_SB.PCI0.RP06.PMSX) - Notify (\_SB.PCI0.RP06, 0x02) + Notify (\_SB.PCI0.RP06, 0x02) // Device Wake } } Method (_L0B, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.PCIB, 0x02) + Notify (\_SB.PCI0.PCIB, 0x02) // Device Wake } Method (_L0C, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.USB3, 0x02) + Notify (\_SB.PCI0.USB3, 0x02) // Device Wake } Method (_L0D, 0, NotSerialized) // _Lxx: Level-Triggered GPE @@ -633,31 +633,31 @@ If (\_SB.PCI0.EHC1.PMES) { Store (One, \_SB.PCI0.EHC1.PMES) - Notify (\_SB.PCI0.EHC1, 0x02) + Notify (\_SB.PCI0.EHC1, 0x02) // Device Wake } If (\_SB.PCI0.EHC2.PMES) { Store (One, \_SB.PCI0.EHC2.PMES) - Notify (\_SB.PCI0.EHC2, 0x02) + Notify (\_SB.PCI0.EHC2, 0x02) // Device Wake } If (\_SB.PCI0.HDEF.PMES) { Store (One, \_SB.PCI0.HDEF.PMES) - Notify (\_SB.PCI0.HDEF, 0x02) + Notify (\_SB.PCI0.HDEF, 0x02) // Device Wake } } Method (_L0E, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Notify (\_SB.PCI0.USB4, 0x02) + Notify (\_SB.PCI0.USB4, 0x02) // Device Wake } Method (_L1B, 0, NotSerialized) // _Lxx: Level-Triggered GPE { - Not (LPOL, LPOL) - Notify (\_SB.LID0, 0x80) + Not (LPOL, LPOL) /* \LPOL */ + Notify (\_SB.LID0, 0x80) // Status Change } } @@ -673,16 +673,16 @@ { If (LGreater (^CPU0._PPC, Zero)) { - Subtract (^CPU0._PPC, One, ^CPU0._PPC) + Subtract (^CPU0._PPC, One, ^CPU0._PPC) /* External reference */ PNOT () - Add (^CPU0._PPC, One, ^CPU0._PPC) + Add (^CPU0._PPC, One, ^CPU0._PPC) /* External reference */ PNOT () } Else { - Add (^CPU0._PPC, One, ^CPU0._PPC) + Add (^CPU0._PPC, One, ^CPU0._PPC) /* External reference */ PNOT () - Subtract (^CPU0._PPC, One, ^CPU0._PPC) + Subtract (^CPU0._PPC, One, ^CPU0._PPC) /* External reference */ PNOT () } } @@ -695,12 +695,12 @@ Method (_PS0, 0, NotSerialized) // _PS0: Power State 0 { Store (_PSC, Local0) - Store (Zero, _PSC) + Store (Zero, _PSC) /* \_PSC */ } Method (_PS3, 0, NotSerialized) // _PS3: Power State 3 { - Store (0x03, _PSC) + Store (0x03, _PSC) /* \_PSC */ } Scope (_SB) @@ -727,7 +727,7 @@ Method (WQAC, 1, NotSerialized) { Store ("MXMTCConfigData", Debug) - Return (STAC) + Return (STAC) /* \_SB_.AMW0.STAC */ } Name (STBC, Buffer (0x04) @@ -738,17 +738,17 @@ { Store ("Get MXMTCControlData: STBC = ", Debug) Store (STBC, Debug) - Return (STBC) + Return (STBC) /* \_SB_.AMW0.STBC */ } Method (WSBC, 2, NotSerialized) { - Store (Arg1, STBC) + Store (Arg1, STBC) /* \_SB_.AMW0.STBC */ Store ("Set MXMTCControlData: STBC = ", Debug) Store (STBC, Debug) If (LEqual (^^PCI0.LPCB.ECOK (), One)) { - Store (DerefOf (Index (STBC, One)), ^^PCI0.LPCB.EC0.SKTC) + Store (DerefOf (Index (STBC, One)), ^^PCI0.LPCB.EC0.SKTC) /* \_SB_.PCI0.LPCB.EC0_.SKTC */ } } @@ -845,16 +845,16 @@ Device (LID0) { - Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID Method (_LID, 0, NotSerialized) // _LID: Lid Status { - Return (LPOL) + Return (LPOL) /* \LPOL */ } } Device (PWRB) { - Name (_HID, EisaId ("PNP0C0C")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID } Device (PCI0) @@ -869,8 +869,8 @@ Return (0x02) } - Name (_HID, EisaId ("PNP0A08")) // _HID: Hardware ID - Name (_CID, EisaId ("PNP0A03")) // _CID: Compatible ID + Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID Device (MCHC) { Name (_ADR, Zero) // _ADR: Address @@ -1089,157 +1089,157 @@ If (^MCHC.PM1L) { CreateDWordField (BUF0, \_SB.PCI0._Y00._LEN, C0LN) // _LEN: Length - Store (Zero, C0LN) + Store (Zero, C0LN) /* \_SB_.PCI0._CRS.C0LN */ } If (LEqual (^MCHC.PM1L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y00._RW, C0RW) // _RW_: Read-Write Status - Store (Zero, C0RW) + Store (Zero, C0RW) /* \_SB_.PCI0._CRS.C0RW */ } If (^MCHC.PM1H) { CreateDWordField (BUF0, \_SB.PCI0._Y01._LEN, C4LN) // _LEN: Length - Store (Zero, C4LN) + Store (Zero, C4LN) /* \_SB_.PCI0._CRS.C4LN */ } If (LEqual (^MCHC.PM1H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y01._RW, C4RW) // _RW_: Read-Write Status - Store (Zero, C4RW) + Store (Zero, C4RW) /* \_SB_.PCI0._CRS.C4RW */ } If (^MCHC.PM2L) { CreateDWordField (BUF0, \_SB.PCI0._Y02._LEN, C8LN) // _LEN: Length - Store (Zero, C8LN) + Store (Zero, C8LN) /* \_SB_.PCI0._CRS.C8LN */ } If (LEqual (^MCHC.PM2L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y02._RW, C8RW) // _RW_: Read-Write Status - Store (Zero, C8RW) + Store (Zero, C8RW) /* \_SB_.PCI0._CRS.C8RW */ } If (^MCHC.PM2H) { CreateDWordField (BUF0, \_SB.PCI0._Y03._LEN, CCLN) // _LEN: Length - Store (Zero, CCLN) + Store (Zero, CCLN) /* \_SB_.PCI0._CRS.CCLN */ } If (LEqual (^MCHC.PM2H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y03._RW, CCRW) // _RW_: Read-Write Status - Store (Zero, CCRW) + Store (Zero, CCRW) /* \_SB_.PCI0._CRS.CCRW */ } If (^MCHC.PM3L) { CreateDWordField (BUF0, \_SB.PCI0._Y04._LEN, D0LN) // _LEN: Length - Store (Zero, D0LN) + Store (Zero, D0LN) /* \_SB_.PCI0._CRS.D0LN */ } If (LEqual (^MCHC.PM3L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y04._RW, D0RW) // _RW_: Read-Write Status - Store (Zero, D0RW) + Store (Zero, D0RW) /* \_SB_.PCI0._CRS.D0RW */ } If (^MCHC.PM3H) { CreateDWordField (BUF0, \_SB.PCI0._Y05._LEN, D4LN) // _LEN: Length - Store (Zero, D4LN) + Store (Zero, D4LN) /* \_SB_.PCI0._CRS.D4LN */ } If (LEqual (^MCHC.PM3H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y05._RW, D4RW) // _RW_: Read-Write Status - Store (Zero, D4RW) + Store (Zero, D4RW) /* \_SB_.PCI0._CRS.D4RW */ } If (^MCHC.PM4L) { CreateDWordField (BUF0, \_SB.PCI0._Y06._LEN, D8LN) // _LEN: Length - Store (Zero, D8LN) + Store (Zero, D8LN) /* \_SB_.PCI0._CRS.D8LN */ } If (LEqual (^MCHC.PM4L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y06._RW, D8RW) // _RW_: Read-Write Status - Store (Zero, D8RW) + Store (Zero, D8RW) /* \_SB_.PCI0._CRS.D8RW */ } If (^MCHC.PM4H) { CreateDWordField (BUF0, \_SB.PCI0._Y07._LEN, DCLN) // _LEN: Length - Store (Zero, DCLN) + Store (Zero, DCLN) /* \_SB_.PCI0._CRS.DCLN */ } If (LEqual (^MCHC.PM4H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y07._RW, DCRW) // _RW_: Read-Write Status - Store (Zero, DCRW) + Store (Zero, DCRW) /* \_SB_.PCI0._CRS.DCRW */ } If (^MCHC.PM5L) { CreateDWordField (BUF0, \_SB.PCI0._Y08._LEN, E0LN) // _LEN: Length - Store (Zero, E0LN) + Store (Zero, E0LN) /* \_SB_.PCI0._CRS.E0LN */ } If (LEqual (^MCHC.PM5L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y08._RW, E0RW) // _RW_: Read-Write Status - Store (Zero, E0RW) + Store (Zero, E0RW) /* \_SB_.PCI0._CRS.E0RW */ } If (^MCHC.PM5H) { CreateDWordField (BUF0, \_SB.PCI0._Y09._LEN, E4LN) // _LEN: Length - Store (Zero, E4LN) + Store (Zero, E4LN) /* \_SB_.PCI0._CRS.E4LN */ } If (LEqual (^MCHC.PM5H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y09._RW, E4RW) // _RW_: Read-Write Status - Store (Zero, E4RW) + Store (Zero, E4RW) /* \_SB_.PCI0._CRS.E4RW */ } If (^MCHC.PM6L) { CreateDWordField (BUF0, \_SB.PCI0._Y0A._LEN, E8LN) // _LEN: Length - Store (Zero, E8LN) + Store (Zero, E8LN) /* \_SB_.PCI0._CRS.E8LN */ } If (LEqual (^MCHC.PM6L, One)) { CreateBitField (BUF0, \_SB.PCI0._Y0A._RW, E8RW) // _RW_: Read-Write Status - Store (Zero, E8RW) + Store (Zero, E8RW) /* \_SB_.PCI0._CRS.E8RW */ } If (^MCHC.PM6H) { CreateDWordField (BUF0, \_SB.PCI0._Y0B._LEN, ECLN) // _LEN: Length - Store (Zero, ECLN) + Store (Zero, ECLN) /* \_SB_.PCI0._CRS.ECLN */ } If (LEqual (^MCHC.PM6H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y0B._RW, ECRW) // _RW_: Read-Write Status - Store (Zero, ECRW) + Store (Zero, ECRW) /* \_SB_.PCI0._CRS.ECRW */ } If (^MCHC.PM0H) { CreateDWordField (BUF0, \_SB.PCI0._Y0C._LEN, F0LN) // _LEN: Length - Store (Zero, F0LN) + Store (Zero, F0LN) /* \_SB_.PCI0._CRS.F0LN */ } If (LEqual (^MCHC.PM0H, One)) { CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, F0RW) // _RW_: Read-Write Status - Store (Zero, F0RW) + Store (Zero, F0RW) /* \_SB_.PCI0._CRS.F0RW */ } CreateDWordField (BUF0, \_SB.PCI0._Y0D._MIN, M1MN) // _MIN: Minimum Base Address @@ -1248,14 +1248,14 @@ CreateDWordField (BUF0, \_SB.PCI0._Y0E._MIN, M2MN) // _MIN: Minimum Base Address CreateDWordField (BUF0, \_SB.PCI0._Y0E._MAX, M2MX) // _MAX: Maximum Base Address CreateDWordField (BUF0, \_SB.PCI0._Y0E._LEN, M2LN) // _LEN: Length - ShiftLeft (^MCHC.PXBR, 0x1A, M1MX) + ShiftLeft (^MCHC.PXBR, 0x1A, M1MX) /* \_SB_.PCI0._CRS.M1MX */ ShiftRight (0x10000000, ^MCHC.PXSZ, Local0) - Add (M1MX, Local0, M2MN) - Add (Subtract (M2MX, M2MN), One, M2LN) - Subtract (M1MX, One, M1MX) - ShiftLeft (^MCHC.TLUD, 0x14, M1MN) - Add (Subtract (M1MX, M1MN), One, M1LN) - Return (BUF0) + Add (M1MX, Local0, M2MN) /* \_SB_.PCI0._CRS.M2MN */ + Add (Subtract (M2MX, M2MN), One, M2LN) /* \_SB_.PCI0._CRS.M2LN */ + Subtract (M1MX, One, M1MX) /* \_SB_.PCI0._CRS.M1MX */ + ShiftLeft (^MCHC.TLUD, 0x14, M1MN) /* \_SB_.PCI0._CRS.M1MN */ + Add (Subtract (M1MX, M1MN), One, M1LN) /* \_SB_.PCI0._CRS.M1LN */ + Return (BUF0) /* \_SB_.PCI0.BUF0 */ } Method (_PRT, 0, NotSerialized) // _PRT: PCI Routing Table @@ -1578,7 +1578,7 @@ Device (PDRC) { - Name (_HID, EisaId ("PNP0C02")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */) // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID Name (BUF0, ResourceTemplate () { @@ -1618,18 +1618,18 @@ Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y0F._BAS, RBR0) // _BAS: Base Address - ShiftLeft (^^LPCB.RCBA, 0x0E, RBR0) + ShiftLeft (^^LPCB.RCBA, 0x0E, RBR0) /* \_SB_.PCI0.PDRC._CRS.RBR0 */ CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y10._BAS, MBR0) // _BAS: Base Address - ShiftLeft (^^MCHC.MHBR, 0x0E, MBR0) + ShiftLeft (^^MCHC.MHBR, 0x0E, MBR0) /* \_SB_.PCI0.PDRC._CRS.MBR0 */ CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y11._BAS, DBR0) // _BAS: Base Address - ShiftLeft (^^MCHC.DIBR, 0x0C, DBR0) + ShiftLeft (^^MCHC.DIBR, 0x0C, DBR0) /* \_SB_.PCI0.PDRC._CRS.DBR0 */ CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y12._BAS, EBR0) // _BAS: Base Address - ShiftLeft (^^MCHC.EPBR, 0x0C, EBR0) + ShiftLeft (^^MCHC.EPBR, 0x0C, EBR0) /* \_SB_.PCI0.PDRC._CRS.EBR0 */ CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y13._BAS, XBR0) // _BAS: Base Address - ShiftLeft (^^MCHC.PXBR, 0x1A, XBR0) + ShiftLeft (^^MCHC.PXBR, 0x1A, XBR0) /* \_SB_.PCI0.PDRC._CRS.XBR0 */ CreateDWordField (BUF0, \_SB.PCI0.PDRC._Y13._LEN, XSZ0) // _LEN: Length - ShiftRight (0x10000000, ^^MCHC.PXSZ, XSZ0) - Return (BUF0) + ShiftRight (0x10000000, ^^MCHC.PXSZ, XSZ0) /* \_SB_.PCI0.PDRC._CRS.XSZ0 */ + Return (BUF0) /* \_SB_.PCI0.PDRC.BUF0 */ } } @@ -1736,22 +1736,22 @@ Name (_PSC, Zero) // _PSC: Power State Current Method (_PS0, 0, NotSerialized) // _PS0: Power State 0 { - Store (Zero, _PSC) + Store (Zero, _PSC) /* \_SB_.PCI0.PEGP.VGA_._PSC */ } Method (_PS1, 0, NotSerialized) // _PS1: Power State 1 { - Store (One, _PSC) + Store (One, _PSC) /* \_SB_.PCI0.PEGP.VGA_._PSC */ } Method (_PS3, 0, NotSerialized) // _PS3: Power State 3 { - Store (0x03, _PSC) + Store (0x03, _PSC) /* \_SB_.PCI0.PEGP.VGA_._PSC */ } Method (_DOS, 1, NotSerialized) // _DOS: Disable Output Switching { - Store (And (Arg0, 0x03), SWIT) + Store (And (Arg0, 0x03), SWIT) /* \_SB_.PCI0.PEGP.VGA_.SWIT */ } Method (_DOD, 0, NotSerialized) // _DOD: Display Output Devices @@ -1780,11 +1780,11 @@ And (Local1, 0x02, Local1) If (Local0) { - Store (One, CRTA) + Store (One, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ } Else { - Store (Zero, CRTA) + Store (Zero, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ } If (CRTA) @@ -1844,11 +1844,11 @@ And (Local1, One, Local1) If (Local0) { - Store (One, LCDA) + Store (One, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ } Else { - Store (Zero, LCDA) + Store (Zero, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ } If (LCDA) @@ -1911,7 +1911,7 @@ Method (_BCM, 1, NotSerialized) // _BCM: Brightness Control Method { Divide (Arg0, 0x0A, Local0, Local1) - Store (Local1, ^^^^LPCB.EC0.BRTS) + Store (Local1, ^^^^LPCB.EC0.BRTS) /* \_SB_.PCI0.LPCB.EC0_.BRTS */ } Method (_BQC, 0, NotSerialized) // _BQC: Brightness Query Current @@ -1937,11 +1937,11 @@ And (Local1, 0x04, Local1) If (Local0) { - Store (One, TVAA) + Store (One, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } Else { - Store (Zero, TVAA) + Store (Zero, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (TVAA) @@ -1994,8 +1994,8 @@ Store (CSTE, Local1) If (LGreater (Local1, One)) { - And (Local0, Local1, VLDF) - And (VLDF, 0xFE, VLDF) + And (Local0, Local1, VLDF) /* \_SB_.PCI0.PEGP.VGA_.VLDF */ + And (VLDF, 0xFE, VLDF) /* \_SB_.PCI0.PEGP.VGA_.VLDF */ } If (VLDF) @@ -2071,7 +2071,7 @@ } Else { - Store (One, VLDF) + Store (One, VLDF) /* \_SB_.PCI0.PEGP.VGA_.VLDF */ STBL (One) } } @@ -2088,54 +2088,54 @@ { If (LEqual (Arg0, One)) { - Store (Zero, CRTA) - Store (One, LCDA) - Store (Zero, TVAA) + Store (Zero, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (One, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (Zero, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x02)) { - Store (One, CRTA) - Store (Zero, LCDA) - Store (Zero, TVAA) + Store (One, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (Zero, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (Zero, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x03)) { - Store (One, CRTA) - Store (One, LCDA) - Store (Zero, TVAA) + Store (One, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (One, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (Zero, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x04)) { - Store (Zero, CRTA) - Store (Zero, LCDA) - Store (One, TVAA) + Store (Zero, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (Zero, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (One, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x05)) { - Store (Zero, CRTA) - Store (One, LCDA) - Store (One, TVAA) + Store (Zero, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (One, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (One, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x06)) { - Store (One, CRTA) - Store (Zero, LCDA) - Store (One, TVAA) + Store (One, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (Zero, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (One, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } If (LEqual (Arg0, 0x07)) { - Store (One, CRTA) - Store (One, LCDA) - Store (One, TVAA) + Store (One, CRTA) /* \_SB_.PCI0.PEGP.VGA_.CRTA */ + Store (One, LCDA) /* \_SB_.PCI0.PEGP.VGA_.LCDA */ + Store (One, TVAA) /* \_SB_.PCI0.PEGP.VGA_.TVAA */ } - Notify (VGA, 0x80) + Notify (VGA, 0x80) // Status Change } } } @@ -2145,35 +2145,35 @@ Name (_ADR, 0x00020000) // _ADR: Address Method (_DOS, 1, NotSerialized) // _DOS: Disable Output Switching { - Store (And (Arg0, 0x07), DSEN) + Store (And (Arg0, 0x07), DSEN) /* \DSEN */ } Method (_DOD, 0, NotSerialized) // _DOD: Display Output Devices { - Store (Zero, NDID) + Store (Zero, NDID) /* \NDID */ If (LNotEqual (DIDL, Zero)) { - Store (SDDL (DID1), DID1) + Store (SDDL (DID1), DID1) /* \DID1 */ } If (LNotEqual (DDL2, Zero)) { - Store (SDDL (DID2), DID2) + Store (SDDL (DID2), DID2) /* \DID2 */ } If (LNotEqual (DDL3, Zero)) { - Store (SDDL (DID3), DID3) + Store (SDDL (DID3), DID3) /* \DID3 */ } If (LNotEqual (DDL4, Zero)) { - Store (SDDL (DID4), DID4) + Store (SDDL (DID4), DID4) /* \DID4 */ } If (LNotEqual (DDL5, Zero)) { - Store (SDDL (DID5), DID5) + Store (SDDL (DID5), DID5) /* \DID5 */ } If (LEqual (NDID, One)) @@ -2183,7 +2183,7 @@ 0xFFFFFFFF }) Store (Or (0x00010000, DID1), Index (TMP1, Zero)) - Return (TMP1) + Return (TMP1) /* \_SB_.PCI0.GFX0._DOD.TMP1 */ } If (LEqual (NDID, 0x02)) @@ -2195,7 +2195,7 @@ }) Store (Or (0x00010000, DID1), Index (TMP2, Zero)) Store (Or (0x00010000, DID2), Index (TMP2, One)) - Return (TMP2) + Return (TMP2) /* \_SB_.PCI0.GFX0._DOD.TMP2 */ } If (LEqual (NDID, 0x03)) @@ -2209,7 +2209,7 @@ Store (Or (0x00010000, DID1), Index (TMP3, Zero)) Store (Or (0x00010000, DID2), Index (TMP3, One)) Store (Or (0x00010000, DID3), Index (TMP3, 0x02)) - Return (TMP3) + Return (TMP3) /* \_SB_.PCI0.GFX0._DOD.TMP3 */ } If (LEqual (NDID, 0x04)) @@ -2225,7 +2225,7 @@ Store (Or (0x00010000, DID2), Index (TMP4, One)) Store (Or (0x00010000, DID3), Index (TMP4, 0x02)) Store (Or (0x00010000, DID4), Index (TMP4, 0x03)) - Return (TMP4) + Return (TMP4) /* \_SB_.PCI0.GFX0._DOD.TMP4 */ } If (LGreater (NDID, 0x04)) @@ -2243,7 +2243,7 @@ Store (Or (0x00010000, DID3), Index (TMP5, 0x02)) Store (Or (0x00010000, DID4), Index (TMP5, 0x03)) Store (Or (0x00010000, DID4), Index (TMP5, 0x04)) - Return (TMP5) + Return (TMP5) /* \_SB_.PCI0.GFX0._DOD.TMP5 */ } Return (Package (0x01) @@ -2280,7 +2280,7 @@ { If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) { - Store (NSTE, CSTE) + Store (NSTE, CSTE) /* \CSTE */ } } } @@ -2313,7 +2313,7 @@ { If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) { - Store (NSTE, CSTE) + Store (NSTE, CSTE) /* \CSTE */ } } } @@ -2353,7 +2353,7 @@ { If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) { - Store (NSTE, CSTE) + Store (NSTE, CSTE) /* \CSTE */ } } } @@ -2393,7 +2393,7 @@ { If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) { - Store (NSTE, CSTE) + Store (NSTE, CSTE) /* \CSTE */ } } } @@ -2433,7 +2433,7 @@ { If (LEqual (And (Arg0, 0xC0000000), 0xC0000000)) { - Store (NSTE, CSTE) + Store (NSTE, CSTE) /* \CSTE */ } } } @@ -2778,200 +2778,200 @@ { If (LEqual (GESF, Zero)) { - Store (0x0279, PARM) - Store (Zero, GESF) - Return (SUCC) + Store (0x0279, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, One)) { - Store (0x0240, PARM) - Store (Zero, GESF) - Return (SUCC) + Store (0x0240, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x04)) { - And (PARM, 0xEFFF0000, PARM) + And (PARM, 0xEFFF0000, PARM) /* \_SB_.PCI0.GFX0.PARM */ And (PARM, ShiftLeft (DerefOf (Index (DBTB, IBTT)), 0x10), - PARM) - Or (IBTT, PARM, PARM) - Store (Zero, GESF) - Return (SUCC) + PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (IBTT, PARM, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x05)) { - Store (IPSC, PARM) - Or (PARM, ShiftLeft (IPAT, 0x08), PARM) - Add (PARM, 0x0100, PARM) - Or (PARM, ShiftLeft (LIDS, 0x10), PARM) - Add (PARM, 0x00010000, PARM) - Or (PARM, ShiftLeft (IBIA, 0x14), PARM) - Store (Zero, GESF) - Return (SUCC) + Store (IPSC, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, ShiftLeft (IPAT, 0x08), PARM) /* \_SB_.PCI0.GFX0.PARM */ + Add (PARM, 0x0100, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, ShiftLeft (LIDS, 0x10), PARM) /* \_SB_.PCI0.GFX0.PARM */ + Add (PARM, 0x00010000, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, ShiftLeft (IBIA, 0x14), PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x06)) { - Store (ITVF, PARM) - Or (PARM, ShiftLeft (ITVM, 0x04), PARM) - Store (Zero, GESF) - Return (SUCC) + Store (ITVF, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, ShiftLeft (ITVM, 0x04), PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x07)) { - Store (GIVD, PARM) - XOr (PARM, One, PARM) - Or (PARM, ShiftLeft (GMFN, One), PARM) - Or (PARM, 0x1000, PARM) + Store (GIVD, PARM) /* \_SB_.PCI0.GFX0.PARM */ + XOr (PARM, One, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, ShiftLeft (GMFN, One), PARM) /* \_SB_.PCI0.GFX0.PARM */ + Or (PARM, 0x1000, PARM) /* \_SB_.PCI0.GFX0.PARM */ If (IDMM) { - Or (PARM, ShiftLeft (IDMS, 0x11), PARM) + Or (PARM, ShiftLeft (IDMS, 0x11), PARM) /* \_SB_.PCI0.GFX0.PARM */ } Else { - Or (PARM, ShiftLeft (IDMS, 0x0D), PARM) + Or (PARM, ShiftLeft (IDMS, 0x0D), PARM) /* \_SB_.PCI0.GFX0.PARM */ } Or (ShiftLeft (DerefOf (Index (DerefOf (Index (CDCT, HVCO)), Subtract ( - CDVL, One))), 0x15), PARM, PARM) - Store (One, GESF) - Return (SUCC) + CDVL, One))), 0x15), PARM, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (One, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x0A)) { - Store (Zero, PARM) + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ If (ISSC) { - Or (PARM, 0x03, PARM) + Or (PARM, 0x03, PARM) /* \_SB_.PCI0.GFX0.PARM */ } - Store (Zero, GESF) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } - Store (Zero, GESF) - Return (CRIT) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (CRIT) /* \_SB_.PCI0.GFX0.CRIT */ } Method (SBCB, 0, Serialized) { If (LEqual (GESF, Zero)) { - Store (Zero, PARM) - Store (0xF77D, PARM) - Store (Zero, GESF) - Return (SUCC) + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (0xF77D, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, One)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x03)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x04)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x05)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x06)) { - Store (And (PARM, 0x0F), ITVF) - Store (ShiftRight (And (PARM, 0xF0), 0x04), ITVM) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (And (PARM, 0x0F), ITVF) /* \ITVF */ + Store (ShiftRight (And (PARM, 0xF0), 0x04), ITVM) /* \ITVM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x07)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x08)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x09)) { - And (PARM, 0xFF, IBTT) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + And (PARM, 0xFF, IBTT) /* \IBTT */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x0A)) { - And (PARM, 0xFF, IPSC) + And (PARM, 0xFF, IPSC) /* \IPSC */ If (And (ShiftRight (PARM, 0x08), 0xFF)) { - And (ShiftRight (PARM, 0x08), 0xFF, IPAT) + And (ShiftRight (PARM, 0x08), 0xFF, IPAT) /* \IPAT */ Decrement (IPAT) } - And (ShiftRight (PARM, 0x14), 0x07, IBIA) - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + And (ShiftRight (PARM, 0x14), 0x07, IBIA) /* \IBIA */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x0B)) { - And (ShiftRight (PARM, One), One, IF1E) + And (ShiftRight (PARM, One), One, IF1E) /* \IF1E */ If (And (PARM, 0x0001E000)) { - And (ShiftRight (PARM, 0x0D), 0x0F, IDMS) - Store (Zero, IDMM) + And (ShiftRight (PARM, 0x0D), 0x0F, IDMS) /* \IDMS */ + Store (Zero, IDMM) /* \IDMM */ } Else { - And (ShiftRight (PARM, 0x11), 0x0F, IDMS) - Store (One, IDMM) + And (ShiftRight (PARM, 0x11), 0x0F, IDMS) /* \IDMS */ + Store (One, IDMM) /* \IDMM */ } - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x10)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x11)) { - Or (PARM, 0x0100, PARM) - Store (Zero, GESF) - Return (SUCC) + Or (PARM, 0x0100, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x12)) @@ -2980,49 +2980,49 @@ { If (LEqual (ShiftRight (PARM, One), One)) { - Store (One, ISSC) + Store (One, ISSC) /* \ISSC */ } Else { - Store (Zero, GESF) - Return (CRIT) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (CRIT) /* \_SB_.PCI0.GFX0.CRIT */ } } Else { - Store (Zero, ISSC) + Store (Zero, ISSC) /* \ISSC */ } - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GESF, 0x13)) { - Store (Zero, GESF) - Store (Zero, PARM) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Store (Zero, PARM) /* \_SB_.PCI0.GFX0.PARM */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } - Store (Zero, GESF) - Return (SUCC) + Store (Zero, GESF) /* \_SB_.PCI0.GFX0.GESF */ + Return (SUCC) /* \_SB_.PCI0.GFX0.SUCC */ } If (LEqual (GEFC, 0x04)) { - Store (GBDA (), GXFC) + Store (GBDA (), GXFC) /* \_SB_.PCI0.GFX0.GXFC */ } If (LEqual (GEFC, 0x06)) { - Store (SBCB (), GXFC) + Store (SBCB (), GXFC) /* \_SB_.PCI0.GFX0.GXFC */ } - Store (Zero, GEFC) - Store (One, SCIS) - Store (Zero, GSSE) - Store (Zero, SCIE) + Store (Zero, GEFC) /* \_SB_.PCI0.GFX0.GEFC */ + Store (One, SCIS) /* \SCIS */ + Store (Zero, GSSE) /* \_SB_.PCI0.GFX0.GSSE */ + Store (Zero, SCIE) /* \_SB_.PCI0.GFX0.SCIE */ Return (Zero) } @@ -3058,8 +3058,8 @@ Return (One) } - Store (Arg0, CEVT) - Store (0x03, CSTS) + Store (Arg0, CEVT) /* \_SB_.PCI0.GFX0.CEVT */ + Store (0x03, CSTS) /* \_SB_.PCI0.GFX0.CSTS */ If (LAnd (LEqual (CHPD, Zero), LEqual (Arg1, Zero))) { If (LOr (LGreater (OSYS, 0x07D0), LLess (OSYS, 0x07D6))) @@ -3072,10 +3072,10 @@ } } - Notify (GFX0, 0x80) + Notify (GFX0, 0x80) // Status Change If (LNot (PSTS ())) { - Store (Zero, CEVT) + Store (Zero, CEVT) /* \_SB_.PCI0.GFX0.CEVT */ } Return (Zero) @@ -3083,19 +3083,19 @@ Method (GHDS, 1, NotSerialized) { - Store (Arg0, TIDX) + Store (Arg0, TIDX) /* \_SB_.PCI0.GFX0.TIDX */ Return (GNOT (One, Zero)) } Method (GLID, 1, NotSerialized) { - Store (Arg0, CLID) + Store (Arg0, CLID) /* \_SB_.PCI0.GFX0.CLID */ Return (GNOT (0x02, Zero)) } Method (GDCK, 1, NotSerialized) { - Store (Arg0, CDCK) + Store (Arg0, CDCK) /* \_SB_.PCI0.GFX0.CDCK */ Return (GNOT (0x04, 0x80)) } @@ -3127,41 +3127,41 @@ { If (LEqual (CPFM, One)) { - Store (0x06, PFIT) + Store (0x06, PFIT) /* \_SB_.PCI0.GFX0.PFIT */ } If (LEqual (CPFM, 0x06)) { - Store (0x08, PFIT) + Store (0x08, PFIT) /* \_SB_.PCI0.GFX0.PFIT */ } If (LEqual (CPFM, 0x08)) { - Store (One, PFIT) + Store (One, PFIT) /* \_SB_.PCI0.GFX0.PFIT */ } } Else { - XOr (PFIT, 0x07, PFIT) + XOr (PFIT, 0x07, PFIT) /* \_SB_.PCI0.GFX0.PFIT */ } - Or (PFIT, 0x80000000, PFIT) - Store (0x04, ASLC) + Or (PFIT, 0x80000000, PFIT) /* \_SB_.PCI0.GFX0.PFIT */ + Store (0x04, ASLC) /* \_SB_.PCI0.GFX0.ASLC */ } Else { If (LEqual (Arg0, One)) { - Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP) - Or (BCLP, 0x80000000, BCLP) - Store (0x02, ASLC) + Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP) /* \_SB_.PCI0.GFX0.BCLP */ + Or (BCLP, 0x80000000, BCLP) /* \_SB_.PCI0.GFX0.BCLP */ + Store (0x02, ASLC) /* \_SB_.PCI0.GFX0.ASLC */ } Else { If (LEqual (Arg0, Zero)) { - Store (Arg1, ALSI) - Store (One, ASLC) + Store (Arg1, ALSI) /* \_SB_.PCI0.GFX0.ALSI */ + Store (One, ASLC) /* \_SB_.PCI0.GFX0.ASLC */ } Else { @@ -3170,7 +3170,7 @@ } } - Store (Zero, LBPC) + Store (Zero, LBPC) /* \_SB_.PCI0.GFX0.LBPC */ Return (Zero) } } @@ -3344,30 +3344,30 @@ Name (TMPF, Zero) If (Arg0) { - Or (TMPF, One, TMPF) + Or (TMPF, One, TMPF) /* \GETF.TMPF */ } If (And (Arg2, 0x02)) { - Or (TMPF, 0x02, TMPF) + Or (TMPF, 0x02, TMPF) /* \GETF.TMPF */ } If (Arg1) { - Or (TMPF, 0x04, TMPF) + Or (TMPF, 0x04, TMPF) /* \GETF.TMPF */ } If (And (Arg2, 0x20)) { - Or (TMPF, 0x08, TMPF) + Or (TMPF, 0x08, TMPF) /* \GETF.TMPF */ } If (And (Arg2, 0x4000)) { - Or (TMPF, 0x10, TMPF) + Or (TMPF, 0x10, TMPF) /* \GETF.TMPF */ } - Return (TMPF) + Return (TMPF) /* \GETF.TMPF */ } Method (SETP, 3, Serialized) @@ -4170,15 +4170,15 @@ { If (Arg0) { - Store (One, ACPW) + Store (One, ACPW) /* \ACPW */ If (ACPW) { - Store (0x03, U1EN) + Store (0x03, U1EN) /* \_SB_.PCI0.USB1.U1EN */ } } Else { - Store (Zero, U1EN) + Store (Zero, U1EN) /* \_SB_.PCI0.USB1.U1EN */ } } @@ -4211,15 +4211,15 @@ { If (Arg0) { - Store (One, ACPW) + Store (One, ACPW) /* \ACPW */ If (ACPW) { - Store (One, U2EN) + Store (One, U2EN) /* \_SB_.PCI0.USB2.U2EN */ } } Else { - Store (Zero, U2EN) + Store (Zero, U2EN) /* \_SB_.PCI0.USB2.U2EN */ } } @@ -4252,15 +4252,15 @@ { If (Arg0) { - Store (One, ACPW) + Store (One, ACPW) /* \ACPW */ If (ACPW) { - Store (0x03, U3EN) + Store (0x03, U3EN) /* \_SB_.PCI0.USB3.U3EN */ } } Else { - Store (Zero, U3EN) + Store (Zero, U3EN) /* \_SB_.PCI0.USB3.U3EN */ } } @@ -4293,15 +4293,15 @@ { If (Arg0) { - Store (One, ACPW) + Store (One, ACPW) /* \ACPW */ If (ACPW) { - Store (0x03, U4EN) + Store (0x03, U4EN) /* \_SB_.PCI0.USB4.U4EN */ } } Else { - Store (Zero, U4EN) + Store (Zero, U4EN) /* \_SB_.PCI0.USB4.U4EN */ } } @@ -4329,15 +4329,15 @@ { If (Arg0) { - Store (One, ACPW) + Store (One, ACPW) /* \ACPW */ If (ACPW) { - Store (0x03, U5EN) + Store (0x03, U5EN) /* \_SB_.PCI0.USB5.U5EN */ } } Else { - Store (Zero, U5EN) + Store (Zero, U5EN) /* \_SB_.PCI0.USB5.U5EN */ } } @@ -4575,19 +4575,19 @@ Method (PHSS, 1, NotSerialized) { Acquire (PSMX, 0xFFFF) - Store (0x80, BCMD) - Store (Arg0, DID) - Store (Zero, SMIC) + Store (0x80, BCMD) /* \_SB_.PCI0.LPCB.BCMD */ + Store (Arg0, DID) /* \_SB_.PCI0.LPCB.DID_ */ + Store (Zero, SMIC) /* \_SB_.PCI0.LPCB.SMIC */ Release (PSMX) } Device (LNKA) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PARC) + Store (0x80, PARC) /* \_SB_.PCI0.LPCB.PARC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4603,9 +4603,9 @@ {} }) CreateWordField (RTLA, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PARC, 0x0F), IRQ0) - Return (RTLA) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKA._CRS.IRQ0 */ + ShiftLeft (One, And (PARC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKA._CRS.IRQ0 */ + Return (RTLA) /* \_SB_.PCI0.LPCB.LNKA._CRS.RTLA */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4613,7 +4613,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PARC) + Store (Local0, PARC) /* \_SB_.PCI0.LPCB.PARC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4631,11 +4631,11 @@ Device (LNKB) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x02) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PBRC) + Store (0x80, PBRC) /* \_SB_.PCI0.LPCB.PBRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4651,9 +4651,9 @@ {} }) CreateWordField (RTLB, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PBRC, 0x0F), IRQ0) - Return (RTLB) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKB._CRS.IRQ0 */ + ShiftLeft (One, And (PBRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKB._CRS.IRQ0 */ + Return (RTLB) /* \_SB_.PCI0.LPCB.LNKB._CRS.RTLB */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4661,7 +4661,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PBRC) + Store (Local0, PBRC) /* \_SB_.PCI0.LPCB.PBRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4679,11 +4679,11 @@ Device (LNKC) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x03) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PCRC) + Store (0x80, PCRC) /* \_SB_.PCI0.LPCB.PCRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4699,9 +4699,9 @@ {} }) CreateWordField (RTLC, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PCRC, 0x0F), IRQ0) - Return (RTLC) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKC._CRS.IRQ0 */ + ShiftLeft (One, And (PCRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKC._CRS.IRQ0 */ + Return (RTLC) /* \_SB_.PCI0.LPCB.LNKC._CRS.RTLC */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4709,7 +4709,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PCRC) + Store (Local0, PCRC) /* \_SB_.PCI0.LPCB.PCRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4727,11 +4727,11 @@ Device (LNKD) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x04) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PDRC) + Store (0x80, PDRC) /* \_SB_.PCI0.LPCB.PDRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4747,9 +4747,9 @@ {} }) CreateWordField (RTLD, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PDRC, 0x0F), IRQ0) - Return (RTLD) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKD._CRS.IRQ0 */ + ShiftLeft (One, And (PDRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKD._CRS.IRQ0 */ + Return (RTLD) /* \_SB_.PCI0.LPCB.LNKD._CRS.RTLD */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4757,7 +4757,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PDRC) + Store (Local0, PDRC) /* \_SB_.PCI0.LPCB.PDRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4775,11 +4775,11 @@ Device (LNKE) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x05) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PERC) + Store (0x80, PERC) /* \_SB_.PCI0.LPCB.PERC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4795,9 +4795,9 @@ {} }) CreateWordField (RTLE, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PERC, 0x0F), IRQ0) - Return (RTLE) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKE._CRS.IRQ0 */ + ShiftLeft (One, And (PERC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKE._CRS.IRQ0 */ + Return (RTLE) /* \_SB_.PCI0.LPCB.LNKE._CRS.RTLE */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4805,7 +4805,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PERC) + Store (Local0, PERC) /* \_SB_.PCI0.LPCB.PERC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4823,11 +4823,11 @@ Device (LNKF) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x06) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PFRC) + Store (0x80, PFRC) /* \_SB_.PCI0.LPCB.PFRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4843,9 +4843,9 @@ {} }) CreateWordField (RTLF, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PFRC, 0x0F), IRQ0) - Return (RTLF) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKF._CRS.IRQ0 */ + ShiftLeft (One, And (PFRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKF._CRS.IRQ0 */ + Return (RTLF) /* \_SB_.PCI0.LPCB.LNKF._CRS.RTLF */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4853,7 +4853,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PFRC) + Store (Local0, PFRC) /* \_SB_.PCI0.LPCB.PFRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4871,11 +4871,11 @@ Device (LNKG) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x07) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PGRC) + Store (0x80, PGRC) /* \_SB_.PCI0.LPCB.PGRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4891,9 +4891,9 @@ {} }) CreateWordField (RTLG, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PGRC, 0x0F), IRQ0) - Return (RTLG) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKG._CRS.IRQ0 */ + ShiftLeft (One, And (PGRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKG._CRS.IRQ0 */ + Return (RTLG) /* \_SB_.PCI0.LPCB.LNKG._CRS.RTLG */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4901,7 +4901,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PGRC) + Store (Local0, PGRC) /* \_SB_.PCI0.LPCB.PGRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4919,11 +4919,11 @@ Device (LNKH) { - Name (_HID, EisaId ("PNP0C0F")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID Name (_UID, 0x08) // _UID: Unique ID Method (_DIS, 0, Serialized) // _DIS: Disable Device { - Store (0x80, PHRC) + Store (0x80, PHRC) /* \_SB_.PCI0.LPCB.PHRC */ } Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings @@ -4939,9 +4939,9 @@ {} }) CreateWordField (RTLH, One, IRQ0) - Store (Zero, IRQ0) - ShiftLeft (One, And (PHRC, 0x0F), IRQ0) - Return (RTLH) + Store (Zero, IRQ0) /* \_SB_.PCI0.LPCB.LNKH._CRS.IRQ0 */ + ShiftLeft (One, And (PHRC, 0x0F), IRQ0) /* \_SB_.PCI0.LPCB.LNKH._CRS.IRQ0 */ + Return (RTLH) /* \_SB_.PCI0.LPCB.LNKH._CRS.RTLH */ } Method (_SRS, 1, Serialized) // _SRS: Set Resource Settings @@ -4949,7 +4949,7 @@ CreateWordField (Arg0, One, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) - Store (Local0, PHRC) + Store (Local0, PHRC) /* \_SB_.PCI0.LPCB.PHRC */ } Method (_STA, 0, Serialized) // _STA: Status @@ -4967,7 +4967,7 @@ Device (DMAC) { - Name (_HID, EisaId ("PNP0200")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0200") /* PC-class DMA Controller */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5001,7 +5001,7 @@ Device (FWHD) { - Name (_HID, EisaId ("INT0800")) // _HID: Hardware ID + Name (_HID, EisaId ("INT0800") /* Intel 82802 Firmware Hub Device */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { Memory32Fixed (ReadOnly, @@ -5013,8 +5013,8 @@ Device (HPET) { - Name (_HID, EisaId ("PNP0103")) // _HID: Hardware ID - Name (_CID, EisaId ("PNP0C01")) // _CID: Compatible ID + Name (_HID, EisaId ("PNP0103") /* HPET System Timer */) // _HID: Hardware ID + Name (_CID, EisaId ("PNP0C01") /* System Board */) // _CID: Compatible ID Name (BUF0, ResourceTemplate () { Memory32Fixed (ReadOnly, @@ -5049,27 +5049,27 @@ CreateDWordField (BUF0, \_SB.PCI0.LPCB.HPET._Y14._BAS, HPT0) // _BAS: Base Address If (LEqual (HPAS, One)) { - Store (0xFED01000, HPT0) + Store (0xFED01000, HPT0) /* \_SB_.PCI0.LPCB.HPET._CRS.HPT0 */ } If (LEqual (HPAS, 0x02)) { - Store (0xFED02000, HPT0) + Store (0xFED02000, HPT0) /* \_SB_.PCI0.LPCB.HPET._CRS.HPT0 */ } If (LEqual (HPAS, 0x03)) { - Store (0xFED03000, HPT0) + Store (0xFED03000, HPT0) /* \_SB_.PCI0.LPCB.HPET._CRS.HPT0 */ } } - Return (BUF0) + Return (BUF0) /* \_SB_.PCI0.LPCB.HPET.BUF0 */ } } Device (IPIC) { - Name (_HID, EisaId ("PNP0000")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0000") /* 8259-compatible Programmable Interrupt Controller */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5181,7 +5181,7 @@ Device (MATH) { - Name (_HID, EisaId ("PNP0C04")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C04") /* x87-compatible Floating Point Processing Unit */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5197,7 +5197,7 @@ Device (LDRC) { - Name (_HID, EisaId ("PNP0C02")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */) // _HID: Hardware ID Name (_UID, 0x02) // _UID: Unique ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { @@ -5296,7 +5296,7 @@ Device (RTC) { - Name (_HID, EisaId ("PNP0B00")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5312,7 +5312,7 @@ Device (TIMR) { - Name (_HID, EisaId ("PNP0100")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0100") /* PC-class System Timer */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5334,15 +5334,15 @@ Device (ACAD) { - Name (_HID, "ACPI0003") // _HID: Hardware ID + Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB }) Method (_PSR, 0, NotSerialized) // _PSR: Power Source { - Store (One, ACPW) - Return (ACPW) + Store (One, ACPW) /* \ACPW */ + Return (ACPW) /* \ACPW */ } } @@ -5360,7 +5360,7 @@ Device (EC0) { - Name (_HID, EisaId ("PNP0C09")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */) // _HID: Hardware ID Name (_GPE, 0x1C) // _GPE: General Purpose Events Name (Z009, Zero) Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings @@ -5382,13 +5382,13 @@ { If (LEqual (Arg0, 0x03)) { - Store (Arg1, Z009) + Store (Arg1, Z009) /* \_SB_.PCI0.LPCB.EC0_.Z009 */ If (CondRefOf (_OSI, Local0)) { - Store (Zero, BTDS) + Store (Zero, BTDS) /* \_SB_.PCI0.LPCB.EC0_.BTDS */ If (_OSI ("Windows 2006")) { - Store (One, BTDS) + Store (One, BTDS) /* \_SB_.PCI0.LPCB.EC0_.BTDS */ } } } @@ -5559,27 +5559,27 @@ Method (_Q11, 0, NotSerialized) // _Qxx: EC Query { - Store (0x87, P80H) + Store (0x87, P80H) /* \P80H */ If (IGDS) { ^^^GFX0.BRTN (0x87) } Else { - Notify (^^^PEGP.VGA.LCD, 0x87) + Notify (^^^PEGP.VGA.LCD, 0x87) // Device-Specific } } Method (_Q12, 0, NotSerialized) // _Qxx: EC Query { - Store (0x86, P80H) + Store (0x86, P80H) /* \P80H */ If (IGDS) { ^^^GFX0.BRTN (0x86) } Else { - Notify (^^^PEGP.VGA.LCD, 0x86) + Notify (^^^PEGP.VGA.LCD, 0x86) // Device-Specific } } @@ -5597,7 +5597,7 @@ ^^^PEGP.VGA.DSSW () } - Store (Zero, VIDO) + Store (Zero, VIDO) /* \_SB_.PCI0.LPCB.EC0_.VIDO */ } } @@ -5617,9 +5617,9 @@ { Store ("=====QUERY_25=====", Debug) Sleep (0x03E8) - Notify (^^BAT1, 0x81) + Notify (^^BAT1, 0x81) // Information Change Sleep (0x03E8) - Notify (^^BAT1, 0x80) + Notify (^^BAT1, 0x80) // Status Change } Method (_Q34, 0, NotSerialized) // _Qxx: EC Query @@ -5628,37 +5628,37 @@ If (BKEY) { PHSS (0x71) - Store (Zero, BKEY) + Store (Zero, BKEY) /* \_SB_.PCI0.LPCB.EC0_.BKEY */ } } Method (_Q37, 0, NotSerialized) // _Qxx: EC Query { Store ("=====QUERY_37=====", Debug) - Notify (ACAD, 0x80) + Notify (ACAD, 0x80) // Status Change Sleep (0x03E8) - Notify (^^BAT1, 0x80) + Notify (^^BAT1, 0x80) // Status Change } Method (_Q38, 0, NotSerialized) // _Qxx: EC Query { Store ("=====QUERY_38=====", Debug) - Notify (ACAD, 0x80) + Notify (ACAD, 0x80) // Status Change Sleep (0x03E8) - Notify (^^BAT1, 0x80) + Notify (^^BAT1, 0x80) // Status Change } Method (_Q2D, 0, NotSerialized) // _Qxx: EC Query { Store ("=====QUERY_2D=====", Debug) - Store (Zero, DTSM) + Store (Zero, DTSM) /* \DTSM */ TRAP (0x46) } Method (_Q2E, 0, NotSerialized) // _Qxx: EC Query { Store ("=====QUERY_2E=====", Debug) - Store (One, DTSM) + Store (One, DTSM) /* \DTSM */ TRAP (0x46) } @@ -5698,7 +5698,7 @@ Method (FANG, 1, NotSerialized) { Acquire (FAMX, 0xFFFF) - Store (Arg0, ERIB) + Store (Arg0, ERIB) /* \_SB_.PCI0.LPCB.EC0_.ERIB */ Store (ERBD, Local0) Release (FAMX) Return (Local0) @@ -5707,8 +5707,8 @@ Method (FANW, 2, NotSerialized) { Acquire (FAMX, 0xFFFF) - Store (Arg0, ERIB) - Store (Arg1, ERBD) + Store (Arg0, ERIB) /* \_SB_.PCI0.LPCB.EC0_.ERIB */ + Store (Arg1, ERBD) /* \_SB_.PCI0.LPCB.EC0_.ERBD */ Release (FAMX) Return (Arg1) } @@ -5722,19 +5722,19 @@ { If (LEqual (Arg0, Zero)) { - Return (THEN) + Return (THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ } Else { If (LEqual (Arg0, One)) { - Return (DUTY) + Return (DUTY) /* \_SB_.PCI0.LPCB.EC0_.DUTY */ } Else { If (LEqual (Arg0, 0x02)) { - Return (TTHR) + Return (TTHR) /* \_SB_.PCI0.LPCB.EC0_.TTHR */ } Else { @@ -5748,16 +5748,16 @@ { If (LEqual (Arg0, Zero)) { - Store (Zero, THEN) - Store (Zero, FTT) + Store (Zero, THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ + Store (Zero, FTT) /* \_SB_.PCI0.LPCB.EC0_.FTT_ */ } Else { - Store (Arg0, DUTY) - Store (One, THEN) + Store (Arg0, DUTY) /* \_SB_.PCI0.LPCB.EC0_.DUTY */ + Store (One, THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ } - Return (THEN) + Return (THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ } Method (PCLK, 0, NotSerialized) @@ -5765,23 +5765,23 @@ Store (PTVL, Local0) If (LEqual (Local0, Zero)) { - Store (Zero, THEN) - Store (Zero, FTT) + Store (Zero, THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ + Store (Zero, FTT) /* \_SB_.PCI0.LPCB.EC0_.FTT_ */ } Else { Decrement (Local0) Store (Not (Local0), Local1) And (Local1, 0x07, Local1) - Store (Local1, DUTY) - Store (One, THEN) + Store (Local1, DUTY) /* \_SB_.PCI0.LPCB.EC0_.DUTY */ + Store (One, THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */ } } } Device (BAT1) { - Name (_HID, EisaId ("PNP0C0A")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID Name (_PCL, Package (0x01) // _PCL: Power Consumer List { @@ -5843,7 +5843,7 @@ } Sleep (0x14) - Store (^^EC0.BDC0, BFC1) + Store (^^EC0.BDC0, BFC1) /* \BFC1 */ Sleep (0x14) } Else @@ -5855,12 +5855,12 @@ { Divide (BFC1, 0x64, Local0, Local1) Multiply (Local1, 0x64, Local1) - Store (Local1, BFC1) + Store (Local1, BFC1) /* \BFC1 */ Store (Local1, Index (STAT, One)) Store (Local1, Index (STAT, 0x02)) } - Return (STAT) + Return (STAT) /* \_SB_.PCI0.LPCB.BAT1._BIF.STAT */ } Method (_BST, 0, NotSerialized) // _BST: Battery Status @@ -5876,9 +5876,9 @@ If (LAnd (ECOK (), LEqual (ECDY, Zero))) { Sleep (0x14) - Store (^^EC0.BST0, BST1) + Store (^^EC0.BST0, BST1) /* \BST1 */ Sleep (0x14) - Store (^^EC0.GAU0, BGU1) + Store (^^EC0.GAU0, BGU1) /* \BGU1 */ Sleep (0x14) } @@ -5901,17 +5901,17 @@ Decrement (ECDY) If (LEqual (ECDY, Zero)) { - Notify (BAT1, 0x80) + Notify (BAT1, 0x80) // Status Change } } - Return (PBST) + Return (PBST) /* \_SB_.PCI0.LPCB.BAT1._BST.PBST */ } } Device (PS2K) { - Name (_HID, EisaId ("PNP0303")) // _HID: Hardware ID + Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard (101/102-key, PS/2 Mouse) */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, @@ -5982,47 +5982,47 @@ CreateDWordField (PBUF, 0x08, PIO1) CreateDWordField (PBUF, 0x0C, DMA1) CreateDWordField (PBUF, 0x10, FLAG) - Store (GETP (PRIT), PIO0) + Store (GETP (PRIT), PIO0) /* \_SB_.PCI0.PATA.PRID._GTM.PIO0 */ Store (GDMA (And (SYNC, One), And (ICR3, One), - And (ICR0, One), SDT0, And (ICR1, One)), DMA0) + And (ICR0, One), SDT0, And (ICR1, One)), DMA0) /* \_SB_.PCI0.PATA.PRID._GTM.DMA0 */ If (LEqual (DMA0, 0xFFFFFFFF)) { - Store (PIO0, DMA0) + Store (PIO0, DMA0) /* \_SB_.PCI0.PATA.PRID._GTM.DMA0 */ } If (And (PRIT, 0x4000)) { If (LEqual (And (PRIT, 0x90), 0x80)) { - Store (0x0384, PIO1) + Store (0x0384, PIO1) /* \_SB_.PCI0.PATA.PRID._GTM.PIO1 */ } Else { - Store (GETT (PSIT), PIO1) + Store (GETT (PSIT), PIO1) /* \_SB_.PCI0.PATA.PRID._GTM.PIO1 */ } } Else { - Store (0xFFFFFFFF, PIO1) + Store (0xFFFFFFFF, PIO1) /* \_SB_.PCI0.PATA.PRID._GTM.PIO1 */ } Store (GDMA (And (SYNC, 0x02), And (ICR3, 0x02), - And (ICR0, 0x02), SDT1, And (ICR1, 0x02)), DMA1) + And (ICR0, 0x02), SDT1, And (ICR1, 0x02)), DMA1) /* \_SB_.PCI0.PATA.PRID._GTM.DMA1 */ If (LEqual (DMA1, 0xFFFFFFFF)) { - Store (PIO1, DMA1) + Store (PIO1, DMA1) /* \_SB_.PCI0.PATA.PRID._GTM.DMA1 */ } Store (GETF (And (SYNC, One), And (SYNC, 0x02), - PRIT), FLAG) + PRIT), FLAG) /* \_SB_.PCI0.PATA.PRID._GTM.FLAG */ If (And (LEqual (PIO0, 0xFFFFFFFF), LEqual (DMA0, 0xFFFFFFFF))) { - Store (0x78, PIO0) - Store (0x14, DMA0) - Store (0x03, FLAG) + Store (0x78, PIO0) /* \_SB_.PCI0.PATA.PRID._GTM.PIO0 */ + Store (0x14, DMA0) /* \_SB_.PCI0.PATA.PRID._GTM.DMA0 */ + Store (0x03, FLAG) /* \_SB_.PCI0.PATA.PRID._GTM.FLAG */ } - Return (PBUF) + Return (PBUF) /* \_SB_.PCI0.PATA.PRID._GTM.PBUF */ } Method (_STM, 3, NotSerialized) // _STM: Set Timing Mode @@ -6034,100 +6034,100 @@ CreateDWordField (Arg0, 0x10, FLAG) If (LEqual (SizeOf (Arg1), 0x0200)) { - And (PRIT, 0xC0F0, PRIT) - And (SYNC, 0x02, SYNC) - Store (Zero, SDT0) - And (ICR0, 0x02, ICR0) - And (ICR1, 0x02, ICR1) - And (ICR3, 0x02, ICR3) - And (ICR5, 0x02, ICR5) + And (PRIT, 0xC0F0, PRIT) /* \_SB_.PCI0.PATA.PRIT */ + And (SYNC, 0x02, SYNC) /* \_SB_.PCI0.PATA.SYNC */ + Store (Zero, SDT0) /* \_SB_.PCI0.PATA.SDT0 */ + And (ICR0, 0x02, ICR0) /* \_SB_.PCI0.PATA.ICR0 */ + And (ICR1, 0x02, ICR1) /* \_SB_.PCI0.PATA.ICR1 */ + And (ICR3, 0x02, ICR3) /* \_SB_.PCI0.PATA.ICR3 */ + And (ICR5, 0x02, ICR5) /* \_SB_.PCI0.PATA.ICR5 */ CreateWordField (Arg1, 0x62, W490) CreateWordField (Arg1, 0x6A, W530) CreateWordField (Arg1, 0x7E, W630) CreateWordField (Arg1, 0x80, W640) CreateWordField (Arg1, 0xB0, W880) CreateWordField (Arg1, 0xBA, W930) - Or (PRIT, 0x8004, PRIT) + Or (PRIT, 0x8004, PRIT) /* \_SB_.PCI0.PATA.PRIT */ If (LAnd (And (FLAG, 0x02), And (W490, 0x0800))) { - Or (PRIT, 0x02, PRIT) + Or (PRIT, 0x02, PRIT) /* \_SB_.PCI0.PATA.PRIT */ } - Or (PRIT, SETP (PIO0, W530, W640), PRIT) + Or (PRIT, SETP (PIO0, W530, W640), PRIT) /* \_SB_.PCI0.PATA.PRIT */ If (And (FLAG, One)) { - Or (SYNC, One, SYNC) - Store (SDMA (DMA0), SDT0) + Or (SYNC, One, SYNC) /* \_SB_.PCI0.PATA.SYNC */ + Store (SDMA (DMA0), SDT0) /* \_SB_.PCI0.PATA.SDT0 */ If (LLess (DMA0, 0x1E)) { - Or (ICR3, One, ICR3) + Or (ICR3, One, ICR3) /* \_SB_.PCI0.PATA.ICR3 */ } If (LLess (DMA0, 0x3C)) { - Or (ICR0, One, ICR0) + Or (ICR0, One, ICR0) /* \_SB_.PCI0.PATA.ICR0 */ } If (And (W930, 0x2000)) { - Or (ICR1, One, ICR1) + Or (ICR1, One, ICR1) /* \_SB_.PCI0.PATA.ICR1 */ } } } If (LEqual (SizeOf (Arg2), 0x0200)) { - And (PRIT, 0xBF0F, PRIT) - Store (Zero, PSIT) - And (SYNC, One, SYNC) - Store (Zero, SDT1) - And (ICR0, One, ICR0) - And (ICR1, One, ICR1) - And (ICR3, One, ICR3) - And (ICR5, One, ICR5) + And (PRIT, 0xBF0F, PRIT) /* \_SB_.PCI0.PATA.PRIT */ + Store (Zero, PSIT) /* \_SB_.PCI0.PATA.PSIT */ + And (SYNC, One, SYNC) /* \_SB_.PCI0.PATA.SYNC */ + Store (Zero, SDT1) /* \_SB_.PCI0.PATA.SDT1 */ + And (ICR0, One, ICR0) /* \_SB_.PCI0.PATA.ICR0 */ + And (ICR1, One, ICR1) /* \_SB_.PCI0.PATA.ICR1 */ + And (ICR3, One, ICR3) /* \_SB_.PCI0.PATA.ICR3 */ + And (ICR5, One, ICR5) /* \_SB_.PCI0.PATA.ICR5 */ CreateWordField (Arg2, 0x62, W491) CreateWordField (Arg2, 0x6A, W531) CreateWordField (Arg2, 0x7E, W631) CreateWordField (Arg2, 0x80, W641) CreateWordField (Arg2, 0xB0, W881) CreateWordField (Arg2, 0xBA, W931) - Or (PRIT, 0x8040, PRIT) + Or (PRIT, 0x8040, PRIT) /* \_SB_.PCI0.PATA.PRIT */ If (LAnd (And (FLAG, 0x08), And (W491, 0x0800))) { - Or (PRIT, 0x20, PRIT) + Or (PRIT, 0x20, PRIT) /* \_SB_.PCI0.PATA.PRIT */ } If (And (FLAG, 0x10)) { - Or (PRIT, 0x4000, PRIT) + Or (PRIT, 0x4000, PRIT) /* \_SB_.PCI0.PATA.PRIT */ If (LGreater (PIO1, 0xF0)) { - Or (PRIT, 0x80, PRIT) + Or (PRIT, 0x80, PRIT) /* \_SB_.PCI0.PATA.PRIT */ } Else { - Or (PRIT, 0x10, PRIT) - Store (SETT (PIO1, W531, W641), PSIT) + Or (PRIT, 0x10, PRIT) /* \_SB_.PCI0.PATA.PRIT */ + Store (SETT (PIO1, W531, W641), PSIT) /* \_SB_.PCI0.PATA.PSIT */ } } If (And (FLAG, 0x04)) { - Or (SYNC, 0x02, SYNC) - Store (SDMA (DMA1), SDT1) + Or (SYNC, 0x02, SYNC) /* \_SB_.PCI0.PATA.SYNC */ + Store (SDMA (DMA1), SDT1) /* \_SB_.PCI0.PATA.SDT1 */ If (LLess (DMA1, 0x1E)) { - Or (ICR3, 0x02, ICR3) + Or (ICR3, 0x02, ICR3) /* \_SB_.PCI0.PATA.ICR3 */ } If (LLess (DMA1, 0x3C)) { - Or (ICR0, 0x02, ICR0) + Or (ICR0, 0x02, ICR0) /* \_SB_.PCI0.PATA.ICR0 */ } If (And (W931, 0x2000)) { - Or (ICR1, 0x02, ICR1) + Or (ICR1, 0x02, ICR1) /* \_SB_.PCI0.PATA.ICR1 */ } } } @@ -6149,52 +6149,52 @@ { If (LEqual (And (PRIT, 0x09), 0x08)) { - Store (0x08, PMD0) + Store (0x08, PMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PMD0 */ } Else { - Store (0x0A, PMD0) + Store (0x0A, PMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PMD0 */ ShiftRight (And (PRIT, 0x0300), 0x08, Local0) ShiftRight (And (PRIT, 0x3000), 0x0C, Local1) Add (Local0, Local1, Local2) If (LEqual (0x03, Local2)) { - Store (0x0B, PMD0) + Store (0x0B, PMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PMD0 */ } If (LEqual (0x05, Local2)) { - Store (0x0C, PMD0) + Store (0x0C, PMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PMD0 */ } } } Else { - Store (One, PMD0) + Store (One, PMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PMD0 */ } If (And (SYNC, One)) { - Store (Or (SDT0, 0x40), DMD0) + Store (Or (SDT0, 0x40), DMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.DMD0 */ If (And (ICR1, One)) { If (And (ICR0, One)) { - Add (DMD0, 0x02, DMD0) + Add (DMD0, 0x02, DMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.DMD0 */ } If (And (ICR3, One)) { - Store (0x45, DMD0) + Store (0x45, DMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.DMD0 */ } } } Else { - Or (Subtract (And (PMD0, 0x07), 0x02), 0x20, DMD0) + Or (Subtract (And (PMD0, 0x07), 0x02), 0x20, DMD0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.DMD0 */ } - Return (PIB0) + Return (PIB0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PIB0 */ } } @@ -6214,7 +6214,7 @@ { If (LEqual (And (PRIT, 0x90), 0x80)) { - Store (0x08, PMD1) + Store (0x08, PMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PMD1 */ } Else { @@ -6222,48 +6222,48 @@ 0x02), Local0) If (LEqual (0x05, Local0)) { - Store (0x0C, PMD1) + Store (0x0C, PMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PMD1 */ } Else { If (LEqual (0x03, Local0)) { - Store (0x0B, PMD1) + Store (0x0B, PMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PMD1 */ } Else { - Store (0x0A, PMD1) + Store (0x0A, PMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PMD1 */ } } } } Else { - Store (One, PMD1) + Store (One, PMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PMD1 */ } If (And (SYNC, 0x02)) { - Store (Or (SDT1, 0x40), DMD1) + Store (Or (SDT1, 0x40), DMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.DMD1 */ If (And (ICR1, 0x02)) { If (And (ICR0, 0x02)) { - Add (DMD1, 0x02, DMD1) + Add (DMD1, 0x02, DMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.DMD1 */ } If (And (ICR3, 0x02)) { - Store (0x45, DMD1) + Store (0x45, DMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.DMD1 */ } } } Else { - Or (Subtract (And (PMD1, 0x07), 0x02), 0x20, DMD1) + Or (Subtract (And (PMD1, 0x07), 0x02), 0x20, DMD1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.DMD1 */ } - Return (PIB1) + Return (PIB1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PIB1 */ } } } @@ -6334,14 +6334,14 @@ Return (Zero) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (0x48, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Arg0, TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (0x48, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Return (One) } @@ -6355,14 +6355,14 @@ Return (0xFFFF) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (0x44, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Or (Arg0, One), TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (0x44, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) - Return (DAT0) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Return (DAT0) /* \_SB_.PCI0.SBUS.DAT0 */ } Return (0xFFFF) @@ -6375,15 +6375,15 @@ Return (Zero) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (Arg2, DAT0) - Store (0x48, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Arg0, TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (Arg2, DAT0) /* \_SB_.PCI0.SBUS.DAT0 */ + Store (0x48, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Return (One) } @@ -6397,15 +6397,15 @@ Return (0xFFFF) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x48, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Or (Arg0, One), TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (0x48, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) - Return (DAT0) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Return (DAT0) /* \_SB_.PCI0.SBUS.DAT0 */ } Return (0xFFFF) @@ -6418,16 +6418,16 @@ Return (Zero) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - And (Arg2, 0xFF, DAT0) - And (ShiftRight (Arg2, 0x08), 0xFF, DAT1) - Store (0x4C, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Arg0, TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + And (Arg2, 0xFF, DAT0) /* \_SB_.PCI0.SBUS.DAT0 */ + And (ShiftRight (Arg2, 0x08), 0xFF, DAT1) /* \_SB_.PCI0.SBUS.DAT1 */ + Store (0x4C, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Return (One) } @@ -6441,14 +6441,14 @@ Return (0xFFFF) } - Store (Zero, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x4C, HCON) + Store (Zero, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Or (Arg0, One), TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (0x4C, HCON) /* \_SB_.PCI0.SBUS.HCON */ If (COMP ()) { - Or (HSTS, 0xFF, HSTS) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Return (Or (ShiftLeft (DAT1, 0x08), DAT0)) } @@ -6462,14 +6462,14 @@ Return (Zero) } - Store (Arg3, I2CE) - Store (0xBF, HSTS) - Store (Arg0, TXSA) - Store (Arg1, HCOM) - Store (SizeOf (Arg2), DAT0) + Store (Arg3, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Arg0, TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (SizeOf (Arg2), DAT0) /* \_SB_.PCI0.SBUS.DAT0 */ Store (Zero, Local1) - Store (DerefOf (Index (Arg2, Zero)), HBDR) - Store (0x54, HCON) + Store (DerefOf (Index (Arg2, Zero)), HBDR) /* \_SB_.PCI0.SBUS.HBDR */ + Store (0x54, HCON) /* \_SB_.PCI0.SBUS.HCON */ While (LGreater (SizeOf (Arg2), Local1)) { Store (0x0FA0, Local0) @@ -6485,17 +6485,17 @@ Return (Zero) } - Store (0x80, HSTS) + Store (0x80, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Increment (Local1) If (LGreater (SizeOf (Arg2), Local1)) { - Store (DerefOf (Index (Arg2, Local1)), HBDR) + Store (DerefOf (Index (Arg2, Local1)), HBDR) /* \_SB_.PCI0.SBUS.HBDR */ } } If (COMP ()) { - Or (HSTS, 0xFF, HSTS) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Return (One) } @@ -6510,11 +6510,11 @@ Return (Zero) } - Store (Arg2, I2CE) - Store (0xBF, HSTS) - Store (Or (Arg0, One), TXSA) - Store (Arg1, HCOM) - Store (0x54, HCON) + Store (Arg2, I2CE) /* \_SB_.PCI0.SBUS.I2CE */ + Store (0xBF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Store (Or (Arg0, One), TXSA) /* \_SB_.PCI0.SBUS.TXSA */ + Store (Arg1, HCOM) /* \_SB_.PCI0.SBUS.HCOM */ + Store (0x54, HCON) /* \_SB_.PCI0.SBUS.HCON */ Store (0x0FA0, Local0) While (LAnd (LNot (And (HSTS, 0x80)), Local0)) { @@ -6529,7 +6529,7 @@ } Store (DAT0, Index (TBUF, Zero)) - Store (0x80, HSTS) + Store (0x80, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Store (One, Local1) While (LLess (Local1, DerefOf (Index (TBUF, Zero)))) { @@ -6547,14 +6547,14 @@ } Store (HBDR, Index (TBUF, Local1)) - Store (0x80, HSTS) + Store (0x80, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ Increment (Local1) } If (COMP ()) { - Or (HSTS, 0xFF, HSTS) - Return (TBUF) + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ + Return (TBUF) /* \_SB_.PCI0.SBUS.SBLR.TBUF */ } Return (Zero) @@ -6626,8 +6626,8 @@ Method (KILL, 0, Serialized) { - Or (HCON, 0x02, HCON) - Or (HSTS, 0xFF, HSTS) + Or (HCON, 0x02, HCON) /* \_SB_.PCI0.SBUS.HCON */ + Or (HSTS, 0xFF, HSTS) /* \_SB_.PCI0.SBUS.HSTS */ } } } diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/SSDT0.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/SSDT0.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/SSDT0.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/SSDT0.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_SSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_SSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "SSDT" @@ -16,7 +16,7 @@ * Compiler ID "INTL" * Compiler Version 0x20050624 (537200164) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_SSDT.aml", "SSDT", 1, "SataRe", "SataAhci", 0x00001000) +DefinitionBlock ("/tmp/fwts_iasl_27987_SSDT.aml", "SSDT", 1, "SataRe", "SataAhci", 0x00001000) { External (_SB_.PCI0.SATA, DeviceObj) @@ -47,24 +47,24 @@ CreateWordField (Arg0, 0x9C, W780) If (And (W780, 0x08)) { - Store (0x10, GB00) - Store (0x03, GB01) - Store (0xEF, GB06) + Store (0x10, GB00) /* \_SB_.PCI0.SATA.PRT0._SDD.GB00 */ + Store (0x03, GB01) /* \_SB_.PCI0.SATA.PRT0._SDD.GB01 */ + Store (0xEF, GB06) /* \_SB_.PCI0.SATA.PRT0._SDD.GB06 */ } Else { - Store (0x90, GB00) - Store (0x03, GB01) - Store (0xEF, GB06) + Store (0x90, GB00) /* \_SB_.PCI0.SATA.PRT0._SDD.GB00 */ + Store (0x03, GB01) /* \_SB_.PCI0.SATA.PRT0._SDD.GB01 */ + Store (0xEF, GB06) /* \_SB_.PCI0.SATA.PRT0._SDD.GB06 */ } } - Store (GBU0, GTF0) + Store (GBU0, GTF0) /* External reference */ } Method (_GTF, 0, NotSerialized) // _GTF: Get Task File { - Return (GTF0) + Return (GTF0) /* External reference */ } } @@ -89,24 +89,24 @@ CreateWordField (Arg0, 0x9C, W781) If (And (W781, 0x08)) { - Store (0x10, GB10) - Store (0x03, GB11) - Store (0xEF, GB16) + Store (0x10, GB10) /* \_SB_.PCI0.SATA.PRT1._SDD.GB10 */ + Store (0x03, GB11) /* \_SB_.PCI0.SATA.PRT1._SDD.GB11 */ + Store (0xEF, GB16) /* \_SB_.PCI0.SATA.PRT1._SDD.GB16 */ } Else { - Store (0x90, GB10) - Store (0x03, GB11) - Store (0xEF, GB16) + Store (0x90, GB10) /* \_SB_.PCI0.SATA.PRT1._SDD.GB10 */ + Store (0x03, GB11) /* \_SB_.PCI0.SATA.PRT1._SDD.GB11 */ + Store (0xEF, GB16) /* \_SB_.PCI0.SATA.PRT1._SDD.GB16 */ } } - Store (GBU1, GTF1) + Store (GBU1, GTF1) /* External reference */ } Method (_GTF, 0, NotSerialized) // _GTF: Get Task File { - Return (GTF1) + Return (GTF1) /* External reference */ } } @@ -131,24 +131,24 @@ CreateWordField (Arg0, 0x9C, W782) If (And (W782, 0x08)) { - Store (0x10, GB20) - Store (0x03, GB21) - Store (0xEF, GB26) + Store (0x10, GB20) /* \_SB_.PCI0.SATA.PRT2._SDD.GB20 */ + Store (0x03, GB21) /* \_SB_.PCI0.SATA.PRT2._SDD.GB21 */ + Store (0xEF, GB26) /* \_SB_.PCI0.SATA.PRT2._SDD.GB26 */ } Else { - Store (0x90, GB20) - Store (0x03, GB21) - Store (0xEF, GB26) + Store (0x90, GB20) /* \_SB_.PCI0.SATA.PRT2._SDD.GB20 */ + Store (0x03, GB21) /* \_SB_.PCI0.SATA.PRT2._SDD.GB21 */ + Store (0xEF, GB26) /* \_SB_.PCI0.SATA.PRT2._SDD.GB26 */ } } - Store (GBU2, GTF2) + Store (GBU2, GTF2) /* External reference */ } Method (_GTF, 0, NotSerialized) // _GTF: Get Task File { - Return (GTF2) + Return (GTF2) /* External reference */ } } } diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/SSDT1.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/SSDT1.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/SSDT1.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/SSDT1.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_SSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_SSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "SSDT" @@ -16,11 +16,11 @@ * Compiler ID "INTL" * Compiler Version 0x20050624 (537200164) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_SSDT.aml", "SSDT", 1, "BrtRef", "DD01BRT", 0x00001000) +DefinitionBlock ("/tmp/fwts_iasl_27987_SSDT.aml", "SSDT", 1, "BrtRef", "DD01BRT", 0x00001000) { External (_SB_.PCI0.GFX0.DD03, DeviceObj) - External (_SB_.PCI0.LPCB.EC0_.BRTS) + External (_SB_.PCI0.LPCB.EC0_.BRTS, UnknownObj) Scope (\_SB.PCI0.GFX0.DD03) { @@ -44,7 +44,7 @@ Method (_BCM, 1, NotSerialized) // _BCM: Brightness Control Method { Divide (Arg0, 0x0A, Local0, Local1) - Store (Local1, \_SB.PCI0.LPCB.EC0.BRTS) + Store (Local1, \_SB.PCI0.LPCB.EC0.BRTS) /* External reference */ } Method (_BQC, 0, NotSerialized) // _BQC: Brightness Query Current diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/SSDT2.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/SSDT2.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/SSDT2.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/SSDT2.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_SSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_SSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "SSDT" @@ -16,13 +16,13 @@ * Compiler ID "INTL" * Compiler Version 0x20050624 (537200164) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_SSDT.aml", "SSDT", 1, "PmRef", "Cpu0Tst", 0x00003000) +DefinitionBlock ("/tmp/fwts_iasl_27987_SSDT.aml", "SSDT", 1, "PmRef", "Cpu0Tst", 0x00003000) { External (_PR_.CPU0, DeviceObj) External (_PSS, IntObj) - External (CFGD) - External (PDC0) + External (CFGD, UnknownObj) + External (PDC0, UnknownObj) Scope (\_PR.CPU0) { @@ -243,15 +243,15 @@ Increment (Local3) } - Store (Ones, TSSF) + Store (Ones, TSSF) /* \_PR_.CPU0.TSSF */ } If (And (PDC0, 0x04)) { - Return (TSSM) + Return (TSSM) /* \_PR_.CPU0.TSSM */ } - Return (TSSI) + Return (TSSI) /* \_PR_.CPU0.TSSI */ } Method (_TSD, 0, NotSerialized) // _TSD: Throttling State Dependencies diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/SSDT3.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/SSDT3.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/SSDT3.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/SSDT3.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_SSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_SSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "SSDT" @@ -16,26 +16,26 @@ * Compiler ID "INTL" * Compiler Version 0x20050624 (537200164) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_SSDT.aml", "SSDT", 1, "PmRef", "Cpu1Tst", 0x00003000) +DefinitionBlock ("/tmp/fwts_iasl_27987_SSDT.aml", "SSDT", 1, "PmRef", "Cpu1Tst", 0x00003000) { External (_PR_.CPU0._PTC, IntObj) External (_PR_.CPU0._TSS, IntObj) External (_PR_.CPU1, DeviceObj) - External (CFGD) - External (PDC1) + External (CFGD, UnknownObj) + External (PDC1, UnknownObj) Scope (\_PR.CPU1) { Name (_TPC, 0x00) // _TPC: Throttling Present Capabilities Method (_PTC, 0, NotSerialized) // _PTC: Processor Throttling Control { - Return (\_PR.CPU0._PTC) + Return (\_PR.CPU0._PTC) /* External reference */ } Method (_TSS, 0, NotSerialized) // _TSS: Throttling Supported States { - Return (\_PR.CPU0._TSS) + Return (\_PR.CPU0._TSS) /* External reference */ } Method (_TSD, 0, NotSerialized) // _TSD: Throttling State Dependencies diff -Nru fwts-14.03.00/fwts-test/disassemble-0001/SSDT4.dsl.original fwts-14.03.01/fwts-test/disassemble-0001/SSDT4.dsl.original --- fwts-14.03.00/fwts-test/disassemble-0001/SSDT4.dsl.original 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/disassemble-0001/SSDT4.dsl.original 2014-03-27 02:14:17.000000000 +0000 @@ -1,9 +1,9 @@ /* * Intel ACPI Component Architecture - * AML Disassembler version 20130418-64 [May 2 2013] + * AML Disassembler version 20140325-64 [Mar 25 2014] * Copyright (c) 2000 - 2014 Intel Corporation * - * Disassembly of /tmp/fwts_iasl_12884_SSDT.dat, Fri May 3 09:41:56 2013 + * Disassembly of /tmp/fwts_iasl_27987_SSDT.dat, Tue Mar 25 20:18:15 2014 * * Original Table Header: * Signature "SSDT" @@ -16,13 +16,13 @@ * Compiler ID "INTL" * Compiler Version 0x20050624 (537200164) */ -DefinitionBlock ("/tmp/fwts_iasl_12884_SSDT.aml", "SSDT", 1, "PmRef", "CpuPm", 0x00003000) +DefinitionBlock ("/tmp/fwts_iasl_27987_SSDT.aml", "SSDT", 1, "PmRef", "CpuPm", 0x00003000) { External (_PR_.CPU0, DeviceObj) External (_PR_.CPU1, DeviceObj) - External (PCP0) - External (PCP1) + External (PCP0, UnknownObj) + External (PCP1, UnknownObj) Scope (\) { @@ -90,27 +90,27 @@ If (LNot (LAnd (LAnd (LEqual (IID0, EID0), LEqual (IID1, EID1)), LAnd (LEqual (IID2, EID2), LEqual (IID3, EID3))))) { - Store (0x06, STS0) + Store (0x06, STS0) /* \_PR_.CPU0._OSC.STS0 */ Return (Arg3) } If (LNotEqual (Arg1, 0x01)) { - Store (0x0A, STS0) + Store (0x0A, STS0) /* \_PR_.CPU0._OSC.STS0 */ Return (Arg3) } - Or (And (PDC0, 0x7FFFFFFF), CAP0, PDC0) - Store (And (PDC0, 0xFF), PCP0) + Or (And (PDC0, 0x7FFFFFFF), CAP0, PDC0) /* \PDC0 */ + Store (And (PDC0, 0xFF), PCP0) /* External reference */ If (And (CFGD, 0x01)) { If (LAnd (LAnd (And (CFGD, 0x01000000), LEqual (And (PDC0, 0x09), 0x09)), LNot (And (SDTL, 0x01)))) { - Or (SDTL, 0x01, SDTL) + Or (SDTL, 0x01, SDTL) /* \SDTL */ OperationRegion (IST0, SystemMemory, DerefOf (Index (SSDT, 0x01)), DerefOf (Index (SSDT, 0x02 ))) - Load (IST0, HI0) + Load (IST0, HI0) /* \_PR_.CPU0.HI0_ */ } } @@ -119,10 +119,10 @@ If (LAnd (LAnd (And (CFGD, 0x01000000), And (PDC0, 0x18 )), LNot (And (SDTL, 0x02)))) { - Or (SDTL, 0x02, SDTL) + Or (SDTL, 0x02, SDTL) /* \SDTL */ OperationRegion (CST0, SystemMemory, DerefOf (Index (SSDT, 0x07)), DerefOf (Index (SSDT, 0x08 ))) - Load (CST0, HC0) + Load (CST0, HC0) /* \_PR_.CPU0.HC0_ */ } } @@ -173,27 +173,27 @@ If (LNot (LAnd (LAnd (LEqual (IID0, EID0), LEqual (IID1, EID1)), LAnd (LEqual (IID2, EID2), LEqual (IID3, EID3))))) { - Store (0x06, STS1) + Store (0x06, STS1) /* \_PR_.CPU1._OSC.STS1 */ Return (Arg3) } If (LNotEqual (Arg1, 0x01)) { - Store (0x0A, STS1) + Store (0x0A, STS1) /* \_PR_.CPU1._OSC.STS1 */ Return (Arg3) } - Or (And (PDC1, 0x7FFFFFFF), CAP1, PDC1) - Store (And (PDC1, 0xFF), PCP1) + Or (And (PDC1, 0x7FFFFFFF), CAP1, PDC1) /* \PDC1 */ + Store (And (PDC1, 0xFF), PCP1) /* External reference */ If (And (CFGD, 0x01)) { If (LAnd (LAnd (And (CFGD, 0x01000000), LEqual (And (PDC1, 0x09), 0x09)), LNot (And (SDTL, 0x10)))) { - Or (SDTL, 0x10, SDTL) + Or (SDTL, 0x10, SDTL) /* \SDTL */ OperationRegion (IST1, SystemMemory, DerefOf (Index (SSDT, 0x04)), DerefOf (Index (SSDT, 0x05 ))) - Load (IST1, HI1) + Load (IST1, HI1) /* \_PR_.CPU1.HI1_ */ } } @@ -202,10 +202,10 @@ If (LAnd (LAnd (And (CFGD, 0x01000000), And (PDC1, 0x18 )), LNot (And (SDTL, 0x20)))) { - Or (SDTL, 0x20, SDTL) + Or (SDTL, 0x20, SDTL) /* \SDTL */ OperationRegion (CST1, SystemMemory, DerefOf (Index (SSDT, 0x0A)), DerefOf (Index (SSDT, 0x0B ))) - Load (CST1, HC1) + Load (CST1, HC1) /* \_PR_.CPU1.HC1_ */ } } diff -Nru fwts-14.03.00/fwts-test/klog-0001/klog-0001.log fwts-14.03.01/fwts-test/klog-0001/klog-0001.log --- fwts-14.03.00/fwts-test/klog-0001/klog-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/klog-0001/klog-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -2921,7 +2921,7 @@ klog checksum, this could be a BIOS bug or due to table klog corruption. klog -klog FAILED [HIGH] KlogAcpiMissingBqc: Test 1, HIGH Kernel +klog FAILED [LOW] KlogAcpiMissingBqc: Test 1, LOW Kernel klog message: [ 0.094856] [Firmware Bug]: ACPI: No _BQC method, klog cannot determine initial brightness klog diff -Nru fwts-14.03.00/fwts-test/klog-0001/klog-0002.log fwts-14.03.01/fwts-test/klog-0001/klog-0002.log --- fwts-14.03.00/fwts-test/klog-0001/klog-0002.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/klog-0001/klog-0002.log 2014-03-27 02:14:17.000000000 +0000 @@ -30,7 +30,7 @@ summary klog: CRITICAL Kernel message: [ 1.371180] ACPI Error (psparse-0537): Method parse/execution failed [_SB_._OSC] (Node ffff88044b85e4a0), AE_AML_BUFFER_LIMIT summary klog: CRITICAL Kernel message: [ 2.949716] ACPI Error: Method parse/execution failed [_SB_._OSC] (Node ffff880297016ca8), AE_AML_BUFFER_LIMIT (20110112/psparse-536) summary -summary High failures: 1222 +summary High failures: 1221 summary klog: HIGH Kernel message: [ 0.000000] ACPI: BIOS bug: multiple APIC/MADT found, using 0 summary klog: HIGH Kernel message: [ 0.000000] ACPI Error: 32/64X address mismatch in Gpe0Block: 00008018/0000000000008028, using 32 (20090903/tbfadt-427) summary klog: HIGH Kernel message: [ 0.000000] ACPI Error: 32/64X address mismatch in Gpe0Block: 00008020/0000000000008028, using 32 (20090903/tbfadt-427) @@ -279,7 +279,6 @@ summary klog: HIGH Kernel message: [ 0.092570] ACPI Error (psparse-0537): Method parse/execution failed [_PR_.CPU2.GCAP] (Node f701e270), AE_NO_MEMORY summary klog: HIGH Kernel message: [ 0.092612] ACPI Error (psparse-0537): Method parse/execution failed [_PR_.CPU2._PDC] (Node f701e240), AE_NO_MEMORY summary klog: HIGH Kernel message: [ 0.093544] ACPI Error: Needed type [Reference], found [Device] f7019f90 (20100428/exresop-104) -summary klog: HIGH Kernel message: [ 0.094856] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness summary klog: HIGH Kernel message: [ 0.095719] ACPI Error: Could not map memory at 0x0000000087127520, size 463 (20110112/exregion-178) summary klog: HIGH Kernel message: [ 0.095737] ACPI Error: Method parse/execution failed [_PR_.CPU1.APPT] (Node f383e498), AE_NO_MEMORY (20110112/psparse-536) summary klog: HIGH Kernel message: [ 0.095749] ACPI Error: Method parse/execution failed [_PR_.CPU1.GCAP] (Node f383e468), AE_NO_MEMORY (20110112/psparse-536) @@ -1587,7 +1586,8 @@ summary klog: MEDIUM Kernel message: [ 3.644168] ACPI Warning: Incorrect checksum in table [TCPA] - 0xF8, should be 0x9C (20110413/tbutils-314) summary klog: MEDIUM Kernel message: [ 4.046031] ACPI Warning: Incorrect checksum in table [OEMB] - 4A, should be 47 (20090903/tbutils-314) summary -summary Low failures: 13 +summary Low failures: 14 +summary klog: LOW Kernel message: [ 0.094856] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness summary klog: LOW Kernel message: [ 0.810246] [Firmware Bug]: ACPI(Z01I) defines _DOD but not _DOS summary klog: LOW Kernel message: [ 1.183989] [Firmware Bug]: ACPI(PEGD) defines _DOD but not _DOS summary klog: LOW Kernel message: [ 1.398000] [Firmware Bug]: ACPI(Z00P) defines _DOD but not _DOS diff -Nru fwts-14.03.00/fwts-test/method-0001/method-0001.log fwts-14.03.01/fwts-test/method-0001/method-0001.log --- fwts-14.03.00/fwts-test/method-0001/method-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/method-0001/method-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -701,35 +701,35 @@ method _FST. method method Test 115 of 155: Test _ACx (Active Cooling). -method PASSED: Test 115, \_SB_.PCI0.LPCB.EC0_.BAC0 correctly -method returned a sane looking return type. +method SKIPPED: Test 115, Skipping test for non-existant object +method _AC0. method -method PASSED: Test 115, \_SB_.PCI0.LPCB.EC0_.BAC1 correctly -method returned a sane looking return type. +method SKIPPED: Test 115, Skipping test for non-existant object +method _AC1. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC2. +method _AC2. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC3. +method _AC3. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC4. +method _AC4. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC5. +method _AC5. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC6. +method _AC6. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC7. +method _AC7. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC8. +method _AC8. method method SKIPPED: Test 115, Skipping test for non-existant object -method AC9. +method _AC9. method method method Test 116 of 155: Test _CRT (Critical Trip Point). @@ -1127,6 +1127,6 @@ method _SRV. method method ========================================================== -method 237 passed, 0 failed, 0 warning, 0 aborted, 121 skipped, 0 +method 235 passed, 0 failed, 0 warning, 0 aborted, 123 skipped, 0 method info only. method ========================================================== diff -Nru fwts-14.03.00/fwts-test/osilinux-0001/osilinux-0001.log fwts-14.03.01/fwts-test/osilinux-0001/osilinux-0001.log --- fwts-14.03.00/fwts-test/osilinux-0001/osilinux-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/osilinux-0001/osilinux-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -8,24 +8,24 @@ osilinux { osilinux If (_OSI ("Linux")) osilinux { -osilinux Store (One, LINX) -osilinux Store (Zero, ECDY) +osilinux Store (One, LINX) /* \LINX */ +osilinux Store (Zero, ECDY) /* \ECDY */ osilinux } osilinux If (_OSI ("Windows 2001")) osilinux { -osilinux Store (0x07D1, OSYS) +osilinux Store (0x07D1, OSYS) /* \OSYS */ osilinux } osilinux If (_OSI ("Windows 2001 SP1")) osilinux { -osilinux Store (0x07D1, OSYS) +osilinux Store (0x07D1, OSYS) /* \OSYS */ osilinux } osilinux If (_OSI ("Windows 2001 SP2")) osilinux { -osilinux Store (0x07D2, OSYS) +osilinux Store (0x07D2, OSYS) /* \OSYS */ osilinux } osilinux If (_OSI ("Windows 2006")) osilinux { -osilinux Store (0x07D6, OSYS) +osilinux Store (0x07D6, OSYS) /* \OSYS */ osilinux } osilinux } osilinux WARNING: Test 1, DSDT implements a deprecated diff -Nru fwts-14.03.00/fwts-test/syntaxcheck-0001/syntaxcheck-0001.log fwts-14.03.01/fwts-test/syntaxcheck-0001/syntaxcheck-0001.log --- fwts-14.03.00/fwts-test/syntaxcheck-0001/syntaxcheck-0001.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/syntaxcheck-0001/syntaxcheck-0001.log 2014-03-27 02:14:17.000000000 +0000 @@ -75,14 +75,14 @@ syntaxcheck Assembler remark in line 2151 syntaxcheck Line | AML source syntaxcheck ---------------------------------------------------------- -syntaxcheck 02148| Store (And (Arg0, 0x07), DSEN) +syntaxcheck 02148| Store (And (Arg0, 0x07), DSEN) /* \DSEN */ syntaxcheck 02149| } syntaxcheck 02150| syntaxcheck 02151| Method (_DOD, 0, NotSerialized) // _DOD: Display Output Devices syntaxcheck | ^ syntaxcheck | Remark 2120: Control Method should be made Serialized (due to creation of named objects within) syntaxcheck 02152| { -syntaxcheck 02153| Store (Zero, NDID) +syntaxcheck 02153| Store (Zero, NDID) /* \NDID */ syntaxcheck 02154| If (LNotEqual (DIDL, Zero)) syntaxcheck ========================================================== syntaxcheck @@ -119,7 +119,7 @@ syntaxcheck Assembler remark in line 5866 syntaxcheck Line | AML source syntaxcheck ---------------------------------------------------------- -syntaxcheck 05863| Return (STAT) +syntaxcheck 05863| Return (STAT) /* \_SB_.PCI0.LPCB.BAT1._BIF.STAT */ syntaxcheck 05864| } syntaxcheck 05865| syntaxcheck 05866| Method (_BST, 0, NotSerialized) // _BST: Battery Status @@ -163,7 +163,7 @@ syntaxcheck Assembler remark in line 6046 syntaxcheck Line | AML source syntaxcheck ---------------------------------------------------------- -syntaxcheck 06043| And (ICR5, 0x02, ICR5) +syntaxcheck 06043| And (ICR5, 0x02, ICR5) /* \_SB_.PCI0.PATA.ICR5 */ syntaxcheck 06044| CreateWordField (Arg1, 0x62, W490) syntaxcheck 06045| CreateWordField (Arg1, 0x6A, W530) syntaxcheck 06046| CreateWordField (Arg1, 0x7E, W630) @@ -184,14 +184,14 @@ syntaxcheck | ^ syntaxcheck | Remark 2089: Object is not referenced (Name is within method [_STM]) syntaxcheck 06049| CreateWordField (Arg1, 0xBA, W930) -syntaxcheck 06050| Or (PRIT, 0x8004, PRIT) +syntaxcheck 06050| Or (PRIT, 0x8004, PRIT) /* \_SB_.PCI0.PATA.PRIT */ syntaxcheck 06051| If (LAnd (And (FLAG, 0x02), And (W490, 0x0800))) syntaxcheck ========================================================== syntaxcheck FAILED [LOW] AMLAsmASL_MSG_NOT_REFERENCED: Test 1, syntaxcheck Assembler remark in line 6090 syntaxcheck Line | AML source syntaxcheck ---------------------------------------------------------- -syntaxcheck 06087| And (ICR5, One, ICR5) +syntaxcheck 06087| And (ICR5, One, ICR5) /* \_SB_.PCI0.PATA.ICR5 */ syntaxcheck 06088| CreateWordField (Arg2, 0x62, W491) syntaxcheck 06089| CreateWordField (Arg2, 0x6A, W531) syntaxcheck 06090| CreateWordField (Arg2, 0x7E, W631) @@ -212,7 +212,7 @@ syntaxcheck | ^ syntaxcheck | Remark 2089: Object is not referenced (Name is within method [_STM]) syntaxcheck 06093| CreateWordField (Arg2, 0xBA, W931) -syntaxcheck 06094| Or (PRIT, 0x8040, PRIT) +syntaxcheck 06094| Or (PRIT, 0x8040, PRIT) /* \_SB_.PCI0.PATA.PRIT */ syntaxcheck 06095| If (LAnd (And (FLAG, 0x08), And (W491, 0x0800))) syntaxcheck ========================================================== syntaxcheck FAILED [LOW] AMLAsmASL_MSG_SERIALIZED_REQUIRED: Test 1, diff -Nru fwts-14.03.00/fwts-test/wmi-0001/wmi-0002.log fwts-14.03.01/fwts-test/wmi-0001/wmi-0002.log --- fwts-14.03.00/fwts-test/wmi-0001/wmi-0002.log 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/fwts-test/wmi-0001/wmi-0002.log 2014-03-27 02:14:17.000000000 +0000 @@ -9,7 +9,7 @@ wmi Flags : 0x02 (Method) wmi Object ID : NB wmi Instance : 0x01 -wmi Driver : eeepc-wmi (Asus) +wmi Driver : asus-wmi (Asus) wmi PASSED: Test 1, 97845ED0-4E6D-11DE-8A39-0800200C9A66 has wmi associated method \_SB_.ATKD.WMNB wmi @@ -20,18 +20,11 @@ wmi Notification ID: 0xff wmi Reserved : 0x00 wmi Instance : 0x01 -wmi FAILED [MEDIUM] WMIUnknownGUID: Test 1, GUID -wmi 0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C is unknown to the -wmi kernel, a driver may need to be implemented for this GUID. -wmi A WMI driver probably needs to be written for this WMI -wmi event. It can checked for using: -wmi wmi_has_guid("0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C"). One -wmi can install a notify handler using -wmi wmi_install_notify_handler("0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C" -wmi , handler, NULL). http://lwn.net/Articles/391230 describes -wmi how to write an appropriate driver. +wmi Driver : asus-nb-wmi (Asus) +wmi PASSED: Test 1, All events associated with \_SB_.ATKD._WDG +wmi are handled by a kernel driver. wmi wmi ========================================================== -wmi 1 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 +wmi 2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 wmi info only. wmi ========================================================== diff -Nru fwts-14.03.00/src/acpi/acpidump/acpidump.c fwts-14.03.01/src/acpi/acpidump/acpidump.c --- fwts-14.03.00/src/acpi/acpidump/acpidump.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpi/acpidump/acpidump.c 2014-03-27 02:14:17.000000000 +0000 @@ -125,22 +125,16 @@ const fwts_acpidump_field *info, const void *data) { - uint64_t ret; + uint64_t ret = 0; uint64_t mask = (1ULL << (uint64_t)info->bit_field_nbits) - 1; int i; switch (info->size) { case 1: - ret = (uint64_t)*(uint8_t *)data; - break; case 2: - ret = (uint64_t)*(uint16_t *)data; - break; case 4: - ret = (uint64_t)*(uint32_t *)data; - break; case 8: - ret = (uint64_t)*(uint64_t *)data; + memcpy(&ret, data, info->size); break; default: ret = 0; @@ -443,7 +437,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, table->data, fields, table->length, table->length); + acpi_dump_table_fields(fw, table->data, fields, 0, table->length); } static void acpidump_cpep(fwts_framework *fw, const fwts_acpi_table_info *table) @@ -1117,7 +1111,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, table->data, fields, table->length, table->length); + acpi_dump_table_fields(fw, table->data, fields, 0, table->length); } /* @@ -1527,7 +1521,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, table->data, bgrt_fields, table->length, table->length); + acpi_dump_table_fields(fw, table->data, bgrt_fields, 0, table->length); } /* @@ -1551,7 +1545,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, table->data, gtdt_fields, table->length, table->length); + acpi_dump_table_fields(fw, table->data, gtdt_fields, 0, table->length); } /* @@ -1648,7 +1642,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, table->data, rasf_fields, table->length, table->length); + acpi_dump_table_fields(fw, table->data, rasf_fields, 0, table->length); /* No idea how to dump rest of table, spec is a rather poor */ acpi_dump_raw_table(fw, table); @@ -1682,7 +1676,7 @@ FIELD_END }; - acpi_dump_table_fields(fw, data, pcct_fields, table->length, table->length); + acpi_dump_table_fields(fw, data, pcct_fields, 0, table->length); ptr += sizeof(fwts_acpi_table_pcct); diff -Nru fwts-14.03.00/src/acpi/method/method.c fwts-14.03.01/src/acpi/method/method.c --- fwts-14.03.00/src/acpi/method/method.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpi/method/method.c 2014-03-27 02:14:17.000000000 +0000 @@ -4202,7 +4202,7 @@ for (i = 0; i < 10; i++) { char buffer[5]; - snprintf(buffer, sizeof(buffer), "AC%d", i); + snprintf(buffer, sizeof(buffer), "_AC%d", i); method_evaluate_method(fw, METHOD_OPTIONAL, buffer, NULL, 0, method_test_THERM_return, buffer); fwts_log_nl(fw); @@ -4314,7 +4314,9 @@ "controller before entering a sleep state. If " "the machine cannot suspend (S3), " "hibernate (S4) or shutdown (S5) then it " - "could be because _PTS is missing."); + "could be because _PTS is missing. Note that " + "ACPI 1.0 wants _PTS to be executed before " + "suspending devices."); break; } fwts_log_nl(fw); @@ -4338,8 +4340,16 @@ if (method_evaluate_method(fw, METHOD_MANDITORY, "_TTS", arg, 1, method_test_NULL_return, - NULL) == FWTS_NOT_EXIST) + NULL) == FWTS_NOT_EXIST) { + fwts_advice(fw, + "Could not find _TTS. This method is invoked " + "at the beginning of the the sleep transition " + "for S1, S2, S3, S4 and S5 shutdown. The Linux " + "kernel caters for firmware that does not implement " + "_TTS, however, it will issue a warning that this " + "control method is missing."); break; + } fwts_log_nl(fw); } } @@ -4413,8 +4423,18 @@ arg[0].Integer.Value = i; fwts_log_info(fw, "Test _WAK(%d) System Wake, State S%d.", i, i); if (method_evaluate_method(fw, METHOD_MANDITORY, "_WAK", arg, 1, - method_test_WAK_return, &i) == FWTS_NOT_EXIST) + method_test_WAK_return, &i) == FWTS_NOT_EXIST) { + fwts_advice(fw, + "Section 7.3.7 states that a system that wakes " + "from a sleeping state will invoke the _WAK " + "control to issue device, thermal and other " + "notifications to ensure that the operating system " + "checks the states of various devices, thermal " + "zones, etc. The Linux kernel will report an " + "ACPI exception if _WAK is does not exist when " + "it returns from a sleep state."); break; + } fwts_log_nl(fw); } return FWTS_OK; diff -Nru fwts-14.03.00/src/acpi/s3/s3.c fwts-14.03.01/src/acpi/s3/s3.c --- fwts-14.03.00/src/acpi/s3/s3.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpi/s3/s3.c 2014-03-27 02:14:17.000000000 +0000 @@ -29,9 +29,10 @@ #include #include -#define PM_SUSPEND "pm-suspend" -#define FWTS_SUSPEND "FWTS_SUSPEND" -#define FWTS_RESUME "FWTS_RESUME" +#define PM_SUSPEND "pm-suspend" +#define PM_SUSPEND_HYBRID "pm-suspend-hybrid" +#define FWTS_SUSPEND "FWTS_SUSPEND" +#define FWTS_RESUME "FWTS_RESUME" static int s3_multiple = 1; /* number of s3 multiple tests to run */ static int s3_min_delay = 0; /* min time between resume and next suspend */ @@ -44,6 +45,7 @@ static bool s3_min_max_delay = false; static float s3_suspend_time = 15.0; /* Maximum allowed suspend time */ static float s3_resume_time = 15.0; /* Maximum allowed resume time */ +static bool s3_hybrid = false; static int s3_init(fwts_framework *fw) { @@ -78,8 +80,13 @@ fwts_hwinfo_get(fw, &hwinfo1); /* Format up pm-suspend command with optional quirking arguments */ - if ((command = fwts_realloc_strcat(NULL, PM_SUSPEND)) == NULL) - return FWTS_OUT_OF_MEMORY; + if (s3_hybrid) { + if ((command = fwts_realloc_strcat(NULL, PM_SUSPEND_HYBRID)) == NULL) + return FWTS_OUT_OF_MEMORY; + } else { + if ((command = fwts_realloc_strcat(NULL, PM_SUSPEND)) == NULL) + return FWTS_OUT_OF_MEMORY; + } if (s3_quirks) { if ((command = fwts_realloc_strcat(command, " ")) == NULL) @@ -494,6 +501,9 @@ case 9: s3_resume_time = atof(optarg); break; + case 10: + s3_hybrid = true; + break; } } return FWTS_OK; @@ -510,6 +520,7 @@ { "s3-device-check-delay", "", 1, "Sleep N seconds before we run a device check after waking up from suspend. Default is 15 seconds, e.g. --s3-device-check-delay=20" }, { "s3-suspend-time", "", 1, "Maximum expected suspend time in seconds, e.g. --s3-suspend-time=3.5" }, { "s3-resume-time", "", 1, "Maximum expected resume time in seconds, e.g. --s3-resume-time=5.1" }, + { "s3-hybrid", "", 0, "Run S3 with hybrid sleep, i.e. saving system states as S4 does." }, { NULL, NULL, 0, NULL } }; diff -Nru fwts-14.03.00/src/acpi/wmi/wmi.c fwts-14.03.01/src/acpi/wmi/wmi.c --- fwts-14.03.00/src/acpi/wmi/wmi.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpi/wmi/wmi.c 2014-03-27 02:14:17.000000000 +0000 @@ -78,6 +78,8 @@ { "95764E09-FB56-4e83-B31A-37761F60994A", "acer-wmi", "Acer" }, { "61EF69EA-865C-4BC3-A502-A0DEBA0CB531", "acer-wmi", "Acer" }, { "676AA15E-6A47-4D9F-A2CC-1E6D18D14026", "acer-wmi", "Acer" }, + { "0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C", "asus-nb-wmi","Asus" }, + { "97845ED0-4E6D-11DE-8A39-0800200C9A66", "asus-wmi", "Asus" }, { "9DBB5994-A997-11DA-B012-B622A1EF5492", "dell-wmi", "Dell" }, { "284A0E6B-380E-472A-921F-E52786257FB4", "dell-wmi-aio","Dell" }, { "02314822-307C-4F66-BF0E-48AEAEB26CC8", "dell-wmi-aio","Dell" }, @@ -87,6 +89,8 @@ { "5FB7F034-2C63-45e9-BE91-3D44E2C707E4", "hp-wmi", "HP" }, { "551A1F84-FBDD-4125-91DB-3EA8F44F1D45", "msi-wmi", "MSI" }, { "B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2", "msi-wmi", "MSI" }, + { "5B3CC38A-40D9-7245-8AE6-1145B751BE3F", "msi-wmi", "MSI" }, + { "F6CB5C3C-9CAE-4EBD-B577-931EA32A2CC0", "mxm-wmi", "MXM" }, { "C364AC71-36DB-495A-8494-B439D472A505", "tc110-wmi", "HP Compaq" }, { NULL, NULL, NULL } }; diff -Nru fwts-14.03.00/src/acpica/Makefile.am fwts-14.03.01/src/acpica/Makefile.am --- fwts-14.03.00/src/acpica/Makefile.am 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/Makefile.am 2014-03-27 02:14:17.000000000 +0000 @@ -197,6 +197,7 @@ source/components/resources/rsxface.c \ source/components/resources/rsserial.c \ source/components/resources/rsdumpinfo.c \ + source/components/tables/tbdata.c \ source/components/tables/tbfadt.c \ source/components/tables/tbfind.c \ source/components/tables/tbinstal.c \ @@ -235,6 +236,8 @@ source/components/utilities/uterror.c \ source/components/utilities/utbuffer.c \ source/common/acgetline.c \ + source/common/ahids.c \ + source/common/cmfsize.c \ source/tools/acpiexec/aehandlers.c libfwtsacpica_la_LIBADD = \ diff -Nru fwts-14.03.00/src/acpica/source/common/adfile.c fwts-14.03.01/src/acpica/source/common/adfile.c --- fwts-14.03.00/src/acpica/source/common/adfile.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/adfile.c 2014-03-27 02:14:17.000000000 +0000 @@ -275,11 +275,16 @@ /* - * Copy the original filename to a new buffer. Leave room for the worst case - * where we append the suffix, an added dot and the null terminator. + * Copy the original filename to a new buffer. Leave room for the worst + * case where we append the suffix, an added dot and the null terminator. */ NewFilename = ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); + if (!NewFilename) + { + return (NULL); + } + strcpy (NewFilename, InputFilename); /* Try to find the last dot in the filename */ diff -Nru fwts-14.03.00/src/acpica/source/common/adisasm.c fwts-14.03.01/src/acpica/source/common/adisasm.c --- fwts-14.03.00/src/acpica/source/common/adisasm.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/adisasm.c 2014-03-27 02:14:17.000000000 +0000 @@ -151,10 +151,6 @@ /* Local prototypes */ -static UINT32 -AdGetFileSize ( - FILE *File); - static void AdCreateTableHeader ( char *Filename, @@ -229,38 +225,6 @@ /******************************************************************************* * - * FUNCTION: AdGetFileSize - * - * PARAMETERS: File - Open file handle - * - * RETURN: File Size - * - * DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open. - * - ******************************************************************************/ - -static UINT32 -AdGetFileSize ( - FILE *File) -{ - UINT32 FileSize; - long Offset; - - - Offset = ftell (File); - - fseek (File, 0, SEEK_END); - FileSize = (UINT32) ftell (File); - - /* Restore file pointer */ - - fseek (File, Offset, SEEK_SET); - return (FileSize); -} - - -/******************************************************************************* - * * FUNCTION: AdInitialize * * PARAMETERS: None @@ -278,7 +242,7 @@ ACPI_STATUS Status; - /* ACPI CA subsystem initialization */ + /* ACPICA subsystem initialization */ Status = AcpiOsInitialize (); if (ACPI_FAILURE (Status)) @@ -453,7 +417,7 @@ /* Create/Open a disassembly output file */ DisasmFilename = FlGenerateFilename (Prefix, FILE_SUFFIX_DISASSEMBLY); - if (!OutFilename) + if (!DisasmFilename) { fprintf (stderr, "Could not generate output filename\n"); Status = AE_ERROR; @@ -485,7 +449,7 @@ fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n", Table->Signature); fprintf (stderr, "Formatted output: %s - %u bytes\n", - DisasmFilename, AdGetFileSize (File)); + DisasmFilename, CmGetFileSize (File)); } else { @@ -541,9 +505,10 @@ "reparsing with new information\n", AcpiDmGetExternalMethodCount ()); - /* Reparse, rebuild namespace. no need to xref namespace */ + /* Reparse, rebuild namespace */ AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); + AcpiGbl_ParseOpRoot = NULL; AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode); AcpiGbl_RootNode = NULL; @@ -557,6 +522,9 @@ AcpiGbl_RootNodeStruct.Flags = 0; Status = AcpiNsRootInitialize (); + + /* New namespace, add the external definitions first */ + AcpiDmAddExternalsToNamespace (); /* Parse the table again. No need to reload it, however */ @@ -569,6 +537,14 @@ goto Cleanup; } + /* Cross reference the namespace again */ + + AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, + AcpiGbl_RootNode, OwnerId); + + AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot, + AcpiGbl_RootNode, OwnerId); + if (AslCompilerdebug) { AcpiOsPrintf ("/**** After second load and resource conversion\n"); @@ -603,7 +579,7 @@ fprintf (stderr, "Disassembly completed\n"); fprintf (stderr, "ASL Output: %s - %u bytes\n", - DisasmFilename, AdGetFileSize (File)); + DisasmFilename, CmGetFileSize (File)); } } @@ -640,7 +616,7 @@ * * RETURN: None * - * DESCRIPTION: Create the disassembler header, including ACPI CA signon with + * DESCRIPTION: Create the disassembler header, including ACPICA signon with * current time and date. * *****************************************************************************/ @@ -672,7 +648,7 @@ * * RETURN: None * - * DESCRIPTION: Create the ASL table header, including ACPI CA signon with + * DESCRIPTION: Create the ASL table header, including ACPICA signon with * current time and date. * *****************************************************************************/ @@ -750,8 +726,17 @@ else { NewFilename = ACPI_ALLOCATE_ZEROED (9); - strncat (NewFilename, Table->Signature, 4); - strcat (NewFilename, ".aml"); + if (NewFilename) + { + strncat (NewFilename, Table->Signature, 4); + strcat (NewFilename, ".aml"); + } + } + + if (!NewFilename) + { + AcpiOsPrintf (" **** Could not generate AML output filename\n"); + return; } /* Open the ASL definition block */ @@ -944,7 +929,8 @@ if (LoadTable) { Status = AcpiTbStoreTable ((ACPI_PHYSICAL_ADDRESS) Table, Table, - Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex); + Table->Length, ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, + &TableIndex); if (ACPI_FAILURE (Status)) { return (Status); @@ -979,9 +965,12 @@ return (AE_OK); } - /* Pass 3: Parse control methods and link their parse trees into the main parse tree */ - - fprintf (stderr, "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n"); + /* + * Pass 3: Parse control methods and link their parse trees + * into the main parse tree + */ + fprintf (stderr, + "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n"); Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot); fprintf (stderr, "\n"); diff -Nru fwts-14.03.00/src/acpica/source/common/adwalk.c fwts-14.03.01/src/acpica/source/common/adwalk.c --- fwts-14.03.00/src/acpica/source/common/adwalk.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/adwalk.c 2014-03-27 02:14:17.000000000 +0000 @@ -832,11 +832,13 @@ if ((!(OpInfo->Flags & AML_NAMED)) && (!(OpInfo->Flags & AML_CREATE)) && - (Op->Common.AmlOpcode != AML_INT_NAMEPATH_OP)) + (Op->Common.AmlOpcode != AML_INT_NAMEPATH_OP) && + (Op->Common.AmlOpcode != AML_NOTIFY_OP)) { goto Exit; } + /* Get the NamePath from the appropriate place */ if (OpInfo->Flags & AML_NAMED) @@ -873,6 +875,10 @@ Path = NextOp->Common.Value.String; } } + else if (Op->Common.AmlOpcode == AML_NOTIFY_OP) + { + Path = Op->Common.Value.Arg->Asl.Value.String; + } else { Path = Op->Common.Value.String; diff -Nru fwts-14.03.00/src/acpica/source/common/ahids.c fwts-14.03.01/src/acpica/source/common/ahids.c --- fwts-14.03.00/src/acpica/source/common/ahids.c 1970-01-01 00:00:00.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/ahids.c 2014-03-27 02:14:17.000000000 +0000 @@ -0,0 +1,286 @@ +/****************************************************************************** + * + * Module Name: ahids - Table of ACPI/PNP _HID/_CID values + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#include "acpi.h" +#include "accommon.h" + +#define _COMPONENT ACPI_UTILITIES + ACPI_MODULE_NAME ("ahids") + + +/* + * ACPI/PNP Device IDs with description strings + */ +const AH_DEVICE_ID AslDeviceIds[] = +{ + {"10EC5640", "Realtek I2S Audio Codec"}, + {"80860F0A", "Intel Atom UART Controller"}, + {"80860F14", "Intel Baytrail SDIO/MMC Host Controller"}, + {"80860F28", "Intel SST Audio DSP"}, + {"80860F41", "Intel Baytrail I2C Host Controller"}, + {"ACPI0001", "SMBus 1.0 Host Controller"}, + {"ACPI0002", "Smart Battery Subsystem"}, + {"ACPI0003", "Power Source Device"}, + {"ACPI0004", "Module Device"}, + {"ACPI0005", "SMBus 2.0 Host Controller"}, + {"ACPI0006", "GPE Block Device"}, + {"ACPI0007", "Processor Device"}, + {"ACPI0008", "Ambient Light Sensor Device"}, + {"ACPI0009", "I/O xAPIC Device"}, + {"ACPI000A", "I/O APIC Device"}, + {"ACPI000B", "I/O SAPIC Device"}, + {"ACPI000C", "Processor Aggregator Device"}, + {"ACPI000D", "Power Meter Device"}, + {"ACPI000E", "Time and Alarm Device"}, + {"ACPI000F", "User Presence Detection Device"}, + {"ATK4001", "Asus Radio Control Button"}, + {"ATML1000", "Atmel Touchscreen Controller"}, + {"BCM2E39", "Broadcom BT Serial Bus Driver over UART Bus Enumerator"}, + {"CPLM3218", "Capella Micro CM3218x Ambient Light Sensor"}, + {"DELLABCE", "Dell Airplane Mode Switch Driver"}, + {"DLAC3002", "Qualcomm Atheros Bluetooth UART Transport"}, + {"INT0002", "Virtual GPIO Controller"}, + {"INT0800", "Intel 82802 Firmware Hub Device"}, + {"INT3394", "ACPI System Fan"}, + {"INT3396", "Standard Power Management Controller"}, + {"INT33A0", "Intel Smart Connect Technology Device"}, + {"INT33A1", "Intel Power Engine"}, + {"INT33BB", "Intel Baytrail SD Host Controller"}, + {"INT33BD", "Intel Baytrail Mailbox Device"}, + {"INT33C0", "Intel Serial I/O SPI Host Controller"}, + {"INT33C1", "Intel Serial I/O SPI Host Controller"}, + {"INT33C2", "Intel Serial I/O I2C Host Controller"}, + {"INT33C3", "Intel Serial I/O I2C Host Controller"}, + {"INT33C4", "Intel Serial I/O UART Host Controller"}, + {"INT33C5", "Intel Serial I/O UART Host Controller"}, + {"INT33C6", "Intel SD Host Controller"}, + {"INT33C7", "Intel Serial I/O GPIO Host Controller"}, + {"INT33C8", "Intel Smart Sound Technology Host Controller"}, + {"INT33C9", "Wolfson Microelectronics Audio WM5102"}, + {"INT33CA", "Intel SPB Peripheral"}, + {"INT33CB", "Intel Smart Sound Technology Audio Codec"}, + {"INT33D1", "Intel GPIO Buttons"}, + {"INT33D2", "Intel GPIO Buttons"}, + {"INT33D3", "Intel GPIO Buttons"}, + {"INT33D4", "Intel GPIO Buttons"}, + {"INT33D6", "Intel Virtual Buttons Device"}, + {"INT33F0", "Camera Sensor MT9M114"}, + {"INT33FB", "MIPI-CSI Camera Sensor OV2722"}, + {"INT33FC", "Intel Baytrail GPIO Controller"}, + {"INT33FD", "Intel Baytrail Power Management IC"}, + {"INT3400", "Intel Dynamic Power Performance Management"}, + {"INT3401", "Intel Extended Thermal Model CPU"}, + {"INT3403", "DPTF Temperature Sensor"}, + {"INT3406", "Intel Dynamic Platform & Thermal Framework Display Participant"}, + {"INT3407", "DPTF Platform Power Meter"}, + {"INT340E", "Motherboard Resources"}, + {"INT3420", "Intel Bluetooth RF Kill"}, + {"INT3F0D", "ACPI Motherboard Resources"}, + {"INTCF1A", "Sony IMX175 Camera Sensor"}, + {"INTCFD9", "Intel Baytrail SOC GPIO Controller"}, + {"INTL9C60", "Intel Baytrail SOC DMA Controller"}, + {"INVN6500", "InvenSense MPU-6500 Six Axis Gyroscope and Accelerometer"}, + {"LNXCPU", "Linux Logical CPU"}, + {"LNXPOWER", "ACPI Power Resource (power gating)"}, + {"LNXPWRBN", "System Power Button"}, + {"LNXSYBUS", "System Bus"}, + {"LNXSYSTM", "ACPI Root Node"}, + {"LNXTHERM", "ACPI Thermal Zone"}, + {"LNXVIDEO", "ACPI Video Controller"}, + {"MSFT0101", "TPM 2.0 Security Device"}, + {"NXP5442", "NXP 5442 Near Field Communications Controller"}, + {"PNP0000", "8259-compatible Programmable Interrupt Controller"}, + {"PNP0001", "EISA Interrupt Controller"}, + {"PNP0002", "MCA Interrupt Controller"}, + {"PNP0003", "IO-APIC Interrupt Controller"}, + {"PNP0100", "PC-class System Timer"}, + {"PNP0103", "HPET System Timer"}, + {"PNP0200", "PC-class DMA Controller"}, + {"PNP0300", "IBM PC/XT Keyboard Controller (83 key)"}, + {"PNP0301", "IBM PC/XT Keyboard Controller (86 key)"}, + {"PNP0302", "IBM PC/XT Keyboard Controller (84 key)"}, + {"PNP0303", "IBM Enhanced Keyboard (101/102-key, PS/2 Mouse)"}, + {"PNP0400", "Standard LPT Parallel Port"}, + {"PNP0401", "ECP Parallel Port"}, + {"PNP0500", "Standard PC COM Serial Port"}, + {"PNP0501", "16550A-compatible COM Serial Port"}, + {"PNP0510", "Generic IRDA-compatible Device"}, + {"PNP0800", "Microsoft Sound System Compatible Device"}, + {"PNP0A03", "PCI Bus"}, + {"PNP0A05", "Generic Container Device"}, + {"PNP0A06", "Generic Container Device"}, + {"PNP0A08", "PCI Express Bus"}, + {"PNP0B00", "AT Real-Time Clock"}, + {"PNP0B01", "Intel PIIX4-compatible RTC/CMOS Device"}, + {"PNP0B02", "Dallas Semiconductor-compatible RTC/CMOS Device"}, + {"PNP0C01", "System Board"}, + {"PNP0C02", "PNP Motherboard Resources"}, + {"PNP0C04", "x87-compatible Floating Point Processing Unit"}, + {"PNP0C08", "ACPI Core Hardware"}, + {"PNP0C09", "Embedded Controller Device"}, + {"PNP0C0A", "Control Method Battery"}, + {"PNP0C0B", "Fan (Thermal Solution)"}, + {"PNP0C0C", "Power Button Device"}, + {"PNP0C0D", "Lid Device"}, + {"PNP0C0E", "Sleep Button Device"}, + {"PNP0C0F", "PCI Interrupt Link Device"}, + {"PNP0C10", "System Indicator Device"}, + {"PNP0C11", "Thermal Zone"}, + {"PNP0C12", "Device Bay Controller"}, + {"PNP0C14", "Windows Management Instrumentation Device"}, + {"PNP0C15", "Docking Station"}, + {"PNP0C40", "Standard Button Controller"}, + {"PNP0C50", "HID Protocol Device (I2C bus)"}, + {"PNP0C60", "Display Sensor Device"}, + {"PNP0C70", "Dock Sensor Device"}, + {"PNP0C80", "Memory Device"}, + {"PNP0D40", "Standard Compliant SD Host Controller"}, + {"PNP0D80", "Windows-compatible System Power Management Controller"}, + {"PNP0F03", "Microsoft PS/2-style Mouse"}, + {"SMO91D0", "Sensor Hub"}, + + {NULL, NULL} +}; + + +/******************************************************************************* + * + * FUNCTION: AcpiAhMatchHardwareId + * + * PARAMETERS: HardwareId - String representation of an _HID or _CID + * + * RETURN: ID info struct. NULL if HardwareId is not found + * + * DESCRIPTION: Lookup an _HID/_CID in the device ID table + * + ******************************************************************************/ + +const AH_DEVICE_ID * +AcpiAhMatchHardwareId ( + char *HardwareId) +{ + const AH_DEVICE_ID *Info; + + + for (Info = AslDeviceIds; Info->Name; Info++) + { + if (!ACPI_STRCMP (HardwareId, Info->Name)) + { + return (Info); + } + } + + return (NULL); +} diff -Nru fwts-14.03.00/src/acpica/source/common/ahpredef.c fwts-14.03.01/src/acpica/source/common/ahpredef.c --- fwts-14.03.00/src/acpica/source/common/ahpredef.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/ahpredef.c 2014-03-27 02:14:17.000000000 +0000 @@ -116,6 +116,9 @@ #include "acpi.h" #include "accommon.h" +#define _COMPONENT ACPI_UTILITIES + ACPI_MODULE_NAME ("ahpredef") + /* * iASL only needs a partial table (short descriptions only). * AcpiHelp needs the full table. @@ -393,3 +396,34 @@ AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"), AH_PREDEF (NULL, NULL, NULL) }; + + +/******************************************************************************* + * + * FUNCTION: AcpiAhMatchPredefinedName + * + * PARAMETERS: Nameseg - Predefined name string + * + * RETURN: ID info struct. NULL if Nameseg not found + * + * DESCRIPTION: Lookup a predefined name. + * + ******************************************************************************/ + +const AH_PREDEFINED_NAME * +AcpiAhMatchPredefinedName ( + char *Nameseg) +{ + const AH_PREDEFINED_NAME *Info; + + + for (Info = AslPredefinedInfo; Info->Name; Info++) + { + if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) + { + return (Info); + } + } + + return (NULL); +} diff -Nru fwts-14.03.00/src/acpica/source/common/cmfsize.c fwts-14.03.01/src/acpica/source/common/cmfsize.c --- fwts-14.03.00/src/acpica/source/common/cmfsize.c 1970-01-01 00:00:00.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/cmfsize.c 2014-03-27 02:14:17.000000000 +0000 @@ -0,0 +1,183 @@ +/****************************************************************************** + * + * Module Name: cfsize - Common get file size function + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#include "acpi.h" +#include "accommon.h" +#include "acapps.h" +#include + +#define _COMPONENT ACPI_TOOLS + ACPI_MODULE_NAME ("cmfsize") + + +/******************************************************************************* + * + * FUNCTION: CmGetFileSize + * + * PARAMETERS: File - Open file descriptor + * + * RETURN: File Size. On error, -1 (ACPI_UINT32_MAX) + * + * DESCRIPTION: Get the size of a file. Uses seek-to-EOF. File must be open. + * Does not disturb the current file pointer. Uses perror for + * error messages. + * + ******************************************************************************/ + +UINT32 +CmGetFileSize ( + FILE *File) +{ + long FileSize; + long CurrentOffset; + + + /* Save the current file pointer, seek to EOF to obtain file size */ + + CurrentOffset = ftell (File); + if (CurrentOffset < 0) + { + goto OffsetError; + } + + if (fseek (File, 0, SEEK_END)) + { + goto SeekError; + } + + FileSize = ftell (File); + if (FileSize < 0) + { + goto OffsetError; + } + + /* Restore original file pointer */ + + if (fseek (File, CurrentOffset, SEEK_SET)) + { + goto SeekError; + } + + return ((UINT32) FileSize); + + +OffsetError: + perror ("Could not get file offset"); + return (ACPI_UINT32_MAX); + +SeekError: + perror ("Could not seek file"); + return (ACPI_UINT32_MAX); +} diff -Nru fwts-14.03.00/src/acpica/source/common/dmextern.c fwts-14.03.01/src/acpica/source/common/dmextern.c --- fwts-14.03.00/src/acpica/source/common/dmextern.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/common/dmextern.c 2014-03-27 02:14:17.000000000 +0000 @@ -139,7 +139,7 @@ */ static const char *AcpiGbl_DmTypeNames[] = { - /* 00 */ "", /* Type ANY */ + /* 00 */ ", UnknownObj", /* Type ANY */ /* 01 */ ", IntObj", /* 02 */ ", StrObj", /* 03 */ ", BuffObj", @@ -469,6 +469,7 @@ { fprintf (stderr, "Could not open external reference file \"%s\"\n", Gbl_ExternalRefFilename); + AslAbort (); return; } @@ -863,7 +864,8 @@ /* Duplicate method, check that the Value (ArgCount) is the same */ if ((NextExternal->Type == ACPI_TYPE_METHOD) && - (NextExternal->Value != Value)) + (NextExternal->Value != Value) && + (Value > 0)) { ACPI_ERROR ((AE_INFO, "External method arg count mismatch %s: Current %u, attempted %u", @@ -1137,9 +1139,8 @@ NextExternal->Path, AcpiDmGetObjectTypeName (NextExternal->Type)); - AcpiOsPrintf ( - ") // Warning: Unresolved Method, " - "guessing %u arguments (may be incorrect, see warning above)\n", + AcpiOsPrintf (") // Warning: Unresolved method, " + "guessing %u arguments\n", NextExternal->Value); NextExternal->Flags |= ACPI_EXT_EXTERNAL_EMITTED; @@ -1347,8 +1348,14 @@ " * control method external declarations with the associated method\n" " * argument counts. Each line of the file must be of the form:\n" " * External (, MethodObj, )\n" + " * Invocation:\n" + " * iasl -fe refs.txt -d dsdt.aml\n" + " *\n" + " * The following methods were unresolved and many not compile properly\n" + " * because the disassembler had to guess at the number of arguments\n" + " * required for each:\n" " */\n", - AcpiGbl_NumExternalMethods); + AcpiGbl_NumExternalMethods); } else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) { @@ -1366,6 +1373,12 @@ " * control method external declarations with the associated method\n" " * argument counts. Each line of the file must be of the form:\n" " * External (, MethodObj, )\n" + " * Invocation:\n" + " * iasl -fe refs.txt -d dsdt.aml\n" + " *\n" + " * The following methods were unresolved and many not compile properly\n" + " * because the disassembler had to guess at the number of arguments\n" + " * required for each:\n" " */\n", AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), @@ -1393,7 +1406,9 @@ "In addition, the -fe option can be used to specify a file containing\n" "control method external declarations with the associated method\n" "argument counts. Each line of the file must be of the form:\n" - " External (, MethodObj, )\n", + " External (, MethodObj, )\n" + "Invocation:\n" + " iasl -fe refs.txt -d dsdt.aml\n", AcpiGbl_NumExternalMethods); } else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) @@ -1411,7 +1426,9 @@ "If necessary, the -fe option can be used to specify a file containing\n" "control method external declarations with the associated method\n" "argument counts. Each line of the file must be of the form:\n" - " External (, MethodObj, )\n", + " External (, MethodObj, )\n" + "Invocation:\n" + " iasl -fe refs.txt -d dsdt.aml\n", AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslcompile.c fwts-14.03.01/src/acpica/source/compiler/aslcompile.c --- fwts-14.03.00/src/acpica/source/compiler/aslcompile.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslcompile.c 2014-03-27 02:14:17.000000000 +0000 @@ -462,7 +462,7 @@ /* Header length field must match the file size */ - FileSize = DtGetFileSize (Handle); + FileSize = CmGetFileSize (Handle); if (Table.Length != FileSize) { return (AE_ERROR); diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslerror.c fwts-14.03.01/src/acpica/source/compiler/aslerror.c --- fwts-14.03.00/src/acpica/source/compiler/aslerror.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslerror.c 2014-03-27 02:14:17.000000000 +0000 @@ -946,14 +946,14 @@ * FUNCTION: AslCoreSubsystemError * * PARAMETERS: Op - Parse node where error happened - * Status - The ACPI CA Exception + * Status - The ACPICA Exception * ExtraMessage - additional error message * Abort - TRUE -> Abort compilation * * RETURN: None * - * DESCRIPTION: Error reporting routine for exceptions returned by the ACPI - * CA core subsystem. + * DESCRIPTION: Error reporting routine for exceptions returned by the ACPICA + * core subsystem. * ******************************************************************************/ diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslfileio.c fwts-14.03.01/src/acpica/source/compiler/aslfileio.c --- fwts-14.03.00/src/acpica/source/compiler/aslfileio.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslfileio.c 2014-03-27 02:14:17.000000000 +0000 @@ -114,14 +114,11 @@ *****************************************************************************/ #include "aslcompiler.h" +#include "acapps.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslfileio") -long -UtGetFileSize ( - FILE *fp); - /******************************************************************************* * @@ -187,65 +184,6 @@ /******************************************************************************* * - * FUNCTION: UtGetFileSize - * - * PARAMETERS: fp - Open file handle - * - * RETURN: File Size. -1 on error. - * - * DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open. - * TBD: This function should be used to replace other similar - * functions in ACPICA. - * - ******************************************************************************/ - -long -UtGetFileSize ( - FILE *fp) -{ - long FileSize; - long CurrentOffset; - - - CurrentOffset = ftell (fp); - if (CurrentOffset < 0) - { - goto OffsetError; - } - - if (fseek (fp, 0, SEEK_END)) - { - goto SeekError; - } - - FileSize = ftell (fp); - if (FileSize < 0) - { - goto OffsetError; - } - - /* Restore file pointer */ - - if (fseek (fp, CurrentOffset, SEEK_SET)) - { - goto SeekError; - } - - return (FileSize); - - -OffsetError: - perror ("Could not get file offset"); - return (-1); - -SeekError: - perror ("Could not seek file"); - return (-1); -} - - -/******************************************************************************* - * * FUNCTION: FlGetFileSize * * PARAMETERS: FileId - Index into file info array @@ -261,16 +199,16 @@ FlGetFileSize ( UINT32 FileId) { - long FileSize; + UINT32 FileSize; - FileSize = UtGetFileSize (Gbl_Files[FileId].Handle); - if (FileSize == -1) + FileSize = CmGetFileSize (Gbl_Files[FileId].Handle); + if (FileSize == ACPI_UINT32_MAX) { AslAbort(); } - return ((UINT32) FileSize); + return (FileSize); } diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslmain.c fwts-14.03.01/src/acpica/source/compiler/aslmain.c --- fwts-14.03.00/src/acpica/source/compiler/aslmain.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslmain.c 2014-03-27 02:14:17.000000000 +0000 @@ -145,6 +145,36 @@ AslInitialize ( void); +UINT8 +AcpiIsBigEndianMachine ( + void); + + +/******************************************************************************* + * + * FUNCTION: AcpiIsBigEndianMachine + * + * PARAMETERS: None + * + * RETURN: TRUE if machine is big endian + * FALSE if machine is little endian + * + * DESCRIPTION: Detect whether machine is little endian or big endian. + * + ******************************************************************************/ + +UINT8 +AcpiIsBigEndianMachine ( + void) +{ + union { + UINT32 Integer; + UINT8 Bytes[4]; + } Overlay = {0xFF000000}; + + return (Overlay.Bytes[0]); /* Returns 0xFF (TRUE) for big endian */ +} + /******************************************************************************* * @@ -371,6 +401,18 @@ int Index2; + /* + * Big-endian machines are not currently supported. ACPI tables must + * be little-endian, and support for big-endian machines needs to + * be implemented. + */ + if (AcpiIsBigEndianMachine ()) + { + fprintf (stderr, + "iASL is not currently supported on big-endian machines.\n"); + return (-1); + } + ACPI_DEBUG_INITIALIZE (); /* For debug version only */ /* Initialize preprocessor and compiler before command line processing */ diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslmessages.h fwts-14.03.01/src/acpica/source/compiler/aslmessages.h --- fwts-14.03.00/src/acpica/source/compiler/aslmessages.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslmessages.h 2014-03-27 02:14:17.000000000 +0000 @@ -368,7 +368,7 @@ /* ASL_MSG_CONNECTION_INVALID */ "Invalid OpRegion SpaceId for use of Connection operator", /* ASL_MSG_CONSTANT_EVALUATION */ "Could not evaluate constant expression", /* ASL_MSG_CONSTANT_FOLDED */ "Constant expression evaluated and reduced", -/* ASL_MSG_CORE_EXCEPTION */ "From ACPI CA Subsystem", +/* ASL_MSG_CORE_EXCEPTION */ "From ACPICA Subsystem", /* ASL_MSG_DEBUG_FILE_OPEN */ "Could not open debug file", /* ASL_MSG_DEBUG_FILENAME */ "Could not create debug filename", /* ASL_MSG_DEPENDENT_NESTING */ "Dependent function macros cannot be nested",\ diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslstubs.c fwts-14.03.01/src/acpica/source/compiler/aslstubs.c --- fwts-14.03.00/src/acpica/source/compiler/aslstubs.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslstubs.c 2014-03-27 02:14:17.000000000 +0000 @@ -125,7 +125,7 @@ /* - * Stubs to simplify linkage to the ACPI CA core subsystem. + * Stubs to simplify linkage to the ACPICA core subsystem. * Things like Events, Global Lock, etc. are not used * by the compiler, so they are stubbed out here. */ diff -Nru fwts-14.03.00/src/acpica/source/compiler/aslutils.c fwts-14.03.01/src/acpica/source/compiler/aslutils.c --- fwts-14.03.00/src/acpica/source/compiler/aslutils.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/aslutils.c 2014-03-27 02:14:17.000000000 +0000 @@ -990,7 +990,7 @@ } -/* TBD: use version in ACPI CA main code base? */ +/* TBD: use version in ACPICA main code base? */ /******************************************************************************* * diff -Nru fwts-14.03.00/src/acpica/source/compiler/dtcompiler.h fwts-14.03.01/src/acpica/source/compiler/dtcompiler.h --- fwts-14.03.00/src/acpica/source/compiler/dtcompiler.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/dtcompiler.h 2014-03-27 02:14:17.000000000 +0000 @@ -415,10 +415,6 @@ char *String, UINT64 *ReturnInteger); -UINT32 -DtGetFileSize ( - FILE *Handle); - char* DtGetFieldValue ( DT_FIELD *Field); diff -Nru fwts-14.03.00/src/acpica/source/compiler/dtio.c fwts-14.03.01/src/acpica/source/compiler/dtio.c --- fwts-14.03.00/src/acpica/source/compiler/dtio.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/dtio.c 2014-03-27 02:14:17.000000000 +0000 @@ -117,6 +117,7 @@ #include "aslcompiler.h" #include "dtcompiler.h" +#include "acapps.h" #define _COMPONENT DT_COMPILER ACPI_MODULE_NAME ("dtio") @@ -809,7 +810,11 @@ /* Get the file size */ - Gbl_InputByteCount = DtGetFileSize (Handle); + Gbl_InputByteCount = CmGetFileSize (Handle); + if (Gbl_InputByteCount == ACPI_UINT32_MAX) + { + AslAbort (); + } Gbl_CurrentLineNumber = 0; Gbl_CurrentLineOffset = 0; @@ -888,7 +893,12 @@ /* Walk the entire parse tree, emitting the binary data */ DtWalkTableTree (RootTable, DtWriteBinary, NULL, NULL); - Gbl_TableLength = DtGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + + Gbl_TableLength = CmGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + if (Gbl_TableLength == ACPI_UINT32_MAX) + { + AslAbort (); + } } diff -Nru fwts-14.03.00/src/acpica/source/compiler/dtutils.c fwts-14.03.01/src/acpica/source/compiler/dtutils.c --- fwts-14.03.00/src/acpica/source/compiler/dtutils.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/dtutils.c 2014-03-27 02:14:17.000000000 +0000 @@ -358,36 +358,6 @@ /****************************************************************************** * - * FUNCTION: DtGetFileSize - * - * PARAMETERS: Handle - Open file handler - * - * RETURN: Current file size - * - * DESCRIPTION: Get the current size of a file. Seek to the EOF and get the - * offset. Seek back to the original location. - * - *****************************************************************************/ - -UINT32 -DtGetFileSize ( - FILE *Handle) -{ - int CurrentOffset; - int LastOffset; - - - CurrentOffset = ftell (Handle); - fseek (Handle, 0, SEEK_END); - LastOffset = ftell (Handle); - fseek (Handle, CurrentOffset, SEEK_SET); - - return ((UINT32) LastOffset); -} - - -/****************************************************************************** - * * FUNCTION: DtGetFieldValue * * PARAMETERS: Field - Current field list pointer diff -Nru fwts-14.03.00/src/acpica/source/compiler/fwts_iasl_interface.c fwts-14.03.01/src/acpica/source/compiler/fwts_iasl_interface.c --- fwts-14.03.00/src/acpica/source/compiler/fwts_iasl_interface.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/fwts_iasl_interface.c 2014-03-27 02:14:17.000000000 +0000 @@ -37,7 +37,9 @@ { int i; + AcpiGbl_ExternalFileList = NULL; AcpiDbgLevel = 0; + PrInitializePreprocessor (); for (i = 0; i < ASL_NUM_FILES; i++) { Gbl_Files[i].Handle = NULL; @@ -79,6 +81,7 @@ Gbl_DoCompile = FALSE; Gbl_OutputFilenamePrefix = (char*)outputfile; Gbl_UseDefaultAmlFilename = FALSE; + UtConvertBackslashes (Gbl_OutputFilenamePrefix); /* Throw away noisy errors */ if (freopen("/dev/null", "w", stderr) != NULL) @@ -165,6 +168,7 @@ Gbl_PreprocessFlag = TRUE; Gbl_UseDefaultAmlFilename = FALSE; Gbl_OutputFilenamePrefix = (char*)source; + UtConvertBackslashes (Gbl_OutputFilenamePrefix); (void)AslDoOneFile((char *)source); diff -Nru fwts-14.03.00/src/acpica/source/compiler/Makefile.am fwts-14.03.01/src/acpica/source/compiler/Makefile.am --- fwts-14.03.00/src/acpica/source/compiler/Makefile.am 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/compiler/Makefile.am 2014-03-27 02:14:17.000000000 +0000 @@ -193,7 +193,9 @@ ../common/adfile.c \ ../common/adisasm.c \ ../common/adwalk.c \ + ../common/ahids.c \ ../common/ahpredef.c \ + ../common/cmfsize.c \ ../common/dmextern.c \ ../common/dmrestag.c \ ../common/dmtable.c \ @@ -211,6 +213,7 @@ ../components/disassembler/dmwalk.c \ ../components/disassembler/dmdeferred.c \ ../components/disassembler/dmresrcl2.c \ + ../components/tables/tbdata.c \ ../components/tables/tbfadt.c \ ../components/tables/tbinstal.c \ ../components/tables/tbutils.c \ diff -Nru fwts-14.03.00/src/acpica/source/components/debugger/dbcmds.c fwts-14.03.01/src/acpica/source/components/debugger/dbcmds.c --- fwts-14.03.00/src/acpica/source/components/debugger/dbcmds.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/debugger/dbcmds.c 2014-03-27 02:14:17.000000000 +0000 @@ -188,7 +188,7 @@ Node = ACPI_TO_POINTER (Address); if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE))) { - AcpiOsPrintf ("Address %p is invalid in this address space\n", + AcpiOsPrintf ("Address %p is invalid", Node); return (NULL); } @@ -197,7 +197,7 @@ if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED) { - AcpiOsPrintf ("Address %p is not a valid NS node [%s]\n", + AcpiOsPrintf ("Address %p is not a valid namespace node [%s]\n", Node, AcpiUtGetDescriptorName (Node)); return (NULL); } @@ -211,6 +211,8 @@ Node = AcpiDbLocalNsLookup (InString); if (!Node) { + AcpiOsPrintf ("Could not find [%s] in namespace, defaulting to root node\n", + InString); Node = AcpiGbl_RootNode; } } @@ -434,24 +436,19 @@ switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) { - case ACPI_TABLE_ORIGIN_UNKNOWN: + case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: - AcpiOsPrintf ("Unknown "); + AcpiOsPrintf ("External virtual "); break; - case ACPI_TABLE_ORIGIN_MAPPED: + case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL: - AcpiOsPrintf ("Mapped "); + AcpiOsPrintf ("Internal physical "); break; - case ACPI_TABLE_ORIGIN_ALLOCATED: + case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: - AcpiOsPrintf ("Allocated "); - break; - - case ACPI_TABLE_ORIGIN_OVERRIDE: - - AcpiOsPrintf ("Override "); + AcpiOsPrintf ("Internal virtual "); break; default: @@ -462,7 +459,7 @@ /* Make sure that the table is mapped */ - Status = AcpiTbVerifyTable (TableDesc); + Status = AcpiTbValidateTable (TableDesc); if (ACPI_FAILURE (Status)) { return; @@ -512,8 +509,6 @@ Node = AcpiDbConvertToNode (ObjectName); if (!Node) { - AcpiOsPrintf ("Could not find [%s] in namespace\n", - ObjectName); return; } diff -Nru fwts-14.03.00/src/acpica/source/components/debugger/dbfileio.c fwts-14.03.01/src/acpica/source/components/debugger/dbfileio.c --- fwts-14.03.00/src/acpica/source/components/debugger/dbfileio.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/debugger/dbfileio.c 2014-03-27 02:14:17.000000000 +0000 @@ -214,6 +214,8 @@ #ifdef ACPI_APPLICATION +#include "acapps.h" + /******************************************************************************* * * FUNCTION: AcpiDbCheckTextModeCorruption @@ -318,9 +320,11 @@ /* Get the file size */ - fseek (fp, 0, SEEK_END); - FileSize = (UINT32) ftell (fp); - fseek (fp, 0, SEEK_SET); + FileSize = CmGetFileSize (fp); + if (FileSize == ACPI_UINT32_MAX) + { + return (AE_ERROR); + } if (FileSize < 4) { @@ -493,7 +497,7 @@ /* Install the new table into the local data structures */ - Status = AcpiTbInstallTable (&TableInfo); + Status = AcpiTbInitTableDescriptor (&TableInfo); if (ACPI_FAILURE (Status)) { if (Status == AE_ALREADY_EXISTS) @@ -547,23 +551,23 @@ FILE *File; UINT32 FileSize; UINT32 TableLength; - ACPI_STATUS Status; + ACPI_STATUS Status = AE_ERROR; - /* Open the file */ + /* Open the file, get current size */ File = fopen (Filename, "rb"); if (!File) { perror ("Could not open input file"); - return (AE_ERROR); + return (Status); } - /* Get the file size */ - - fseek (File, 0, SEEK_END); - FileSize = (UINT32) ftell (File); - fseek (File, 0, SEEK_SET); + FileSize = CmGetFileSize (File); + if (FileSize == ACPI_UINT32_MAX) + { + goto Exit; + } /* Get the entire file */ @@ -571,15 +575,14 @@ Filename, FileSize, FileSize); Status = AcpiDbReadTable (File, Table, &TableLength); - fclose(File); - if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not get table from the file\n"); - return (Status); } - return (AE_OK); +Exit: + fclose(File); + return (Status); } #endif @@ -639,6 +642,8 @@ return (Status); } + AcpiTbPrintTableHeader (0, Table); + fprintf (stderr, "Acpi table [%4.4s] successfully installed and loaded\n", Table->Signature); diff -Nru fwts-14.03.00/src/acpica/source/components/debugger/dbmethod.c fwts-14.03.01/src/acpica/source/components/debugger/dbmethod.c --- fwts-14.03.00/src/acpica/source/components/debugger/dbmethod.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/debugger/dbmethod.c 2014-03-27 02:14:17.000000000 +0000 @@ -252,6 +252,11 @@ if (Type == 'N') { Node = AcpiDbConvertToNode (IndexArg); + if (!Node) + { + return; + } + if (Node->Type != ACPI_TYPE_INTEGER) { AcpiOsPrintf ("Can only set Integer nodes\n"); diff -Nru fwts-14.03.00/src/acpica/source/components/disassembler/dmbuffer.c fwts-14.03.01/src/acpica/source/components/disassembler/dmbuffer.c --- fwts-14.03.00/src/acpica/source/components/disassembler/dmbuffer.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/disassembler/dmbuffer.c 2014-03-27 02:14:17.000000000 +0000 @@ -119,6 +119,7 @@ #include "acdisasm.h" #include "acparser.h" #include "amlcode.h" +#include "acinterp.h" #ifdef ACPI_DISASSEMBLER @@ -133,7 +134,7 @@ ACPI_PARSE_OBJECT *Op); static void -AcpiDmIsEisaIdElement ( +AcpiDmGetHardwareIdType ( ACPI_PARSE_OBJECT *Op); static void @@ -609,19 +610,20 @@ /******************************************************************************* * - * FUNCTION: AcpiDmIsEisaIdElement + * FUNCTION: AcpiDmGetHardwareIdType * * PARAMETERS: Op - Op to be examined * * RETURN: None * - * DESCRIPTION: Determine if an Op (argument to _HID or _CID) can be converted - * to an EISA ID. + * DESCRIPTION: Determine the type of the argument to a _HID or _CID + * 1) Strings are allowed + * 2) If Integer, determine if it is a valid EISAID * ******************************************************************************/ static void -AcpiDmIsEisaIdElement ( +AcpiDmGetHardwareIdType ( ACPI_PARSE_OBJECT *Op) { UINT32 BigEndianId; @@ -629,55 +631,66 @@ UINT32 i; - /* The parameter must be either a word or a dword */ - - if ((Op->Common.AmlOpcode != AML_DWORD_OP) && - (Op->Common.AmlOpcode != AML_WORD_OP)) + switch (Op->Common.AmlOpcode) { - return; - } + case AML_STRING_OP: - /* Swap from little-endian to big-endian to simplify conversion */ + /* Mark this string as an _HID/_CID string */ - BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer); + Op->Common.DisasmOpcode = ACPI_DASM_HID_STRING; + break; - /* Create the 3 leading ASCII letters */ + case AML_WORD_OP: + case AML_DWORD_OP: - Prefix[0] = ((BigEndianId >> 26) & 0x1F) + 0x40; - Prefix[1] = ((BigEndianId >> 21) & 0x1F) + 0x40; - Prefix[2] = ((BigEndianId >> 16) & 0x1F) + 0x40; + /* Determine if a Word/Dword is a valid encoded EISAID */ - /* Verify that all 3 are ascii and alpha */ + /* Swap from little-endian to big-endian to simplify conversion */ - for (i = 0; i < 3; i++) - { - if (!ACPI_IS_ASCII (Prefix[i]) || - !ACPI_IS_ALPHA (Prefix[i])) + BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer); + + /* Create the 3 leading ASCII letters */ + + Prefix[0] = ((BigEndianId >> 26) & 0x1F) + 0x40; + Prefix[1] = ((BigEndianId >> 21) & 0x1F) + 0x40; + Prefix[2] = ((BigEndianId >> 16) & 0x1F) + 0x40; + + /* Verify that all 3 are ascii and alpha */ + + for (i = 0; i < 3; i++) { - return; + if (!ACPI_IS_ASCII (Prefix[i]) || + !ACPI_IS_ALPHA (Prefix[i])) + { + return; + } } - } - /* OK - mark this node as convertable to an EISA ID */ + /* Mark this node as convertable to an EISA ID string */ - Op->Common.DisasmOpcode = ACPI_DASM_EISAID; + Op->Common.DisasmOpcode = ACPI_DASM_EISAID; + break; + + default: + break; + } } /******************************************************************************* * - * FUNCTION: AcpiDmIsEisaId + * FUNCTION: AcpiDmCheckForHardwareId * * PARAMETERS: Op - Op to be examined * * RETURN: None * - * DESCRIPTION: Determine if a Name() Op can be converted to an EisaId. + * DESCRIPTION: Determine if a Name() Op is a _HID/_CID. * ******************************************************************************/ void -AcpiDmIsEisaId ( +AcpiDmCheckForHardwareId ( ACPI_PARSE_OBJECT *Op) { UINT32 Name; @@ -702,7 +715,7 @@ if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID)) { - AcpiDmIsEisaIdElement (NextOp); + AcpiDmGetHardwareIdType (NextOp); return; } @@ -717,11 +730,11 @@ if (NextOp->Common.AmlOpcode != AML_PACKAGE_OP) { - AcpiDmIsEisaIdElement (NextOp); + AcpiDmGetHardwareIdType (NextOp); return; } - /* _CID with Package: get the package length */ + /* _CID with Package: get the package length, check all elements */ NextOp = AcpiPsGetDepthNext (NULL, NextOp); @@ -730,7 +743,7 @@ NextOp = NextOp->Common.Next; while (NextOp) { - AcpiDmIsEisaIdElement (NextOp); + AcpiDmGetHardwareIdType (NextOp); NextOp = NextOp->Common.Next; } } @@ -738,41 +751,38 @@ /******************************************************************************* * - * FUNCTION: AcpiDmEisaId + * FUNCTION: AcpiDmDecompressEisaId * * PARAMETERS: EncodedId - Raw encoded EISA ID. * * RETURN: None * - * DESCRIPTION: Convert an encoded EISAID back to the original ASCII String. + * DESCRIPTION: Convert an encoded EISAID back to the original ASCII String + * and emit the correct ASL statement. If the ID is known, emit + * a description of the ID as a comment. * ******************************************************************************/ void -AcpiDmEisaId ( +AcpiDmDecompressEisaId ( UINT32 EncodedId) { - UINT32 BigEndianId; - + char IdBuffer[ACPI_EISAID_STRING_SIZE]; + const AH_DEVICE_ID *Info; - /* Swap from little-endian to big-endian to simplify conversion */ - BigEndianId = AcpiUtDwordByteSwap (EncodedId); + /* Convert EISAID to a string an emit the statement */ + AcpiExEisaIdToString (IdBuffer, EncodedId); + AcpiOsPrintf ("EisaId (\"%s\")", IdBuffer); - /* Split to form "AAANNNN" string */ + /* If we know about the ID, emit the description */ - AcpiOsPrintf ("EisaId (\"%c%c%c%4.4X\")", - - /* Three Alpha characters (AAA), 5 bits each */ - - (int) ((BigEndianId >> 26) & 0x1F) + 0x40, - (int) ((BigEndianId >> 21) & 0x1F) + 0x40, - (int) ((BigEndianId >> 16) & 0x1F) + 0x40, - - /* Numeric part (NNNN) is simply the lower 16 bits */ - - (UINT32) (BigEndianId & 0xFFFF)); + Info = AcpiAhMatchHardwareId (IdBuffer); + if (Info) + { + AcpiOsPrintf (" /* %s */", Info->Description); + } } #endif diff -Nru fwts-14.03.00/src/acpica/source/components/disassembler/dmopcode.c fwts-14.03.01/src/acpica/source/components/disassembler/dmopcode.c --- fwts-14.03.00/src/acpica/source/components/disassembler/dmopcode.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/disassembler/dmopcode.c 2014-03-27 02:14:17.000000000 +0000 @@ -118,6 +118,8 @@ #include "acparser.h" #include "amlcode.h" #include "acdisasm.h" +#include "acinterp.h" +#include "acnamesp.h" #ifdef ACPI_DISASSEMBLER @@ -133,6 +135,159 @@ /******************************************************************************* * + * FUNCTION: AcpiDmDisplayTargetPathname + * + * PARAMETERS: Op - Parse object + * + * RETURN: None + * + * DESCRIPTION: For AML opcodes that have a target operand, display the full + * pathname for the target, in a comment field. Handles Return() + * statements also. + * + ******************************************************************************/ + +void +AcpiDmDisplayTargetPathname ( + ACPI_PARSE_OBJECT *Op) +{ + ACPI_PARSE_OBJECT *NextOp; + ACPI_PARSE_OBJECT *PrevOp = NULL; + char *Pathname; + const ACPI_OPCODE_INFO *OpInfo; + + + if (Op->Common.AmlOpcode == AML_RETURN_OP) + { + PrevOp = Op->Asl.Value.Arg; + } + else + { + OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); + if (!(OpInfo->Flags & AML_HAS_TARGET)) + { + return; + } + + /* Target is the last Op in the arg list */ + + NextOp = Op->Asl.Value.Arg; + while (NextOp) + { + PrevOp = NextOp; + NextOp = PrevOp->Asl.Next; + } + } + + if (!PrevOp) + { + return; + } + + /* We must have a namepath AML opcode */ + + if (PrevOp->Asl.AmlOpcode != AML_INT_NAMEPATH_OP) + { + return; + } + + /* A null string is the "no target specified" case */ + + if (!PrevOp->Asl.Value.String) + { + return; + } + + /* No node means "unresolved external reference" */ + + if (!PrevOp->Asl.Node) + { + AcpiOsPrintf (" /* External reference */"); + return; + } + + /* Ignore if path is already from the root */ + + if (*PrevOp->Asl.Value.String == '\\') + { + return; + } + + /* Now: we can get the full pathname */ + + Pathname = AcpiNsGetExternalPathname (PrevOp->Asl.Node); + if (!Pathname) + { + return; + } + + AcpiOsPrintf (" /* %s */", Pathname); + ACPI_FREE (Pathname); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmNotifyDescription + * + * PARAMETERS: Op - Name() parse object + * + * RETURN: None + * + * DESCRIPTION: Emit a description comment for the value associated with a + * Notify() operator. + * + ******************************************************************************/ + +void +AcpiDmNotifyDescription ( + ACPI_PARSE_OBJECT *Op) +{ + ACPI_PARSE_OBJECT *NextOp; + ACPI_NAMESPACE_NODE *Node; + UINT8 NotifyValue; + UINT8 Type = ACPI_TYPE_ANY; + + + /* The notify value is the second argument */ + + NextOp = Op->Asl.Value.Arg; + NextOp = NextOp->Asl.Next; + + switch (NextOp->Common.AmlOpcode) + { + case AML_ZERO_OP: + case AML_ONE_OP: + + NotifyValue = (UINT8) NextOp->Common.AmlOpcode; + break; + + case AML_BYTE_OP: + + NotifyValue = (UINT8) NextOp->Asl.Value.Integer; + break; + + default: + return; + } + + /* + * Attempt to get the namespace node so we can determine the object type. + * Some notify values are dependent on the object type (Device, Thermal, + * or Processor). + */ + Node = Op->Asl.Node; + if (Node) + { + Type = Node->Type; + } + + AcpiOsPrintf (" // %s", AcpiUtGetNotifyName (NotifyValue, Type)); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmPredefinedDescription * * PARAMETERS: Op - Name() parse object @@ -255,14 +410,11 @@ /* Match the name in the info table */ - for (Info = AslPredefinedInfo; Info->Name; Info++) + Info = AcpiAhMatchPredefinedName (NameString); + if (Info) { - if (ACPI_COMPARE_NAME (NameString, Info->Name)) - { - AcpiOsPrintf (" // %4.4s: %s", - NameString, ACPI_CAST_PTR (char, Info->Description)); - return; - } + AcpiOsPrintf (" // %4.4s: %s", + NameString, ACPI_CAST_PTR (char, Info->Description)); } #endif @@ -339,14 +491,11 @@ /* Match the name in the info table */ - for (Info = AslPredefinedInfo; Info->Name; Info++) + Info = AcpiAhMatchPredefinedName (Tag); + if (Info) { - if (ACPI_COMPARE_NAME (Tag, Info->Name)) - { - AcpiOsPrintf (" // %4.4s: %s", Tag, - ACPI_CAST_PTR (char, Info->Description)); - return; - } + AcpiOsPrintf (" // %4.4s: %s", Tag, + ACPI_CAST_PTR (char, Info->Description)); } #endif @@ -599,6 +748,7 @@ ACPI_PARSE_OBJECT *Child; ACPI_STATUS Status; UINT8 *Aml; + const AH_DEVICE_ID *IdInfo; if (!Op) @@ -677,7 +827,7 @@ if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) { - AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); + AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer); } else { @@ -689,7 +839,7 @@ if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) { - AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); + AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer); } else { @@ -706,6 +856,19 @@ case AML_STRING_OP: AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT16_MAX); + + /* For _HID/_CID strings, attempt to output a descriptive comment */ + + if (Op->Common.DisasmOpcode == ACPI_DASM_HID_STRING) + { + /* If we know about the ID, emit the description */ + + IdInfo = AcpiAhMatchHardwareId (Op->Common.Value.String); + if (IdInfo) + { + AcpiOsPrintf (" /* %s */", IdInfo->Description); + } + } break; case AML_BUFFER_OP: diff -Nru fwts-14.03.00/src/acpica/source/components/disassembler/dmwalk.c fwts-14.03.01/src/acpica/source/components/disassembler/dmwalk.c --- fwts-14.03.00/src/acpica/source/components/disassembler/dmwalk.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/disassembler/dmwalk.c 2014-03-27 02:14:17.000000000 +0000 @@ -640,7 +640,7 @@ /* Check for _HID and related EISAID() */ - AcpiDmIsEisaId (Op); + AcpiDmCheckForHardwareId (Op); AcpiOsPrintf (", "); break; @@ -914,6 +914,15 @@ AcpiDmFieldPredefinedDescription (Op); } + /* Decode Notify() values */ + + if (Op->Common.AmlOpcode == AML_NOTIFY_OP) + { + AcpiDmNotifyDescription (Op); + } + + AcpiDmDisplayTargetPathname (Op); + /* Could be a nested operator, check if comma required */ if (!AcpiDmCommaIfListMember (Op)) diff -Nru fwts-14.03.00/src/acpica/source/components/dispatcher/dsmethod.c fwts-14.03.01/src/acpica/source/components/dispatcher/dsmethod.c --- fwts-14.03.00/src/acpica/source/components/dispatcher/dsmethod.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/dispatcher/dsmethod.c 2014-03-27 02:14:17.000000000 +0000 @@ -258,8 +258,15 @@ * At this point, we know we have a Named object opcode. * Mark the method as serialized. Later code will create a mutex for * this method to enforce serialization. + * + * Note, ACPI_METHOD_IGNORE_SYNC_LEVEL flag means that we will ignore the + * Sync Level mechanism for this method, even though it is now serialized. + * Otherwise, there can be conflicts with existing ASL code that actually + * uses sync levels. */ - WalkState->MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED; + WalkState->MethodDesc->Method.SyncLevel = 0; + WalkState->MethodDesc->Method.InfoFlags |= + (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Method serialized [%4.4s] %p - [%s] (%4.4X)\n", @@ -449,11 +456,16 @@ /* * The CurrentSyncLevel (per-thread) must be less than or equal to * the sync level of the method. This mechanism provides some - * deadlock prevention + * deadlock prevention. + * + * If the method was auto-serialized, we just ignore the sync level + * mechanism, because auto-serialization of methods can interfere + * with ASL code that actually uses sync levels. * * Top-level method invocation has no walk state at this point */ if (WalkState && + (!(ObjDesc->Method.InfoFlags & ACPI_METHOD_IGNORE_SYNC_LEVEL)) && (WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel)) { ACPI_ERROR ((AE_INFO, @@ -921,7 +933,8 @@ * thread exits here. */ MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING; - MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED; + MethodDesc->Method.InfoFlags |= + (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL); MethodDesc->Method.SyncLevel = 0; } diff -Nru fwts-14.03.00/src/acpica/source/components/events/evmisc.c fwts-14.03.01/src/acpica/source/components/events/evmisc.c --- fwts-14.03.00/src/acpica/source/components/events/evmisc.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/events/evmisc.c 2014-03-27 02:14:17.000000000 +0000 @@ -253,7 +253,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n", AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type), - NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node)); + NotifyValue, AcpiUtGetNotifyName (NotifyValue, ACPI_TYPE_ANY), Node)); Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch, Info); diff -Nru fwts-14.03.00/src/acpica/source/components/events/evsci.c fwts-14.03.01/src/acpica/source/components/events/evsci.c --- fwts-14.03.00/src/acpica/source/components/events/evsci.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/events/evsci.c 2014-03-27 02:14:17.000000000 +0000 @@ -208,7 +208,7 @@ /* - * We are guaranteed by the ACPI CA initialization/shutdown code that + * We are guaranteed by the ACPICA initialization/shutdown code that * if this interrupt handler is installed, ACPI is enabled. */ diff -Nru fwts-14.03.00/src/acpica/source/components/events/evxface.c fwts-14.03.01/src/acpica/source/components/events/evxface.c --- fwts-14.03.00/src/acpica/source/components/events/evxface.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/events/evxface.c 2014-03-27 02:14:17.000000000 +0000 @@ -338,7 +338,7 @@ ACPI_OPERAND_OBJECT *ObjDesc; ACPI_OPERAND_OBJECT *HandlerObj; ACPI_OPERAND_OBJECT *PreviousHandlerObj; - ACPI_STATUS Status; + ACPI_STATUS Status = AE_OK; UINT32 i; @@ -353,16 +353,6 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - /* Make sure all deferred notify tasks are completed */ - - AcpiOsWaitEventsComplete (); - - Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* Root Object. Global handlers are removed here */ if (Device == ACPI_ROOT_OBJECT) @@ -371,6 +361,12 @@ { if (HandlerType & (i+1)) { + Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + if (!AcpiGbl_GlobalNotify[i].Handler || (AcpiGbl_GlobalNotify[i].Handler != Handler)) { @@ -383,18 +379,23 @@ AcpiGbl_GlobalNotify[i].Handler = NULL; AcpiGbl_GlobalNotify[i].Context = NULL; + + (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + + /* Make sure all deferred notify tasks are completed */ + + AcpiOsWaitEventsComplete (); } } - goto UnlockAndExit; + return_ACPI_STATUS (AE_OK); } /* All other objects: Are Notifies allowed on this object? */ if (!AcpiEvIsNotifyObject (Node)) { - Status = AE_TYPE; - goto UnlockAndExit; + return_ACPI_STATUS (AE_TYPE); } /* Must have an existing internal object */ @@ -402,8 +403,7 @@ ObjDesc = AcpiNsGetAttachedObject (Node); if (!ObjDesc) { - Status = AE_NOT_EXIST; - goto UnlockAndExit; + return_ACPI_STATUS (AE_NOT_EXIST); } /* Internal object exists. Find the handler and remove it */ @@ -412,6 +412,12 @@ { if (HandlerType & (i+1)) { + Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + HandlerObj = ObjDesc->CommonNotify.NotifyList[i]; PreviousHandlerObj = NULL; @@ -443,10 +449,17 @@ HandlerObj->Notify.Next[i]; } + (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + + /* Make sure all deferred notify tasks are completed */ + + AcpiOsWaitEventsComplete (); AcpiUtRemoveReference (HandlerObj); } } + return_ACPI_STATUS (Status); + UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); @@ -592,6 +605,8 @@ return_ACPI_STATUS (Status); } +ACPI_EXPORT_SYMBOL (AcpiInstallSciHandler) + /******************************************************************************* * @@ -668,6 +683,8 @@ return_ACPI_STATUS (Status); } +ACPI_EXPORT_SYMBOL (AcpiRemoveSciHandler) + /******************************************************************************* * @@ -1042,10 +1059,6 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - /* Make sure all deferred GPE tasks are completed */ - - AcpiOsWaitEventsComplete (); - Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) { @@ -1102,10 +1115,17 @@ (void) AcpiEvAddGpeReference (GpeEventInfo); } + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); + + /* Make sure all deferred GPE tasks are completed */ + + AcpiOsWaitEventsComplete (); + /* Now we can free the handler object */ ACPI_FREE (Handler); - + return_ACPI_STATUS (Status); UnlockAndExit: AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); diff -Nru fwts-14.03.00/src/acpica/source/components/executer/exconfig.c fwts-14.03.01/src/acpica/source/components/executer/exconfig.c --- fwts-14.03.00/src/acpica/source/components/executer/exconfig.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/executer/exconfig.c 2014-03-27 02:14:17.000000000 +0000 @@ -453,8 +453,8 @@ ACPI_WALK_STATE *WalkState) { ACPI_OPERAND_OBJECT *DdbHandle; + ACPI_TABLE_HEADER *TableHeader; ACPI_TABLE_HEADER *Table; - ACPI_TABLE_DESC TableDesc; UINT32 TableIndex; ACPI_STATUS Status; UINT32 Length; @@ -463,8 +463,6 @@ ACPI_FUNCTION_TRACE (ExLoadOp); - ACPI_MEMSET (&TableDesc, 0, sizeof (ACPI_TABLE_DESC)); - /* Source Object can be either an OpRegion or a Buffer/Field */ switch (ObjDesc->Common.Type) @@ -496,16 +494,16 @@ /* Get the table header first so we can get the table length */ - Table = ACPI_ALLOCATE (sizeof (ACPI_TABLE_HEADER)); - if (!Table) + TableHeader = ACPI_ALLOCATE (sizeof (ACPI_TABLE_HEADER)); + if (!TableHeader) { return_ACPI_STATUS (AE_NO_MEMORY); } Status = AcpiExRegionRead (ObjDesc, sizeof (ACPI_TABLE_HEADER), - ACPI_CAST_PTR (UINT8, Table)); - Length = Table->Length; - ACPI_FREE (Table); + ACPI_CAST_PTR (UINT8, TableHeader)); + Length = TableHeader->Length; + ACPI_FREE (TableHeader); if (ACPI_FAILURE (Status)) { @@ -537,8 +535,8 @@ /* Allocate a buffer for the table */ - TableDesc.Pointer = ACPI_ALLOCATE (Length); - if (!TableDesc.Pointer) + Table = ACPI_ALLOCATE (Length); + if (!Table) { return_ACPI_STATUS (AE_NO_MEMORY); } @@ -546,14 +544,12 @@ /* Read the entire table */ Status = AcpiExRegionRead (ObjDesc, Length, - ACPI_CAST_PTR (UINT8, TableDesc.Pointer)); + ACPI_CAST_PTR (UINT8, Table)); if (ACPI_FAILURE (Status)) { - ACPI_FREE (TableDesc.Pointer); + ACPI_FREE (Table); return_ACPI_STATUS (Status); } - - TableDesc.Address = ObjDesc->Region.Address; break; case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */ @@ -570,8 +566,8 @@ /* Get the actual table length from the table header */ - Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer); - Length = Table->Length; + TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer); + Length = TableHeader->Length; /* Table cannot extend beyond the buffer */ @@ -588,14 +584,13 @@ * Copy the table from the buffer because the buffer could be modified * or even deleted in the future */ - TableDesc.Pointer = ACPI_ALLOCATE (Length); - if (!TableDesc.Pointer) + Table = ACPI_ALLOCATE (Length); + if (!Table) { return_ACPI_STATUS (AE_NO_MEMORY); } - ACPI_MEMCPY (TableDesc.Pointer, Table, Length); - TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer); + ACPI_MEMCPY (Table, TableHeader, Length); break; default: @@ -603,28 +598,31 @@ return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } - /* Validate table checksum (will not get validated in TbAddTable) */ + /* Install the new table into the local data structures */ + + ACPI_INFO ((AE_INFO, "Dynamic OEM Table Load:")); + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - Status = AcpiTbVerifyChecksum (TableDesc.Pointer, Length); + Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table), + ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, TRUE, + &TableIndex); + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); if (ACPI_FAILURE (Status)) { - ACPI_FREE (TableDesc.Pointer); + /* Delete allocated table buffer */ + + ACPI_FREE (Table); return_ACPI_STATUS (Status); } - /* Complete the table descriptor */ - - TableDesc.Length = Length; - TableDesc.Flags = ACPI_TABLE_ORIGIN_ALLOCATED; - - /* Install the new table into the local data structures */ - - Status = AcpiTbAddTable (&TableDesc, &TableIndex); + /* + * Note: Now table is "INSTALLED", it must be validated before + * loading. + */ + Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]); if (ACPI_FAILURE (Status)) { - /* Delete allocated table buffer */ - - AcpiTbDeleteTable (&TableDesc); return_ACPI_STATUS (Status); } @@ -656,9 +654,6 @@ return_ACPI_STATUS (Status); } - ACPI_INFO ((AE_INFO, "Dynamic OEM Table Load:")); - AcpiTbPrintTableHeader (0, TableDesc.Pointer); - /* Remove the reference by added by AcpiExStore above */ AcpiUtRemoveReference (DdbHandle); @@ -667,7 +662,7 @@ if (AcpiGbl_TableHandler) { - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, TableDesc.Pointer, + (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table, AcpiGbl_TableHandlerContext); } @@ -701,6 +696,14 @@ /* + * Temporarily emit a warning so that the ASL for the machine can be + * hopefully obtained. This is to say that the Unload() operator is + * extremely rare if not completely unused. + */ + ACPI_WARNING ((AE_INFO, + "Received request to unload an ACPI table")); + + /* * Validate the handle * Although the handle is partially validated in AcpiExReconfiguration() * when it calls AcpiExResolveOperands(), the handle is more completely diff -Nru fwts-14.03.00/src/acpica/source/components/executer/exdump.c fwts-14.03.01/src/acpica/source/components/executer/exdump.c --- fwts-14.03.00/src/acpica/source/components/executer/exdump.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/executer/exdump.c 2014-03-27 02:14:17.000000000 +0000 @@ -227,10 +227,11 @@ {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Method.AmlStart), "Aml Start"} }; -static ACPI_EXDUMP_INFO AcpiExDumpMutex[5] = +static ACPI_EXDUMP_INFO AcpiExDumpMutex[6] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpMutex), NULL}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Mutex.SyncLevel), "Sync Level"}, + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Mutex.OriginalSyncLevel), "Original Sync Level"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Mutex.OwnerThread), "Owner Thread"}, {ACPI_EXD_UINT16, ACPI_EXD_OFFSET (Mutex.AcquisitionDepth), "Acquire Depth"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Mutex.OsMutex), "OsMutex"} diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbdata.c fwts-14.03.01/src/acpica/source/components/tables/tbdata.c --- fwts-14.03.00/src/acpica/source/components/tables/tbdata.c 1970-01-01 00:00:00.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbdata.c 2014-03-27 02:14:17.000000000 +0000 @@ -0,0 +1,888 @@ +/****************************************************************************** + * + * Module Name: tbdata - Table manager data structure functions + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#define __TBDATA_C__ + +#include "acpi.h" +#include "accommon.h" +#include "acnamesp.h" +#include "actables.h" + +#define _COMPONENT ACPI_TABLES + ACPI_MODULE_NAME ("tbdata") + + +/******************************************************************************* + * + * FUNCTION: AcpiTbInitTableDescriptor + * + * PARAMETERS: TableDesc - Table descriptor + * Address - Physical address of the table + * Flags - Allocation flags of the table + * Table - Pointer to the table + * + * RETURN: None + * + * DESCRIPTION: Initialize a new table descriptor + * + ******************************************************************************/ + +void +AcpiTbInitTableDescriptor ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + ACPI_TABLE_HEADER *Table) +{ + + /* + * Initialize the table descriptor. Set the pointer to NULL, since the + * table is not fully mapped at this time. + */ + ACPI_MEMSET (TableDesc, 0, sizeof (ACPI_TABLE_DESC)); + TableDesc->Address = Address; + TableDesc->Length = Table->Length; + TableDesc->Flags = Flags; + ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbAcquireTable + * + * PARAMETERS: TableDesc - Table descriptor + * TablePtr - Where table is returned + * TableLength - Where table length is returned + * TableFlags - Where table allocation flags are returned + * + * RETURN: Status + * + * DESCRIPTION: Acquire an ACPI table. It can be used for tables not + * maintained in the AcpiGbl_RootTableList. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbAcquireTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_TABLE_HEADER **TablePtr, + UINT32 *TableLength, + UINT8 *TableFlags) +{ + ACPI_TABLE_HEADER *Table = NULL; + + + switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) + { + case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL: + + Table = AcpiOsMapMemory (TableDesc->Address, TableDesc->Length); + break; + + case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: + case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: + + Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, TableDesc->Address); + break; + + default: + + break; + } + + /* Table is not valid yet */ + + if (!Table) + { + return (AE_NO_MEMORY); + } + + /* Fill the return values */ + + *TablePtr = Table; + *TableLength = TableDesc->Length; + *TableFlags = TableDesc->Flags; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbReleaseTable + * + * PARAMETERS: Table - Pointer for the table + * TableLength - Length for the table + * TableFlags - Allocation flags for the table + * + * RETURN: None + * + * DESCRIPTION: Release a table. The inverse of AcpiTbAcquireTable(). + * + ******************************************************************************/ + +void +AcpiTbReleaseTable ( + ACPI_TABLE_HEADER *Table, + UINT32 TableLength, + UINT8 TableFlags) +{ + + switch (TableFlags & ACPI_TABLE_ORIGIN_MASK) + { + case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL: + + AcpiOsUnmapMemory (Table, TableLength); + break; + + case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: + case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: + default: + + break; + } +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbAcquireTempTable + * + * PARAMETERS: TableDesc - Table descriptor to be acquired + * Address - Address of the table + * Flags - Allocation flags of the table + * + * RETURN: Status + * + * DESCRIPTION: This function validates the table header to obtain the length + * of a table and fills the table descriptor to make its state as + * "INSTALLED". Such a table descriptor is only used for verified + * installation. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbAcquireTempTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags) +{ + ACPI_TABLE_HEADER *TableHeader; + + + switch (Flags & ACPI_TABLE_ORIGIN_MASK) + { + case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL: + + /* Get the length of the full table from the header */ + + TableHeader = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER)); + if (!TableHeader) + { + return (AE_NO_MEMORY); + } + + AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader); + AcpiOsUnmapMemory (TableHeader, sizeof (ACPI_TABLE_HEADER)); + return (AE_OK); + + case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: + case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: + + TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Address); + if (!TableHeader) + { + return (AE_NO_MEMORY); + } + + AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader); + return (AE_OK); + + default: + + break; + } + + /* Table is not valid yet */ + + return (AE_NO_MEMORY); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbReleaseTempTable + * + * PARAMETERS: TableDesc - Table descriptor to be released + * + * RETURN: Status + * + * DESCRIPTION: The inverse of AcpiTbAcquireTempTable(). + * + *****************************************************************************/ + +void +AcpiTbReleaseTempTable ( + ACPI_TABLE_DESC *TableDesc) +{ + + /* + * Note that the .Address is maintained by the callers of + * AcpiTbAcquireTempTable(), thus do not invoke AcpiTbUninstallTable() + * where .Address will be freed. + */ + AcpiTbInvalidateTable (TableDesc); +} + + +/****************************************************************************** + * + * FUNCTION: AcpiTbValidateTable + * + * PARAMETERS: TableDesc - Table descriptor + * + * RETURN: Status + * + * DESCRIPTION: This function is called to validate the table, the returned + * table descriptor is in "VALIDATED" state. + * + *****************************************************************************/ + +ACPI_STATUS +AcpiTbValidateTable ( + ACPI_TABLE_DESC *TableDesc) +{ + ACPI_STATUS Status = AE_OK; + + + ACPI_FUNCTION_TRACE (TbValidateTable); + + + /* Validate the table if necessary */ + + if (!TableDesc->Pointer) + { + Status = AcpiTbAcquireTable (TableDesc, &TableDesc->Pointer, + &TableDesc->Length, &TableDesc->Flags); + if (!TableDesc->Pointer) + { + Status = AE_NO_MEMORY; + } + } + + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbInvalidateTable + * + * PARAMETERS: TableDesc - Table descriptor + * + * RETURN: None + * + * DESCRIPTION: Invalidate one internal ACPI table, this is the inverse of + * AcpiTbValidateTable(). + * + ******************************************************************************/ + +void +AcpiTbInvalidateTable ( + ACPI_TABLE_DESC *TableDesc) +{ + + ACPI_FUNCTION_TRACE (TbInvalidateTable); + + + /* Table must be validated */ + + if (!TableDesc->Pointer) + { + return_VOID; + } + + AcpiTbReleaseTable (TableDesc->Pointer, TableDesc->Length, + TableDesc->Flags); + TableDesc->Pointer = NULL; + + return_VOID; +} + + +/****************************************************************************** + * + * FUNCTION: AcpiTbVerifyTable + * + * PARAMETERS: TableDesc - Table descriptor + * Signature - Table signature to verify + * + * RETURN: Status + * + * DESCRIPTION: This function is called to validate and verify the table, the + * returned table descriptor is in "VALIDATED" state. + * + *****************************************************************************/ + +ACPI_STATUS +AcpiTbVerifyTable ( + ACPI_TABLE_DESC *TableDesc, + char *Signature) +{ + ACPI_STATUS Status = AE_OK; + + + ACPI_FUNCTION_TRACE (TbVerifyTable); + + + /* Validate the table */ + + Status = AcpiTbValidateTable (TableDesc); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } + + /* If a particular signature is expected (DSDT/FACS), it must match */ + + if (Signature && + !ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) + { + ACPI_BIOS_ERROR ((AE_INFO, + "Invalid signature 0x%X for ACPI table, expected [%s]", + TableDesc->Signature.Integer, Signature)); + Status = AE_BAD_SIGNATURE; + goto InvalidateAndExit; + } + + /* Verify the checksum */ + + Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length); + if (ACPI_FAILURE (Status)) + { + ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, + "%4.4s " ACPI_PRINTF_UINT + " Attempted table install failed", + AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ? + TableDesc->Signature.Ascii : "????", + ACPI_FORMAT_TO_UINT (TableDesc->Address))); + goto InvalidateAndExit; + } + + return_ACPI_STATUS (AE_OK); + +InvalidateAndExit: + AcpiTbInvalidateTable (TableDesc); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbResizeRootTableList + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Expand the size of global table array + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbResizeRootTableList ( + void) +{ + ACPI_TABLE_DESC *Tables; + UINT32 TableCount; + + + ACPI_FUNCTION_TRACE (TbResizeRootTableList); + + + /* AllowResize flag is a parameter to AcpiInitializeTables */ + + if (!(AcpiGbl_RootTableList.Flags & ACPI_ROOT_ALLOW_RESIZE)) + { + ACPI_ERROR ((AE_INFO, "Resize of Root Table Array is not allowed")); + return_ACPI_STATUS (AE_SUPPORT); + } + + /* Increase the Table Array size */ + + if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) + { + TableCount = AcpiGbl_RootTableList.MaxTableCount; + } + else + { + TableCount = AcpiGbl_RootTableList.CurrentTableCount; + } + + Tables = ACPI_ALLOCATE_ZEROED ( + ((ACPI_SIZE) TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT) * + sizeof (ACPI_TABLE_DESC)); + if (!Tables) + { + ACPI_ERROR ((AE_INFO, "Could not allocate new root table array")); + return_ACPI_STATUS (AE_NO_MEMORY); + } + + /* Copy and free the previous table array */ + + if (AcpiGbl_RootTableList.Tables) + { + ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, + (ACPI_SIZE) TableCount * sizeof (ACPI_TABLE_DESC)); + + if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) + { + ACPI_FREE (AcpiGbl_RootTableList.Tables); + } + } + + AcpiGbl_RootTableList.Tables = Tables; + AcpiGbl_RootTableList.MaxTableCount = + TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT; + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED; + + return_ACPI_STATUS (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbGetNextRootIndex + * + * PARAMETERS: TableIndex - Where table index is returned + * + * RETURN: Status and table index. + * + * DESCRIPTION: Allocate a new ACPI table entry to the global table list + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbGetNextRootIndex ( + UINT32 *TableIndex) +{ + ACPI_STATUS Status; + + + /* Ensure that there is room for the table in the Root Table List */ + + if (AcpiGbl_RootTableList.CurrentTableCount >= + AcpiGbl_RootTableList.MaxTableCount) + { + Status = AcpiTbResizeRootTableList(); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + + *TableIndex = AcpiGbl_RootTableList.CurrentTableCount; + AcpiGbl_RootTableList.CurrentTableCount++; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbTerminate + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Delete all internal ACPI tables + * + ******************************************************************************/ + +void +AcpiTbTerminate ( + void) +{ + UINT32 i; + + + ACPI_FUNCTION_TRACE (TbTerminate); + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + + /* Delete the individual tables */ + + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) + { + AcpiTbUninstallTable (&AcpiGbl_RootTableList.Tables[i]); + } + + /* + * Delete the root table array if allocated locally. Array cannot be + * mapped, so we don't need to check for that flag. + */ + if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) + { + ACPI_FREE (AcpiGbl_RootTableList.Tables); + } + + AcpiGbl_RootTableList.Tables = NULL; + AcpiGbl_RootTableList.Flags = 0; + AcpiGbl_RootTableList.CurrentTableCount = 0; + + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Tables freed\n")); + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_VOID; +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbDeleteNamespaceByOwner + * + * PARAMETERS: TableIndex - Table index + * + * RETURN: Status + * + * DESCRIPTION: Delete all namespace objects created when this table was loaded. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbDeleteNamespaceByOwner ( + UINT32 TableIndex) +{ + ACPI_OWNER_ID OwnerId; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (TbDeleteNamespaceByOwner); + + + Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + if (TableIndex >= AcpiGbl_RootTableList.CurrentTableCount) + { + /* The table index does not exist */ + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_ACPI_STATUS (AE_NOT_EXIST); + } + + /* Get the owner ID for this table, used to delete namespace nodes */ + + OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId; + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + + /* + * Need to acquire the namespace writer lock to prevent interference + * with any concurrent namespace walks. The interpreter must be + * released during the deletion since the acquisition of the deletion + * lock may block, and also since the execution of a namespace walk + * must be allowed to use the interpreter. + */ + (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER); + Status = AcpiUtAcquireWriteLock (&AcpiGbl_NamespaceRwLock); + + AcpiNsDeleteNamespaceByOwner (OwnerId); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + AcpiUtReleaseWriteLock (&AcpiGbl_NamespaceRwLock); + + Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbAllocateOwnerId + * + * PARAMETERS: TableIndex - Table index + * + * RETURN: Status + * + * DESCRIPTION: Allocates OwnerId in TableDesc + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbAllocateOwnerId ( + UINT32 TableIndex) +{ + ACPI_STATUS Status = AE_BAD_PARAMETER; + + + ACPI_FUNCTION_TRACE (TbAllocateOwnerId); + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + { + Status = AcpiUtAllocateOwnerId ( + &(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId)); + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbReleaseOwnerId + * + * PARAMETERS: TableIndex - Table index + * + * RETURN: Status + * + * DESCRIPTION: Releases OwnerId in TableDesc + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbReleaseOwnerId ( + UINT32 TableIndex) +{ + ACPI_STATUS Status = AE_BAD_PARAMETER; + + + ACPI_FUNCTION_TRACE (TbReleaseOwnerId); + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + { + AcpiUtReleaseOwnerId ( + &(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId)); + Status = AE_OK; + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbGetOwnerId + * + * PARAMETERS: TableIndex - Table index + * OwnerId - Where the table OwnerId is returned + * + * RETURN: Status + * + * DESCRIPTION: returns OwnerId for the ACPI table + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbGetOwnerId ( + UINT32 TableIndex, + ACPI_OWNER_ID *OwnerId) +{ + ACPI_STATUS Status = AE_BAD_PARAMETER; + + + ACPI_FUNCTION_TRACE (TbGetOwnerId); + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + { + *OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId; + Status = AE_OK; + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbIsTableLoaded + * + * PARAMETERS: TableIndex - Index into the root table + * + * RETURN: Table Loaded Flag + * + ******************************************************************************/ + +BOOLEAN +AcpiTbIsTableLoaded ( + UINT32 TableIndex) +{ + BOOLEAN IsLoaded = FALSE; + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + { + IsLoaded = (BOOLEAN) + (AcpiGbl_RootTableList.Tables[TableIndex].Flags & + ACPI_TABLE_IS_LOADED); + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return (IsLoaded); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbSetTableLoadedFlag + * + * PARAMETERS: TableIndex - Table index + * IsLoaded - TRUE if table is loaded, FALSE otherwise + * + * RETURN: None + * + * DESCRIPTION: Sets the table loaded flag to either TRUE or FALSE. + * + ******************************************************************************/ + +void +AcpiTbSetTableLoadedFlag ( + UINT32 TableIndex, + BOOLEAN IsLoaded) +{ + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + { + if (IsLoaded) + { + AcpiGbl_RootTableList.Tables[TableIndex].Flags |= + ACPI_TABLE_IS_LOADED; + } + else + { + AcpiGbl_RootTableList.Tables[TableIndex].Flags &= + ~ACPI_TABLE_IS_LOADED; + } + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); +} diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbfadt.c fwts-14.03.01/src/acpica/source/components/tables/tbfadt.c --- fwts-14.03.00/src/acpica/source/components/tables/tbfadt.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbfadt.c 2014-03-27 02:14:17.000000000 +0000 @@ -437,14 +437,14 @@ /* Obtain the DSDT and FACS tables via their addresses within the FADT */ - AcpiTbInstallTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt, + AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt, ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); /* If Hardware Reduced flag is set, there is no FACS */ if (!AcpiGbl_ReducedHardware) { - AcpiTbInstallTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs, + AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs, ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS); } } diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbfind.c fwts-14.03.01/src/acpica/source/components/tables/tbfind.c --- fwts-14.03.00/src/acpica/source/components/tables/tbfind.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbfind.c 2014-03-27 02:14:17.000000000 +0000 @@ -180,7 +180,7 @@ { /* Table is not currently mapped, map it */ - Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]); + Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[i]); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbinstal.c fwts-14.03.01/src/acpica/source/components/tables/tbinstal.c --- fwts-14.03.00/src/acpica/source/components/tables/tbinstal.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbinstal.c 2014-03-27 02:14:17.000000000 +0000 @@ -113,779 +113,528 @@ * *****************************************************************************/ - #define __TBINSTAL_C__ #include "acpi.h" #include "accommon.h" -#include "acnamesp.h" #include "actables.h" - #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME ("tbinstal") +/* Local prototypes */ + +static BOOLEAN +AcpiTbCompareTables ( + ACPI_TABLE_DESC *TableDesc, + UINT32 TableIndex); + -/****************************************************************************** +/******************************************************************************* * - * FUNCTION: AcpiTbVerifyTable + * FUNCTION: AcpiTbCompareTables * - * PARAMETERS: TableDesc - table + * PARAMETERS: TableDesc - Table 1 descriptor to be compared + * TableIndex - Index of table 2 to be compared * - * RETURN: Status + * RETURN: TRUE if both tables are identical. * - * DESCRIPTION: this function is called to verify and map table + * DESCRIPTION: This function compares a table with another table that has + * already been installed in the root table list. * - *****************************************************************************/ + ******************************************************************************/ -ACPI_STATUS -AcpiTbVerifyTable ( - ACPI_TABLE_DESC *TableDesc) +static BOOLEAN +AcpiTbCompareTables ( + ACPI_TABLE_DESC *TableDesc, + UINT32 TableIndex) { ACPI_STATUS Status = AE_OK; + BOOLEAN IsIdentical; + ACPI_TABLE_HEADER *Table; + UINT32 TableLength; + UINT8 TableFlags; - ACPI_FUNCTION_TRACE (TbVerifyTable); - - - /* Map the table if necessary */ - - if (!TableDesc->Pointer) + Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex], + &Table, &TableLength, &TableFlags); + if (ACPI_FAILURE (Status)) { - if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) == - ACPI_TABLE_ORIGIN_MAPPED) - { - TableDesc->Pointer = AcpiOsMapMemory ( - TableDesc->Address, TableDesc->Length); - } - - if (!TableDesc->Pointer) - { - return_ACPI_STATUS (AE_NO_MEMORY); - } + return (FALSE); } - /* Always calculate checksum, ignore bad checksum if requested */ + /* + * Check for a table match on the entire table length, + * not just the header. + */ + IsIdentical = (BOOLEAN)((TableDesc->Length != TableLength || + ACPI_MEMCMP (TableDesc->Pointer, Table, TableLength)) ? + FALSE : TRUE); - Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length); + /* Release the acquired table */ - return_ACPI_STATUS (Status); + AcpiTbReleaseTable (Table, TableLength, TableFlags); + return (IsIdentical); } /******************************************************************************* * - * FUNCTION: AcpiTbAddTable + * FUNCTION: AcpiTbInstallTableWithOverride * - * PARAMETERS: TableDesc - Table descriptor - * TableIndex - Where the table index is returned + * PARAMETERS: TableIndex - Index into root table array + * NewTableDesc - New table descriptor to install + * Override - Whether override should be performed * - * RETURN: Status + * RETURN: None * - * DESCRIPTION: This function is called to add an ACPI table. It is used to - * dynamically load tables via the Load and LoadTable AML - * operators. + * DESCRIPTION: Install an ACPI table into the global data structure. The + * table override mechanism is called to allow the host + * OS to replace any table before it is installed in the root + * table array. * ******************************************************************************/ -ACPI_STATUS -AcpiTbAddTable ( - ACPI_TABLE_DESC *TableDesc, - UINT32 *TableIndex) +void +AcpiTbInstallTableWithOverride ( + UINT32 TableIndex, + ACPI_TABLE_DESC *NewTableDesc, + BOOLEAN Override) { - UINT32 i; - ACPI_STATUS Status = AE_OK; - - ACPI_FUNCTION_TRACE (TbAddTable); - - - if (!TableDesc->Pointer) + if (TableIndex >= AcpiGbl_RootTableList.CurrentTableCount) { - Status = AcpiTbVerifyTable (TableDesc); - if (ACPI_FAILURE (Status) || !TableDesc->Pointer) - { - return_ACPI_STATUS (Status); - } + return; } /* - * Validate the incoming table signature. + * ACPI Table Override: * - * 1) Originally, we checked the table signature for "SSDT" or "PSDT". - * 2) We added support for OEMx tables, signature "OEM". - * 3) Valid tables were encountered with a null signature, so we just - * gave up on validating the signature, (05/2008). - * 4) We encountered non-AML tables such as the MADT, which caused - * interpreter errors and kernel faults. So now, we once again allow - * only "SSDT", "OEMx", and now, also a null signature. (05/2011). + * Before we install the table, let the host OS override it with a new + * one if desired. Any table within the RSDT/XSDT can be replaced, + * including the DSDT which is pointed to by the FADT. */ - if ((TableDesc->Pointer->Signature[0] != 0x00) && - (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) && - (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3))) + if (Override) { - ACPI_BIOS_ERROR ((AE_INFO, - "Table has invalid signature [%4.4s] (0x%8.8X), " - "must be SSDT or OEMx", - AcpiUtValidAcpiName (TableDesc->Pointer->Signature) ? - TableDesc->Pointer->Signature : "????", - *(UINT32 *) TableDesc->Pointer->Signature)); - - return_ACPI_STATUS (AE_BAD_SIGNATURE); + AcpiTbOverrideTable (NewTableDesc); } - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + AcpiTbInitTableDescriptor (&AcpiGbl_RootTableList.Tables[TableIndex], + NewTableDesc->Address, NewTableDesc->Flags, NewTableDesc->Pointer); - /* Check if table is already registered */ + AcpiTbPrintTableHeader (NewTableDesc->Address, NewTableDesc->Pointer); - for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) - { - if (!AcpiGbl_RootTableList.Tables[i].Pointer) - { - Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]); - if (ACPI_FAILURE (Status) || - !AcpiGbl_RootTableList.Tables[i].Pointer) - { - continue; - } - } - - /* - * Check for a table match on the entire table length, - * not just the header. - */ - if (TableDesc->Length != AcpiGbl_RootTableList.Tables[i].Length) - { - continue; - } - - if (ACPI_MEMCMP (TableDesc->Pointer, - AcpiGbl_RootTableList.Tables[i].Pointer, - AcpiGbl_RootTableList.Tables[i].Length)) - { - continue; - } - - /* - * Note: the current mechanism does not unregister a table if it is - * dynamically unloaded. The related namespace entries are deleted, - * but the table remains in the root table list. - * - * The assumption here is that the number of different tables that - * will be loaded is actually small, and there is minimal overhead - * in just keeping the table in case it is needed again. - * - * If this assumption changes in the future (perhaps on large - * machines with many table load/unload operations), tables will - * need to be unregistered when they are unloaded, and slots in the - * root table list should be reused when empty. - */ - - /* - * Table is already registered. - * We can delete the table that was passed as a parameter. - */ - AcpiTbDeleteTable (TableDesc); - *TableIndex = i; + /* Set the global integer width (based upon revision of the DSDT) */ - if (AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_LOADED) - { - /* Table is still loaded, this is an error */ - - Status = AE_ALREADY_EXISTS; - goto Release; - } - else - { - /* Table was unloaded, allow it to be reloaded */ - - TableDesc->Pointer = AcpiGbl_RootTableList.Tables[i].Pointer; - TableDesc->Address = AcpiGbl_RootTableList.Tables[i].Address; - Status = AE_OK; - goto PrintHeader; - } - } - - /* - * ACPI Table Override: - * Allow the host to override dynamically loaded tables. - * NOTE: the table is fully mapped at this point, and the mapping will - * be deleted by TbTableOverride if the table is actually overridden. - */ - (void) AcpiTbTableOverride (TableDesc->Pointer, TableDesc); - - /* Add the table to the global root table list */ - - Status = AcpiTbStoreTable (TableDesc->Address, TableDesc->Pointer, - TableDesc->Length, TableDesc->Flags, TableIndex); - if (ACPI_FAILURE (Status)) + if (TableIndex == ACPI_TABLE_INDEX_DSDT) { - goto Release; + AcpiUtSetIntegerWidth (NewTableDesc->Pointer->Revision); } - -PrintHeader: - AcpiTbPrintTableHeader (TableDesc->Address, TableDesc->Pointer); - -Release: - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); } /******************************************************************************* * - * FUNCTION: AcpiTbTableOverride + * FUNCTION: AcpiTbInstallFixedTable * - * PARAMETERS: TableHeader - Header for the original table - * TableDesc - Table descriptor initialized for the - * original table. May or may not be mapped. - * - * RETURN: Pointer to the entire new table. NULL if table not overridden. - * If overridden, installs the new table within the input table - * descriptor. + * PARAMETERS: Address - Physical address of DSDT or FACS + * Signature - Table signature, NULL if no need to + * match + * TableIndex - Index into root table array * - * DESCRIPTION: Attempt table override by calling the OSL override functions. - * Note: If the table is overridden, then the entire new table - * is mapped and returned by this function. + * RETURN: Status + * + * DESCRIPTION: Install a fixed ACPI table (DSDT/FACS) into the global data + * structure. * ******************************************************************************/ -ACPI_TABLE_HEADER * -AcpiTbTableOverride ( - ACPI_TABLE_HEADER *TableHeader, - ACPI_TABLE_DESC *TableDesc) +ACPI_STATUS +AcpiTbInstallFixedTable ( + ACPI_PHYSICAL_ADDRESS Address, + char *Signature, + UINT32 TableIndex) { + ACPI_TABLE_DESC NewTableDesc; ACPI_STATUS Status; - ACPI_TABLE_HEADER *NewTable = NULL; - ACPI_PHYSICAL_ADDRESS NewAddress = 0; - UINT32 NewTableLength = 0; - UINT8 NewFlags; - char *OverrideType; - /* (1) Attempt logical override (returns a logical address) */ + ACPI_FUNCTION_TRACE (TbInstallFixedTable); - Status = AcpiOsTableOverride (TableHeader, &NewTable); - if (ACPI_SUCCESS (Status) && NewTable) + + if (!Address) { - NewAddress = ACPI_PTR_TO_PHYSADDR (NewTable); - NewTableLength = NewTable->Length; - NewFlags = ACPI_TABLE_ORIGIN_OVERRIDE; - OverrideType = "Logical"; - goto FinishOverride; + ACPI_ERROR ((AE_INFO, "Null physical address for ACPI table [%s]", + Signature)); + return (AE_NO_MEMORY); } - /* (2) Attempt physical override (returns a physical address) */ + /* Fill a table descriptor for validation */ - Status = AcpiOsPhysicalTableOverride (TableHeader, - &NewAddress, &NewTableLength); - if (ACPI_SUCCESS (Status) && NewAddress && NewTableLength) + Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); + if (ACPI_FAILURE (Status)) { - /* Map the entire new table */ - - NewTable = AcpiOsMapMemory (NewAddress, NewTableLength); - if (!NewTable) - { - ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, - "%4.4s " ACPI_PRINTF_UINT - " Attempted physical table override failed", - TableHeader->Signature, - ACPI_FORMAT_TO_UINT (TableDesc->Address))); - return (NULL); - } - - OverrideType = "Physical"; - NewFlags = ACPI_TABLE_ORIGIN_MAPPED; - goto FinishOverride; + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p", + ACPI_CAST_PTR (void, Address))); + return_ACPI_STATUS (Status); } - return (NULL); /* There was no override */ - - -FinishOverride: - - ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT - " %s table override, new table: " ACPI_PRINTF_UINT, - TableHeader->Signature, - ACPI_FORMAT_TO_UINT (TableDesc->Address), - OverrideType, ACPI_FORMAT_TO_UINT (NewTable))); + /* Validate and verify a table before installation */ - /* We can now unmap/delete the original table (if fully mapped) */ + Status = AcpiTbVerifyTable (&NewTableDesc, Signature); + if (ACPI_FAILURE (Status)) + { + goto ReleaseAndExit; + } - AcpiTbDeleteTable (TableDesc); + AcpiTbInstallTableWithOverride (TableIndex, &NewTableDesc, TRUE); - /* Setup descriptor for the new table */ +ReleaseAndExit: - TableDesc->Address = NewAddress; - TableDesc->Pointer = NewTable; - TableDesc->Length = NewTableLength; - TableDesc->Flags = NewFlags; + /* Release the temporary table descriptor */ - return (NewTable); + AcpiTbReleaseTempTable (&NewTableDesc); + return_ACPI_STATUS (Status); } /******************************************************************************* * - * FUNCTION: AcpiTbResizeRootTableList + * FUNCTION: AcpiTbInstallStandardTable * - * PARAMETERS: None + * PARAMETERS: Address - Address of the table (might be a virtual + * address depending on the TableFlags) + * Flags - Flags for the table + * Reload - Whether reload should be performed + * Override - Whether override should be performed + * TableIndex - Where the table index is returned * * RETURN: Status * - * DESCRIPTION: Expand the size of global table array + * DESCRIPTION: This function is called to install an ACPI table that is + * neither DSDT nor FACS (a "standard" table.) + * When this function is called by "Load" or "LoadTable" opcodes, + * or by AcpiLoadTable() API, the "Reload" parameter is set. + * After sucessfully returning from this function, table is + * "INSTALLED" but not "VALIDATED". * ******************************************************************************/ ACPI_STATUS -AcpiTbResizeRootTableList ( - void) +AcpiTbInstallStandardTable ( + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + BOOLEAN Reload, + BOOLEAN Override, + UINT32 *TableIndex) { - ACPI_TABLE_DESC *Tables; - UINT32 TableCount; - - - ACPI_FUNCTION_TRACE (TbResizeRootTableList); + UINT32 i; + ACPI_STATUS Status = AE_OK; + ACPI_TABLE_DESC NewTableDesc; - /* AllowResize flag is a parameter to AcpiInitializeTables */ + ACPI_FUNCTION_TRACE (TbInstallStandardTable); - if (!(AcpiGbl_RootTableList.Flags & ACPI_ROOT_ALLOW_RESIZE)) - { - ACPI_ERROR ((AE_INFO, "Resize of Root Table Array is not allowed")); - return_ACPI_STATUS (AE_SUPPORT); - } - /* Increase the Table Array size */ + /* Acquire a temporary table descriptor for validation */ - if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) - { - TableCount = AcpiGbl_RootTableList.MaxTableCount; - } - else + Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags); + if (ACPI_FAILURE (Status)) { - TableCount = AcpiGbl_RootTableList.CurrentTableCount; + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p", + ACPI_CAST_PTR (void, Address))); + return_ACPI_STATUS (Status); } - Tables = ACPI_ALLOCATE_ZEROED ( - ((ACPI_SIZE) TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT) * - sizeof (ACPI_TABLE_DESC)); - if (!Tables) + /* + * Optionally do not load any SSDTs from the RSDT/XSDT. This can + * be useful for debugging ACPI problems on some machines. + */ + if (!Reload && + AcpiGbl_DisableSsdtTableInstall && + ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) { - ACPI_ERROR ((AE_INFO, "Could not allocate new root table array")); - return_ACPI_STATUS (AE_NO_MEMORY); + ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %p", + NewTableDesc.Signature.Ascii, ACPI_CAST_PTR (void, Address))); + goto ReleaseAndExit; } - /* Copy and free the previous table array */ + /* Validate and verify a table before installation */ - if (AcpiGbl_RootTableList.Tables) + Status = AcpiTbVerifyTable (&NewTableDesc, NULL); + if (ACPI_FAILURE (Status)) { - ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, - (ACPI_SIZE) TableCount * sizeof (ACPI_TABLE_DESC)); - - if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) - { - ACPI_FREE (AcpiGbl_RootTableList.Tables); - } + goto ReleaseAndExit; } - AcpiGbl_RootTableList.Tables = Tables; - AcpiGbl_RootTableList.MaxTableCount = - TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT; - AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED; - - return_ACPI_STATUS (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbStoreTable - * - * PARAMETERS: Address - Table address - * Table - Table header - * Length - Table length - * Flags - flags - * - * RETURN: Status and table index. - * - * DESCRIPTION: Add an ACPI table to the global table list - * - ******************************************************************************/ - -ACPI_STATUS -AcpiTbStoreTable ( - ACPI_PHYSICAL_ADDRESS Address, - ACPI_TABLE_HEADER *Table, - UINT32 Length, - UINT8 Flags, - UINT32 *TableIndex) -{ - ACPI_STATUS Status; - ACPI_TABLE_DESC *NewTable; - + if (Reload) + { + /* + * Validate the incoming table signature. + * + * 1) Originally, we checked the table signature for "SSDT" or "PSDT". + * 2) We added support for OEMx tables, signature "OEM". + * 3) Valid tables were encountered with a null signature, so we just + * gave up on validating the signature, (05/2008). + * 4) We encountered non-AML tables such as the MADT, which caused + * interpreter errors and kernel faults. So now, we once again allow + * only "SSDT", "OEMx", and now, also a null signature. (05/2011). + */ + if ((NewTableDesc.Signature.Ascii[0] != 0x00) && + (!ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) && + (ACPI_STRNCMP (NewTableDesc.Signature.Ascii, "OEM", 3))) + { + ACPI_BIOS_ERROR ((AE_INFO, + "Table has invalid signature [%4.4s] (0x%8.8X), " + "must be SSDT or OEMx", + AcpiUtValidAcpiName (NewTableDesc.Signature.Ascii) ? + NewTableDesc.Signature.Ascii : "????", + NewTableDesc.Signature.Integer)); + + Status = AE_BAD_SIGNATURE; + goto ReleaseAndExit; + } + + /* Check if table is already registered */ + + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) + { + /* + * Check for a table match on the entire table length, + * not just the header. + */ + if (!AcpiTbCompareTables (&NewTableDesc, i)) + { + continue; + } - /* Ensure that there is room for the table in the Root Table List */ + /* + * Note: the current mechanism does not unregister a table if it is + * dynamically unloaded. The related namespace entries are deleted, + * but the table remains in the root table list. + * + * The assumption here is that the number of different tables that + * will be loaded is actually small, and there is minimal overhead + * in just keeping the table in case it is needed again. + * + * If this assumption changes in the future (perhaps on large + * machines with many table load/unload operations), tables will + * need to be unregistered when they are unloaded, and slots in the + * root table list should be reused when empty. + */ + if (AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_LOADED) + { + /* Table is still loaded, this is an error */ - if (AcpiGbl_RootTableList.CurrentTableCount >= - AcpiGbl_RootTableList.MaxTableCount) - { - Status = AcpiTbResizeRootTableList(); - if (ACPI_FAILURE (Status)) - { - return (Status); + Status = AE_ALREADY_EXISTS; + goto ReleaseAndExit; + } + else + { + /* + * Table was unloaded, allow it to be reloaded. + * As we are going to return AE_OK to the caller, we should + * take the responsibility of freeing the input descriptor. + * Refill the input descriptor to ensure + * AcpiTbInstallTableWithOverride() can be called again to + * indicate the re-installation. + */ + AcpiTbUninstallTable (&NewTableDesc); + *TableIndex = i; + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_ACPI_STATUS (AE_OK); + } } } - NewTable = &AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.CurrentTableCount]; - - /* Initialize added table */ - - NewTable->Address = Address; - NewTable->Pointer = Table; - NewTable->Length = Length; - NewTable->OwnerId = 0; - NewTable->Flags = Flags; - - ACPI_MOVE_32_TO_32 (&NewTable->Signature, Table->Signature); - - *TableIndex = AcpiGbl_RootTableList.CurrentTableCount; - AcpiGbl_RootTableList.CurrentTableCount++; - return (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbDeleteTable - * - * PARAMETERS: TableIndex - Table index - * - * RETURN: None - * - * DESCRIPTION: Delete one internal ACPI table - * - ******************************************************************************/ - -void -AcpiTbDeleteTable ( - ACPI_TABLE_DESC *TableDesc) -{ - - /* Table must be mapped or allocated */ + /* Add the table to the global root table list */ - if (!TableDesc->Pointer) + Status = AcpiTbGetNextRootIndex (&i); + if (ACPI_FAILURE (Status)) { - return; + goto ReleaseAndExit; } - switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) - { - case ACPI_TABLE_ORIGIN_MAPPED: + *TableIndex = i; + AcpiTbInstallTableWithOverride (i, &NewTableDesc, Override); - AcpiOsUnmapMemory (TableDesc->Pointer, TableDesc->Length); - break; +ReleaseAndExit: - case ACPI_TABLE_ORIGIN_ALLOCATED: - - ACPI_FREE (TableDesc->Pointer); - break; - - /* Not mapped or allocated, there is nothing we can do */ - - default: - - return; - } + /* Release the temporary table descriptor */ - TableDesc->Pointer = NULL; + AcpiTbReleaseTempTable (&NewTableDesc); + return_ACPI_STATUS (Status); } /******************************************************************************* * - * FUNCTION: AcpiTbTerminate + * FUNCTION: AcpiTbOverrideTable * - * PARAMETERS: None + * PARAMETERS: OldTableDesc - Validated table descriptor to be + * overridden * * RETURN: None * - * DESCRIPTION: Delete all internal ACPI tables + * DESCRIPTION: Attempt table override by calling the OSL override functions. + * Note: If the table is overridden, then the entire new table + * is acquired and returned by this function. + * Before/after invocation, the table descriptor is in a state + * that is "VALIDATED". * ******************************************************************************/ void -AcpiTbTerminate ( - void) +AcpiTbOverrideTable ( + ACPI_TABLE_DESC *OldTableDesc) { - UINT32 i; - - - ACPI_FUNCTION_TRACE (TbTerminate); - + ACPI_STATUS Status; + char *OverrideType; + ACPI_TABLE_DESC NewTableDesc; + ACPI_TABLE_HEADER *Table; + ACPI_PHYSICAL_ADDRESS Address; + UINT32 Length; - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - /* Delete the individual tables */ + /* (1) Attempt logical override (returns a logical address) */ - for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) + Status = AcpiOsTableOverride (OldTableDesc->Pointer, &Table); + if (ACPI_SUCCESS (Status) && Table) { - AcpiTbDeleteTable (&AcpiGbl_RootTableList.Tables[i]); + AcpiTbAcquireTempTable (&NewTableDesc, ACPI_PTR_TO_PHYSADDR (Table), + ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL); + OverrideType = "Logical"; + goto FinishOverride; } - /* - * Delete the root table array if allocated locally. Array cannot be - * mapped, so we don't need to check for that flag. - */ - if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED) + /* (2) Attempt physical override (returns a physical address) */ + + Status = AcpiOsPhysicalTableOverride (OldTableDesc->Pointer, + &Address, &Length); + if (ACPI_SUCCESS (Status) && Address && Length) { - ACPI_FREE (AcpiGbl_RootTableList.Tables); + AcpiTbAcquireTempTable (&NewTableDesc, Address, + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); + OverrideType = "Physical"; + goto FinishOverride; } - AcpiGbl_RootTableList.Tables = NULL; - AcpiGbl_RootTableList.Flags = 0; - AcpiGbl_RootTableList.CurrentTableCount = 0; - - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Tables freed\n")); - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - - return_VOID; -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbDeleteNamespaceByOwner - * - * PARAMETERS: TableIndex - Table index - * - * RETURN: Status - * - * DESCRIPTION: Delete all namespace objects created when this table was loaded. - * - ******************************************************************************/ - -ACPI_STATUS -AcpiTbDeleteNamespaceByOwner ( - UINT32 TableIndex) -{ - ACPI_OWNER_ID OwnerId; - ACPI_STATUS Status; + return; /* There was no override */ - ACPI_FUNCTION_TRACE (TbDeleteNamespaceByOwner); +FinishOverride: + /* Validate and verify a table before overriding */ - Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES); + Status = AcpiTbVerifyTable (&NewTableDesc, NULL); if (ACPI_FAILURE (Status)) { - return_ACPI_STATUS (Status); + return; } - if (TableIndex >= AcpiGbl_RootTableList.CurrentTableCount) - { - /* The table index does not exist */ - - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (AE_NOT_EXIST); - } + ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT + " %s table override, new table: " ACPI_PRINTF_UINT, + OldTableDesc->Signature.Ascii, + ACPI_FORMAT_TO_UINT (OldTableDesc->Address), + OverrideType, ACPI_FORMAT_TO_UINT (NewTableDesc.Address))); - /* Get the owner ID for this table, used to delete namespace nodes */ + /* We can now uninstall the original table */ - OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId; - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + AcpiTbUninstallTable (OldTableDesc); /* - * Need to acquire the namespace writer lock to prevent interference - * with any concurrent namespace walks. The interpreter must be - * released during the deletion since the acquisition of the deletion - * lock may block, and also since the execution of a namespace walk - * must be allowed to use the interpreter. + * Replace the original table descriptor and keep its state as + * "VALIDATED". */ - (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER); - Status = AcpiUtAcquireWriteLock (&AcpiGbl_NamespaceRwLock); + AcpiTbInitTableDescriptor (OldTableDesc, NewTableDesc.Address, + NewTableDesc.Flags, NewTableDesc.Pointer); + AcpiTbValidateTable (OldTableDesc); - AcpiNsDeleteNamespaceByOwner (OwnerId); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - - AcpiUtReleaseWriteLock (&AcpiGbl_NamespaceRwLock); + /* Release the temporary table descriptor */ - Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); - return_ACPI_STATUS (Status); + AcpiTbReleaseTempTable (&NewTableDesc); } /******************************************************************************* * - * FUNCTION: AcpiTbAllocateOwnerId + * FUNCTION: AcpiTbStoreTable * - * PARAMETERS: TableIndex - Table index + * PARAMETERS: Address - Table address + * Table - Table header + * Length - Table length + * Flags - Install flags + * TableIndex - Where the table index is returned * - * RETURN: Status + * RETURN: Status and table index. * - * DESCRIPTION: Allocates OwnerId in TableDesc + * DESCRIPTION: Add an ACPI table to the global table list * ******************************************************************************/ ACPI_STATUS -AcpiTbAllocateOwnerId ( - UINT32 TableIndex) +AcpiTbStoreTable ( + ACPI_PHYSICAL_ADDRESS Address, + ACPI_TABLE_HEADER *Table, + UINT32 Length, + UINT8 Flags, + UINT32 *TableIndex) { - ACPI_STATUS Status = AE_BAD_PARAMETER; - - - ACPI_FUNCTION_TRACE (TbAllocateOwnerId); + ACPI_STATUS Status; + ACPI_TABLE_DESC *TableDesc; - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + Status = AcpiTbGetNextRootIndex (TableIndex); + if (ACPI_FAILURE (Status)) { - Status = AcpiUtAllocateOwnerId - (&(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId)); + return (Status); } - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbReleaseOwnerId - * - * PARAMETERS: TableIndex - Table index - * - * RETURN: Status - * - * DESCRIPTION: Releases OwnerId in TableDesc - * - ******************************************************************************/ - -ACPI_STATUS -AcpiTbReleaseOwnerId ( - UINT32 TableIndex) -{ - ACPI_STATUS Status = AE_BAD_PARAMETER; - - - ACPI_FUNCTION_TRACE (TbReleaseOwnerId); - - - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) - { - AcpiUtReleaseOwnerId ( - &(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId)); - Status = AE_OK; - } + /* Initialize added table */ - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); + TableDesc = &AcpiGbl_RootTableList.Tables[*TableIndex]; + AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table); + TableDesc->Pointer = Table; + return (AE_OK); } /******************************************************************************* * - * FUNCTION: AcpiTbGetOwnerId + * FUNCTION: AcpiTbUninstallTable * - * PARAMETERS: TableIndex - Table index - * OwnerId - Where the table OwnerId is returned + * PARAMETERS: TableDesc - Table descriptor * - * RETURN: Status + * RETURN: None * - * DESCRIPTION: returns OwnerId for the ACPI table + * DESCRIPTION: Delete one internal ACPI table * ******************************************************************************/ -ACPI_STATUS -AcpiTbGetOwnerId ( - UINT32 TableIndex, - ACPI_OWNER_ID *OwnerId) +void +AcpiTbUninstallTable ( + ACPI_TABLE_DESC *TableDesc) { - ACPI_STATUS Status = AE_BAD_PARAMETER; - - - ACPI_FUNCTION_TRACE (TbGetOwnerId); - - - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) - { - *OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId; - Status = AE_OK; - } - - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); -} - -/******************************************************************************* - * - * FUNCTION: AcpiTbIsTableLoaded - * - * PARAMETERS: TableIndex - Table index - * - * RETURN: Table Loaded Flag - * - ******************************************************************************/ + ACPI_FUNCTION_TRACE (TbUninstallTable); -BOOLEAN -AcpiTbIsTableLoaded ( - UINT32 TableIndex) -{ - BOOLEAN IsLoaded = FALSE; + /* Table must be installed */ - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + if (!TableDesc->Address) { - IsLoaded = (BOOLEAN) - (AcpiGbl_RootTableList.Tables[TableIndex].Flags & - ACPI_TABLE_IS_LOADED); + return_VOID; } - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return (IsLoaded); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbSetTableLoadedFlag - * - * PARAMETERS: TableIndex - Table index - * IsLoaded - TRUE if table is loaded, FALSE otherwise - * - * RETURN: None - * - * DESCRIPTION: Sets the table loaded flag to either TRUE or FALSE. - * - ******************************************************************************/ - -void -AcpiTbSetTableLoadedFlag ( - UINT32 TableIndex, - BOOLEAN IsLoaded) -{ + AcpiTbInvalidateTable (TableDesc); - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - if (TableIndex < AcpiGbl_RootTableList.CurrentTableCount) + if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) == + ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) { - if (IsLoaded) - { - AcpiGbl_RootTableList.Tables[TableIndex].Flags |= - ACPI_TABLE_IS_LOADED; - } - else - { - AcpiGbl_RootTableList.Tables[TableIndex].Flags &= - ~ACPI_TABLE_IS_LOADED; - } + ACPI_FREE (ACPI_CAST_PTR (void, TableDesc->Address)); } - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL); + return_VOID; } diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbutils.c fwts-14.03.01/src/acpica/source/components/tables/tbutils.c --- fwts-14.03.00/src/acpica/source/components/tables/tbutils.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbutils.c 2014-03-27 02:14:17.000000000 +0000 @@ -269,9 +269,12 @@ } ACPI_MEMCPY (NewTable, TableDesc->Pointer, TableDesc->Length); - AcpiTbDeleteTable (TableDesc); - TableDesc->Pointer = NewTable; - TableDesc->Flags = ACPI_TABLE_ORIGIN_ALLOCATED; + AcpiTbUninstallTable (TableDesc); + + AcpiTbInitTableDescriptor ( + &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT], + ACPI_PTR_TO_PHYSADDR (NewTable), ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, + NewTable); ACPI_INFO ((AE_INFO, "Forced DSDT copy: length 0x%05X copied locally, original unmapped", @@ -283,125 +286,6 @@ /******************************************************************************* * - * FUNCTION: AcpiTbInstallTable - * - * PARAMETERS: Address - Physical address of DSDT or FACS - * Signature - Table signature, NULL if no need to - * match - * TableIndex - Index into root table array - * - * RETURN: None - * - * DESCRIPTION: Install an ACPI table into the global data structure. The - * table override mechanism is called to allow the host - * OS to replace any table before it is installed in the root - * table array. - * - ******************************************************************************/ - -void -AcpiTbInstallTable ( - ACPI_PHYSICAL_ADDRESS Address, - char *Signature, - UINT32 TableIndex) -{ - ACPI_TABLE_HEADER *Table; - ACPI_TABLE_HEADER *FinalTable; - ACPI_TABLE_DESC *TableDesc; - - - if (!Address) - { - ACPI_ERROR ((AE_INFO, "Null physical address for ACPI table [%s]", - Signature)); - return; - } - - /* Map just the table header */ - - Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER)); - if (!Table) - { - ACPI_ERROR ((AE_INFO, "Could not map memory for table [%s] at %p", - Signature, ACPI_CAST_PTR (void, Address))); - return; - } - - /* If a particular signature is expected (DSDT/FACS), it must match */ - - if (Signature && - !ACPI_COMPARE_NAME (Table->Signature, Signature)) - { - ACPI_BIOS_ERROR ((AE_INFO, - "Invalid signature 0x%X for ACPI table, expected [%s]", - *ACPI_CAST_PTR (UINT32, Table->Signature), Signature)); - goto UnmapAndExit; - } - - /* - * Initialize the table entry. Set the pointer to NULL, since the - * table is not fully mapped at this time. - */ - TableDesc = &AcpiGbl_RootTableList.Tables[TableIndex]; - - TableDesc->Address = Address; - TableDesc->Pointer = NULL; - TableDesc->Length = Table->Length; - TableDesc->Flags = ACPI_TABLE_ORIGIN_MAPPED; - ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature); - - /* - * ACPI Table Override: - * - * Before we install the table, let the host OS override it with a new - * one if desired. Any table within the RSDT/XSDT can be replaced, - * including the DSDT which is pointed to by the FADT. - * - * NOTE: If the table is overridden, then FinalTable will contain a - * mapped pointer to the full new table. If the table is not overridden, - * or if there has been a physical override, then the table will be - * fully mapped later (in verify table). In any case, we must - * unmap the header that was mapped above. - */ - FinalTable = AcpiTbTableOverride (Table, TableDesc); - if (!FinalTable) - { - FinalTable = Table; /* There was no override */ - } - - AcpiTbPrintTableHeader (TableDesc->Address, FinalTable); - - /* Set the global integer width (based upon revision of the DSDT) */ - - if (TableIndex == ACPI_TABLE_INDEX_DSDT) - { - AcpiUtSetIntegerWidth (FinalTable->Revision); - } - - /* - * If we have a physical override during this early loading of the ACPI - * tables, unmap the table for now. It will be mapped again later when - * it is actually used. This supports very early loading of ACPI tables, - * before virtual memory is fully initialized and running within the - * host OS. Note: A logical override has the ACPI_TABLE_ORIGIN_OVERRIDE - * flag set and will not be deleted below. - */ - if (FinalTable != Table) - { - AcpiTbDeleteTable (TableDesc); - } - - -UnmapAndExit: - - /* Always unmap the table header that we mapped above */ - - AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER)); -} - - -/******************************************************************************* - * * FUNCTION: AcpiTbGetRootTableEntry * * PARAMETERS: TableEntry - Pointer to the RSDT/XSDT table entry @@ -578,6 +462,7 @@ UINT32 Length; UINT8 *TableEntry; ACPI_STATUS Status; + UINT32 TableIndex; ACPI_FUNCTION_TRACE (TbParseRootTable); @@ -697,28 +582,20 @@ for (i = 0; i < TableCount; i++) { - if (AcpiGbl_RootTableList.CurrentTableCount >= - AcpiGbl_RootTableList.MaxTableCount) - { - /* There is no more room in the root table array, attempt resize */ - - Status = AcpiTbResizeRootTableList (); - if (ACPI_FAILURE (Status)) - { - ACPI_WARNING ((AE_INFO, "Truncating %u table entries!", - (unsigned) (TableCount - - (AcpiGbl_RootTableList.CurrentTableCount - 2)))); - break; - } - } - /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */ - AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.CurrentTableCount].Address = - AcpiTbGetRootTableEntry (TableEntry, TableEntrySize); + Status = AcpiTbInstallStandardTable ( + AcpiTbGetRootTableEntry (TableEntry, TableEntrySize), + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex); + + if (ACPI_SUCCESS (Status) && + ACPI_COMPARE_NAME (&AcpiGbl_RootTableList.Tables[TableIndex].Signature, + ACPI_SIG_FADT)) + { + AcpiTbParseFadt (TableIndex); + } TableEntry += TableEntrySize; - AcpiGbl_RootTableList.CurrentTableCount++; } /* @@ -727,23 +604,5 @@ */ AcpiOsUnmapMemory (Table, Length); - /* - * Complete the initialization of the root table array by examining - * the header of each table - */ - for (i = 2; i < AcpiGbl_RootTableList.CurrentTableCount; i++) - { - AcpiTbInstallTable (AcpiGbl_RootTableList.Tables[i].Address, - NULL, i); - - /* Special case for FADT - validate it then get the DSDT and FACS */ - - if (ACPI_COMPARE_NAME ( - &AcpiGbl_RootTableList.Tables[i].Signature, ACPI_SIG_FADT)) - { - AcpiTbParseFadt (i); - } - } - return_ACPI_STATUS (AE_OK); } diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbxface.c fwts-14.03.01/src/acpica/source/components/tables/tbxface.c --- fwts-14.03.00/src/acpica/source/components/tables/tbxface.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbxface.c 2014-03-27 02:14:17.000000000 +0000 @@ -334,7 +334,7 @@ { if ((AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_ORIGIN_MASK) == - ACPI_TABLE_ORIGIN_MAPPED) + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL) { Header = AcpiOsMapMemory ( AcpiGbl_RootTableList.Tables[i].Address, @@ -417,7 +417,7 @@ continue; } - Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]); + Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[i]); if (ACPI_SUCCESS (Status)) { *OutTable = AcpiGbl_RootTableList.Tables[i].Pointer; @@ -478,7 +478,7 @@ { /* Table is not mapped, map it */ - Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[TableIndex]); + Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]); if (ACPI_FAILURE (Status)) { (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); diff -Nru fwts-14.03.00/src/acpica/source/components/tables/tbxfload.c fwts-14.03.01/src/acpica/source/components/tables/tbxfload.c --- fwts-14.03.00/src/acpica/source/components/tables/tbxfload.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/tables/tbxfload.c 2014-03-27 02:14:17.000000000 +0000 @@ -203,7 +203,7 @@ !ACPI_COMPARE_NAME ( &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature), ACPI_SIG_DSDT) || - ACPI_FAILURE (AcpiTbVerifyTable ( + ACPI_FAILURE (AcpiTbValidateTable ( &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]))) { Status = AE_NO_ACPI_TABLES; @@ -214,7 +214,7 @@ * Save the DSDT pointer for simple access. This is the mapped memory * address. We must take care here because the address of the .Tables * array can change dynamically as tables are loaded at run-time. Note: - * .Pointer field is not validated until after call to AcpiTbVerifyTable. + * .Pointer field is not validated until after call to AcpiTbValidateTable. */ AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer; @@ -259,24 +259,12 @@ ACPI_SIG_SSDT) && !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature), ACPI_SIG_PSDT)) || - ACPI_FAILURE (AcpiTbVerifyTable ( + ACPI_FAILURE (AcpiTbValidateTable ( &AcpiGbl_RootTableList.Tables[i]))) { continue; } - /* - * Optionally do not load any SSDTs from the RSDT/XSDT. This can - * be useful for debugging ACPI problems on some machines. - */ - if (AcpiGbl_DisableSsdtTableLoad) - { - ACPI_INFO ((AE_INFO, "Ignoring %4.4s at %p", - AcpiGbl_RootTableList.Tables[i].Signature.Ascii, - ACPI_CAST_PTR (void, AcpiGbl_RootTableList.Tables[i].Address))); - continue; - } - /* Ignore errors while loading tables, get as many as possible */ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); @@ -294,6 +282,53 @@ /******************************************************************************* * + * FUNCTION: AcpiInstallTable + * + * PARAMETERS: Address - Address of the ACPI table to be installed. + * Physical - Whether the address is a physical table + * address or not + * + * RETURN: Status + * + * DESCRIPTION: Dynamically install an ACPI table. + * Note: This function should only be invoked after + * AcpiInitializeTables() and before AcpiLoadTables(). + * + ******************************************************************************/ + +ACPI_STATUS +AcpiInstallTable ( + ACPI_PHYSICAL_ADDRESS Address, + BOOLEAN Physical) +{ + ACPI_STATUS Status; + UINT8 Flags; + UINT32 TableIndex; + + + ACPI_FUNCTION_TRACE (AcpiInstallTable); + + + if (Physical) + { + Flags = ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL; + } + else + { + Flags = ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL; + } + + Status = AcpiTbInstallStandardTable (Address, Flags, + FALSE, FALSE, &TableIndex); + + return_ACPI_STATUS (Status); +} + +ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable) + + +/******************************************************************************* + * * FUNCTION: AcpiLoadTable * * PARAMETERS: Table - Pointer to a buffer containing the ACPI @@ -314,7 +349,6 @@ ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_TABLE_DESC TableDesc; UINT32 TableIndex; @@ -328,14 +362,6 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - /* Init local table descriptor */ - - ACPI_MEMSET (&TableDesc, 0, sizeof (ACPI_TABLE_DESC)); - TableDesc.Address = ACPI_PTR_TO_PHYSADDR (Table); - TableDesc.Pointer = Table; - TableDesc.Length = Table->Length; - TableDesc.Flags = ACPI_TABLE_ORIGIN_UNKNOWN; - /* Must acquire the interpreter lock during this operation */ Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); @@ -347,7 +373,23 @@ /* Install the table and load it into the namespace */ ACPI_INFO ((AE_INFO, "Host-directed Dynamic ACPI Table Load:")); - Status = AcpiTbAddTable (&TableDesc, &TableIndex); + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + + Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table), + ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, TRUE, FALSE, + &TableIndex); + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + if (ACPI_FAILURE (Status)) + { + goto UnlockAndExit; + } + + /* + * Note: Now table is "INSTALLED", it must be validated before + * using. + */ + Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]); if (ACPI_FAILURE (Status)) { goto UnlockAndExit; diff -Nru fwts-14.03.00/src/acpica/source/components/utilities/utdecode.c fwts-14.03.01/src/acpica/source/components/utilities/utdecode.c --- fwts-14.03.00/src/acpica/source/components/utilities/utdecode.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/utilities/utdecode.c 2014-03-27 02:14:17.000000000 +0000 @@ -599,7 +599,7 @@ /* Names for Notify() values, used for debug output */ -static const char *AcpiGbl_NotifyValueNames[ACPI_NOTIFY_MAX + 1] = +static const char *AcpiGbl_GenericNotify[ACPI_NOTIFY_MAX + 1] = { /* 00 */ "Bus Check", /* 01 */ "Device Check", @@ -611,32 +611,87 @@ /* 07 */ "Power Fault", /* 08 */ "Capabilities Check", /* 09 */ "Device PLD Check", - /* 10 */ "Reserved", - /* 11 */ "System Locality Update", - /* 12 */ "Shutdown Request" + /* 0A */ "Reserved", + /* 0B */ "System Locality Update", + /* 0C */ "Shutdown Request" }; +static const char *AcpiGbl_DeviceNotify[4] = +{ + /* 80 */ "Status Change", + /* 81 */ "Information Change", + /* 82 */ "Device-Specific Change", + /* 83 */ "Device-Specific Change" +}; + +static const char *AcpiGbl_ProcessorNotify[4] = +{ + /* 80 */ "Performance Capability Change", + /* 81 */ "C-State Change", + /* 82 */ "Throttling Capability Change", + /* 83 */ "Device-Specific Change" +}; + +static const char *AcpiGbl_ThermalNotify[4] = +{ + /* 80 */ "Thermal Status Change", + /* 81 */ "Thermal Trip Point Change", + /* 82 */ "Thermal Device List Change", + /* 83 */ "Thermal Relationship Change" +}; + + const char * AcpiUtGetNotifyName ( - UINT32 NotifyValue) + UINT32 NotifyValue, + ACPI_OBJECT_TYPE Type) { + /* 00 - 0C are common to all object types */ + if (NotifyValue <= ACPI_NOTIFY_MAX) { - return (AcpiGbl_NotifyValueNames[NotifyValue]); + return (AcpiGbl_GenericNotify[NotifyValue]); } - else if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) + + /* 0D - 7F are reserved */ + + if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) { return ("Reserved"); } - else if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) + + /* 80 - 83 are per-object-type */ + + if (NotifyValue <= 0x83) { - return ("Device Specific"); + switch (Type) + { + case ACPI_TYPE_ANY: + case ACPI_TYPE_DEVICE: + return (AcpiGbl_DeviceNotify [NotifyValue - 0x80]); + + case ACPI_TYPE_PROCESSOR: + return (AcpiGbl_ProcessorNotify [NotifyValue - 0x80]); + + case ACPI_TYPE_THERMAL: + return (AcpiGbl_ThermalNotify [NotifyValue - 0x80]); + + default: + return ("Target object type does not support notifies"); + } } - else + + /* 84 - BF are device-specific */ + + if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) { - return ("Hardware Specific"); + return ("Device-Specific"); } + + /* C0 and above are hardware-specific */ + + return ("Hardware-Specific"); } #endif diff -Nru fwts-14.03.00/src/acpica/source/components/utilities/utstring.c fwts-14.03.01/src/acpica/source/components/utilities/utstring.c --- fwts-14.03.00/src/acpica/source/components/utilities/utstring.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/components/utilities/utstring.c 2014-03-27 02:14:17.000000000 +0000 @@ -492,7 +492,7 @@ } AcpiOsPrintf ("\""); - for (i = 0; String[i] && (i < MaxLength); i++) + for (i = 0; (i < MaxLength) && String[i]; i++) { /* Escape sequences */ diff -Nru fwts-14.03.00/src/acpica/source/include/acapps.h fwts-14.03.01/src/acpica/source/include/acapps.h --- fwts-14.03.00/src/acpica/source/include/acapps.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acapps.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define _ACAPPS -#pragma pack(push) /* Set default struct packing */ - #ifdef _MSC_VER /* disable some level-4 warnings */ #pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */ #endif @@ -188,6 +186,14 @@ extern char *AcpiGbl_Optarg; +/* + * cmfsize - Common get file size function + */ +UINT32 +CmGetFileSize ( + FILE *File); + + #ifndef ACPI_DUMP_APP /* * adisasm @@ -293,6 +299,4 @@ char *OemTableId); #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACAPPS */ diff -Nru fwts-14.03.00/src/acpica/source/include/acbuffer.h fwts-14.03.01/src/acpica/source/include/acbuffer.h --- fwts-14.03.00/src/acpica/source/include/acbuffer.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acbuffer.h 2014-03-27 02:14:17.000000000 +0000 @@ -116,9 +116,6 @@ #ifndef __ACBUFFER_H__ #define __ACBUFFER_H__ - -#pragma pack(push) /* Set default struct packing */ - /* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT @@ -318,6 +315,4 @@ #define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* ACBUFFER_H */ diff -Nru fwts-14.03.00/src/acpica/source/include/acconfig.h fwts-14.03.01/src/acpica/source/include/acconfig.h --- fwts-14.03.00/src/acpica/source/include/acconfig.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acconfig.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define _ACCONFIG_H -#pragma pack(push) /* Set default struct packing */ - /****************************************************************************** * * Configuration options @@ -308,6 +306,4 @@ #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACCONFIG_H */ diff -Nru fwts-14.03.00/src/acpica/source/include/acdebug.h fwts-14.03.01/src/acpica/source/include/acdebug.h --- fwts-14.03.00/src/acpica/source/include/acdebug.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acdebug.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACDEBUG_H__ -#pragma pack(push) /* Set default struct packing */ - #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ typedef struct acpi_db_command_info @@ -540,6 +538,4 @@ UINT32 Value, char *Buffer); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACDEBUG_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acdisasm.h fwts-14.03.01/src/acpica/source/include/acdisasm.h --- fwts-14.03.00/src/acpica/source/include/acdisasm.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acdisasm.h 2014-03-27 02:14:17.000000000 +0000 @@ -119,8 +119,6 @@ #include "amlresrc.h" -#pragma pack(push) /* Set default struct packing */ - #define BLOCK_NONE 0 #define BLOCK_PAREN 1 #define BLOCK_BRACE 2 @@ -626,6 +624,14 @@ ACPI_PARSE_OBJECT *Op); void +AcpiDmDisplayTargetPathname ( + ACPI_PARSE_OBJECT *Op); + +void +AcpiDmNotifyDescription ( + ACPI_PARSE_OBJECT *Op); + +void AcpiDmPredefinedDescription ( ACPI_PARSE_OBJECT *Op); @@ -705,11 +711,11 @@ ACPI_PARSE_OBJECT *Op); void -AcpiDmIsEisaId ( +AcpiDmCheckForHardwareId ( ACPI_PARSE_OBJECT *Op); void -AcpiDmEisaId ( +AcpiDmDecompressEisaId ( UINT32 EncodedId); BOOLEAN @@ -1003,6 +1009,4 @@ char *Filename); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACDISASM_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acdispat.h fwts-14.03.01/src/acpica/source/include/acdispat.h --- fwts-14.03.00/src/acpica/source/include/acdispat.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acdispat.h 2014-03-27 02:14:17.000000000 +0000 @@ -118,8 +118,6 @@ #define _ACDISPAT_H_ -#pragma pack(push) /* Set default struct packing */ - #define NAMEOF_LOCAL_NTE "__L0" #define NAMEOF_ARG_NTE "__A0" @@ -536,6 +534,4 @@ ACPI_OPERAND_OBJECT *Object, ACPI_WALK_STATE *WalkState); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACDISPAT_H_ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acevents.h fwts-14.03.01/src/acpica/source/include/acevents.h --- fwts-14.03.00/src/acpica/source/include/acevents.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acevents.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACEVENTS_H__ -#pragma pack(push) /* Set default struct packing */ - /* * evevent */ @@ -430,6 +428,4 @@ AcpiEvTerminate ( void)) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACEVENTS_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acexcep.h fwts-14.03.01/src/acpica/source/include/acexcep.h --- fwts-14.03.00/src/acpica/source/include/acexcep.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acexcep.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACEXCEP_H__ -#pragma pack(push) /* Set default struct packing */ - /* This module contains all possible exception codes for ACPI_STATUS */ /* @@ -419,6 +417,4 @@ #endif /* EXCEPTION_TABLE */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACEXCEP_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acglobal.h fwts-14.03.01/src/acpica/source/include/acglobal.h --- fwts-14.03.00/src/acpica/source/include/acglobal.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acglobal.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACGLOBAL_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Ensure that the globals are actually defined and initialized only once. * @@ -179,8 +177,8 @@ /* * Create the predefined _OSI method in the namespace? Default is TRUE - * because ACPI CA is fully compatible with other ACPI implementations. - * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. + * because ACPICA is fully compatible with other ACPI implementations. + * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. */ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE); @@ -236,10 +234,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); /* - * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. + * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. * This can be useful for debugging ACPI problems on some machines. */ -ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableLoad, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE); /* * We keep track of the latest version of Windows that has been requested by @@ -434,7 +432,7 @@ ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); -ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); #endif @@ -591,8 +589,7 @@ ****************************************************************************/ extern const AH_PREDEFINED_NAME AslPredefinedInfo[]; +extern const AH_DEVICE_ID AslDeviceIds[]; -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACGLOBAL_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/achware.h fwts-14.03.01/src/acpica/source/include/achware.h --- fwts-14.03.00/src/acpica/source/include/achware.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/achware.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACHWARE_H__ -#pragma pack(push) /* Set default struct packing */ - /* Values for the _SST predefined method */ #define ACPI_SST_INDICATOR_OFF 0 @@ -298,6 +296,4 @@ ACPI_HANDLE PciRegion); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACHWARE_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acinterp.h fwts-14.03.01/src/acpica/source/include/acinterp.h --- fwts-14.03.00/src/acpica/source/include/acinterp.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acinterp.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACINTERP_H__ -#pragma pack(push) /* Set default struct packing */ - #define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) /* Macros for tables used for debug output */ @@ -793,6 +791,4 @@ void *HandlerContext, void *RegionContext); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __INTERP_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/aclocal.h fwts-14.03.01/src/acpica/source/include/aclocal.h --- fwts-14.03.00/src/acpica/source/include/aclocal.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/aclocal.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACLOCAL_H__ -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ #define ACPI_SERIALIZED 0xFF @@ -955,7 +953,8 @@ #define ACPI_DASM_MATCHOP 0x06 /* Parent opcode is a Match() operator */ #define ACPI_DASM_LNOT_PREFIX 0x07 /* Start of a LNotEqual (etc.) pair of opcodes */ #define ACPI_DASM_LNOT_SUFFIX 0x08 /* End of a LNotEqual (etc.) pair of opcodes */ -#define ACPI_DASM_IGNORE 0x09 /* Not used at this time */ +#define ACPI_DASM_HID_STRING 0x09 /* String is a _HID or _CID */ +#define ACPI_DASM_IGNORE 0x0A /* Not used at this time */ /* * Generic operation (for example: If, While, Store) @@ -1423,6 +1422,11 @@ } AH_PREDEFINED_NAME; -#pragma pack(pop) /* Restore original struct packing */ +typedef struct ah_device_id +{ + char *Name; + char *Description; + +} AH_DEVICE_ID; #endif /* __ACLOCAL_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acmacros.h fwts-14.03.01/src/acpica/source/include/acmacros.h --- fwts-14.03.00/src/acpica/source/include/acmacros.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acmacros.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACMACROS_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Extract data using a pointer. Any more than a byte and we * get into potential aligment issues -- see the STORE macros below. @@ -507,6 +505,4 @@ #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* ACMACROS_H */ diff -Nru fwts-14.03.00/src/acpica/source/include/acnamesp.h fwts-14.03.01/src/acpica/source/include/acnamesp.h --- fwts-14.03.00/src/acpica/source/include/acnamesp.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acnamesp.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACNAMESP_H__ -#pragma pack(push) /* Set default struct packing */ - /* To search the entire name space, pass this as SearchBase */ #define ACPI_NS_ALL ((ACPI_HANDLE)0) @@ -609,6 +607,4 @@ AcpiNsTerminate ( void); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACNAMESP_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acobject.h fwts-14.03.01/src/acpica/source/include/acobject.h --- fwts-14.03.00/src/acpica/source/include/acobject.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acobject.h 2014-03-27 02:14:17.000000000 +0000 @@ -116,8 +116,6 @@ #ifndef _ACOBJECT_H #define _ACOBJECT_H -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ @@ -306,7 +304,8 @@ #define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */ #define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */ #define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */ -#define ACPI_METHOD_MODIFIED_NAMESPACE 0x10 /* Method modified the namespace */ +#define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */ +#define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */ /****************************************************************************** @@ -655,6 +654,6 @@ } ACPI_DESCRIPTOR; -#pragma pack(pop) /* Restore original struct packing */ +#pragma pack() #endif /* _ACOBJECT_H */ diff -Nru fwts-14.03.00/src/acpica/source/include/acoutput.h fwts-14.03.01/src/acpica/source/include/acoutput.h --- fwts-14.03.00/src/acpica/source/include/acoutput.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acoutput.h 2014-03-27 02:14:17.000000000 +0000 @@ -116,8 +116,6 @@ #ifndef __ACOUTPUT_H__ #define __ACOUTPUT_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a @@ -538,6 +536,4 @@ #endif /* ACPI_DEBUG_OUTPUT */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACOUTPUT_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acparser.h fwts-14.03.01/src/acpica/source/include/acparser.h --- fwts-14.03.00/src/acpica/source/include/acparser.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acparser.h 2014-03-27 02:14:17.000000000 +0000 @@ -118,8 +118,6 @@ #define __ACPARSER_H__ -#pragma pack(push) /* Set default struct packing */ - #define OP_HAS_RETURN_VALUE 1 /* Variable number of arguments. This field must be 32 bits */ @@ -427,6 +425,4 @@ ACPI_PARSE_OBJECT *op); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACPARSER_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acpiosxf.h fwts-14.03.01/src/acpica/source/include/acpiosxf.h --- fwts-14.03.00/src/acpica/source/include/acpiosxf.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acpiosxf.h 2014-03-27 02:14:17.000000000 +0000 @@ -122,8 +122,6 @@ #include "actypes.h" -#pragma pack(push) /* Set default struct packing */ - /* Types for AcpiOsExecute */ typedef enum @@ -625,6 +623,4 @@ #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACPIOSXF_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acpixf.h fwts-14.03.01/src/acpica/source/include/acpixf.h --- fwts-14.03.00/src/acpica/source/include/acpixf.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acpixf.h 2014-03-27 02:14:17.000000000 +0000 @@ -119,15 +119,13 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20140214 +#define ACPI_CA_VERSION 0x20140325 #include "acconfig.h" #include "actypes.h" #include "actbl.h" #include "acbuffer.h" -#pragma pack(push) /* Set default struct packing */ - /* * Globals that are publically available */ @@ -148,7 +146,7 @@ extern UINT8 AcpiGbl_CopyDsdtLocally; extern UINT8 AcpiGbl_CreateOsiMethod; extern UINT8 AcpiGbl_DisableAutoRepair; -extern UINT8 AcpiGbl_DisableSsdtTableLoad; +extern UINT8 AcpiGbl_DisableSsdtTableInstall; extern UINT8 AcpiGbl_DoNotUseXsdt; extern UINT8 AcpiGbl_EnableAmlDebugObject; extern UINT8 AcpiGbl_EnableInterpreterSlack; @@ -276,6 +274,11 @@ * ACPI table load/unload interfaces */ ACPI_STATUS +AcpiInstallTable ( + ACPI_PHYSICAL_ADDRESS Address, + BOOLEAN Physical); + +ACPI_STATUS AcpiLoadTable ( ACPI_TABLE_HEADER *Table); @@ -905,6 +908,4 @@ ...); #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACXFACE_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acpredef.h fwts-14.03.01/src/acpica/source/include/acpredef.h --- fwts-14.03.00/src/acpica/source/include/acpredef.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acpredef.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACPREDEF_H__ -#pragma pack(push) /* Set default struct packing */ - /****************************************************************************** * * Return Package types @@ -1141,6 +1139,4 @@ extern const ACPI_PREDEFINED_INFO AcpiGbl_ResourceNames[]; #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif diff -Nru fwts-14.03.00/src/acpica/source/include/acresrc.h fwts-14.03.01/src/acpica/source/include/acresrc.h --- fwts-14.03.00/src/acpica/source/include/acresrc.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acresrc.h 2014-03-27 02:14:17.000000000 +0000 @@ -122,8 +122,6 @@ #include "amlresrc.h" -#pragma pack(push) /* Set default struct packing */ - /* * If possible, pack the following structures to byte alignment, since we * don't care about performance for debug output. Two cases where we cannot @@ -512,6 +510,4 @@ extern ACPI_RSDUMP_INFO AcpiRsDumpGeneralFlags[]; #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACRESRC_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acrestyp.h fwts-14.03.01/src/acpica/source/include/acrestyp.h --- fwts-14.03.00/src/acpica/source/include/acrestyp.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acrestyp.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACRESTYP_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Definitions for Resource Attributes */ @@ -771,6 +769,4 @@ } ACPI_PCI_ROUTING_TABLE; -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACRESTYP_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acstruct.h fwts-14.03.01/src/acpica/source/include/acstruct.h --- fwts-14.03.00/src/acpica/source/include/acstruct.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acstruct.h 2014-03-27 02:14:17.000000000 +0000 @@ -116,9 +116,6 @@ #ifndef __ACSTRUCT_H__ #define __ACSTRUCT_H__ - -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ /***************************************************************************** @@ -345,6 +342,4 @@ #define ACPI_DISPLAY_SHORT (UINT8) 2 -#pragma pack(pop) /* Restore original struct packing */ - #endif diff -Nru fwts-14.03.00/src/acpica/source/include/actables.h fwts-14.03.01/src/acpica/source/include/actables.h --- fwts-14.03.00/src/acpica/source/include/actables.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actables.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACTABLES_H__ -#pragma pack(push) /* Set default struct packing */ - ACPI_STATUS AcpiAllocateRootTable ( UINT32 InitialTableCount); @@ -137,6 +135,40 @@ /* + * tbdata - table data structure management + */ +ACPI_STATUS +AcpiTbGetNextRootIndex ( + UINT32 *TableIndex); + +void +AcpiTbInitTableDescriptor ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + ACPI_TABLE_HEADER *Table); + +ACPI_STATUS +AcpiTbAcquireTempTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags); + +void +AcpiTbReleaseTempTable ( + ACPI_TABLE_DESC *TableDesc); + +BOOLEAN +AcpiTbIsTableLoaded ( + UINT32 TableIndex); + +void +AcpiTbSetTableLoadedFlag ( + UINT32 TableIndex, + BOOLEAN IsLoaded); + + +/* * tbfadt - FADT parse/convert/validate */ void @@ -168,17 +200,41 @@ void); ACPI_STATUS -AcpiTbVerifyTable ( +AcpiTbValidateTable ( ACPI_TABLE_DESC *TableDesc); -ACPI_TABLE_HEADER * -AcpiTbTableOverride ( - ACPI_TABLE_HEADER *TableHeader, +void +AcpiTbInvalidateTable ( ACPI_TABLE_DESC *TableDesc); ACPI_STATUS -AcpiTbAddTable ( +AcpiTbVerifyTable ( + ACPI_TABLE_DESC *TableDesc, + char *Signature); + +void +AcpiTbOverrideTable ( + ACPI_TABLE_DESC *OldTableDesc); + +ACPI_STATUS +AcpiTbAcquireTable ( ACPI_TABLE_DESC *TableDesc, + ACPI_TABLE_HEADER **TablePtr, + UINT32 *TableLength, + UINT8 *TableFlags); + +void +AcpiTbReleaseTable ( + ACPI_TABLE_HEADER *Table, + UINT32 TableLength, + UINT8 TableFlags); + +ACPI_STATUS +AcpiTbInstallStandardTable ( + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + BOOLEAN Reload, + BOOLEAN Override, UINT32 *TableIndex); ACPI_STATUS @@ -190,7 +246,7 @@ UINT32 *TableIndex); void -AcpiTbDeleteTable ( +AcpiTbUninstallTable ( ACPI_TABLE_DESC *TableDesc); void @@ -214,15 +270,6 @@ UINT32 TableIndex, ACPI_OWNER_ID *OwnerId); -BOOLEAN -AcpiTbIsTableLoaded ( - UINT32 TableIndex); - -void -AcpiTbSetTableLoadedFlag ( - UINT32 TableIndex, - BOOLEAN IsLoaded); - /* * tbutils - table manager utilities @@ -259,7 +306,13 @@ UINT32 TableIndex); void -AcpiTbInstallTable ( +AcpiTbInstallTableWithOverride ( + UINT32 TableIndex, + ACPI_TABLE_DESC *NewTableDesc, + BOOLEAN Override); + +ACPI_STATUS +AcpiTbInstallFixedTable ( ACPI_PHYSICAL_ADDRESS Address, char *Signature, UINT32 TableIndex); @@ -268,6 +321,4 @@ AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTABLES_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/actbl1.h fwts-14.03.01/src/acpica/source/include/actbl1.h --- fwts-14.03.00/src/acpica/source/include/actbl1.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actbl1.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACTBL1_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (1) @@ -1215,6 +1213,8 @@ #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL1_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/actbl2.h fwts-14.03.01/src/acpica/source/include/actbl2.h --- fwts-14.03.00/src/acpica/source/include/actbl2.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actbl2.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACTBL2_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (2) @@ -1490,6 +1488,8 @@ } ACPI_TABLE_WDRT; -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL2_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/actbl3.h fwts-14.03.01/src/acpica/source/include/actbl3.h --- fwts-14.03.00/src/acpica/source/include/actbl3.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actbl3.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACTBL3_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (3) @@ -806,6 +804,8 @@ } ACPI_TPM2_CONTROL; -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL3_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/actbl.h fwts-14.03.01/src/acpica/source/include/actbl.h --- fwts-14.03.00/src/acpica/source/include/actbl.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actbl.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define __ACTBL_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Fundamental ACPI tables @@ -476,12 +474,11 @@ /* Masks for Flags field above */ -#define ACPI_TABLE_ORIGIN_UNKNOWN (0) -#define ACPI_TABLE_ORIGIN_MAPPED (1) -#define ACPI_TABLE_ORIGIN_ALLOCATED (2) -#define ACPI_TABLE_ORIGIN_OVERRIDE (4) -#define ACPI_TABLE_ORIGIN_MASK (7) -#define ACPI_TABLE_IS_LOADED (8) +#define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */ +#define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */ +#define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */ +#define ACPI_TABLE_ORIGIN_MASK (3) +#define ACPI_TABLE_IS_LOADED (8) /* @@ -514,6 +511,4 @@ #define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl)) #define ACPI_FADT_V5_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT)) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTBL_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/actypes.h fwts-14.03.01/src/acpica/source/include/actypes.h --- fwts-14.03.00/src/acpica/source/include/actypes.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/actypes.h 2014-03-27 02:14:17.000000000 +0000 @@ -116,8 +116,6 @@ #ifndef __ACTYPES_H__ #define __ACTYPES_H__ -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ /* @@ -1389,6 +1387,4 @@ #define ACPI_OSI_WIN_8 0x0C -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTYPES_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/acutils.h fwts-14.03.01/src/acpica/source/include/acutils.h --- fwts-14.03.00/src/acpica/source/include/acutils.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/acutils.h 2014-03-27 02:14:17.000000000 +0000 @@ -117,8 +117,6 @@ #define _ACUTILS_H -#pragma pack(push) /* Set default struct packing */ - extern const UINT8 AcpiGbl_ResourceAmlSizes[]; extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[]; @@ -263,8 +261,8 @@ const char * AcpiUtGetNotifyName ( - UINT32 NotifyValue); - + UINT32 NotifyValue, + ACPI_OBJECT_TYPE Type); #endif char * @@ -1173,7 +1171,15 @@ const char *Path, ACPI_STATUS LookupStatus); - -#pragma pack(pop) /* Restore original struct packing */ +/* + * Utility functions for ACPI names and IDs + */ +const AH_PREDEFINED_NAME * +AcpiAhMatchPredefinedName ( + char *Nameseg); + +const AH_DEVICE_ID * +AcpiAhMatchHardwareId ( + char *Hid); #endif /* _ACUTILS_H */ diff -Nru fwts-14.03.00/src/acpica/source/include/amlcode.h fwts-14.03.01/src/acpica/source/include/amlcode.h --- fwts-14.03.00/src/acpica/source/include/amlcode.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/amlcode.h 2014-03-27 02:14:17.000000000 +0000 @@ -118,9 +118,6 @@ #ifndef __AMLCODE_H__ #define __AMLCODE_H__ -#pragma pack(push) /* Set default struct packing */ - - /* primary opcodes */ #define AML_NULL_CHAR (UINT16) 0x00 @@ -584,6 +581,4 @@ #define AML_METHOD_SYNC_LEVEL 0xF0 -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __AMLCODE_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/amlresrc.h fwts-14.03.01/src/acpica/source/include/amlresrc.h --- fwts-14.03.00/src/acpica/source/include/amlresrc.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/amlresrc.h 2014-03-27 02:14:17.000000000 +0000 @@ -119,8 +119,6 @@ #define __AMLRESRC_H -#pragma pack(push) /* Set default struct packing */ - /* * Resource descriptor tags, as defined in the ACPI specification. * Used to symbolically reference fields within a descriptor. @@ -648,7 +646,4 @@ } AML_RESOURCE; - -#pragma pack(pop) /* Restore original struct packing */ - #endif diff -Nru fwts-14.03.00/src/acpica/source/include/platform/acgcc.h fwts-14.03.01/src/acpica/source/include/platform/acgcc.h --- fwts-14.03.00/src/acpica/source/include/platform/acgcc.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/platform/acgcc.h 2014-03-27 02:14:17.000000000 +0000 @@ -136,4 +136,15 @@ */ #define ACPI_UNUSED_VAR __attribute__ ((unused)) +/* + * Some versions of gcc implement strchr() with a buggy macro. So, + * undef it here. Prevents error messages of this form (usually from the + * file getopt.c): + * + * error: logical '&&' with non-zero constant will always evaluate as true + */ +#ifdef strchr +#undef strchr +#endif + #endif /* __ACGCC_H__ */ diff -Nru fwts-14.03.00/src/acpica/source/include/platform/aclinux.h fwts-14.03.01/src/acpica/source/include/platform/aclinux.h --- fwts-14.03.00/src/acpica/source/include/platform/aclinux.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/include/platform/aclinux.h 2014-03-27 02:14:17.000000000 +0000 @@ -156,12 +156,23 @@ #include #include +/* Define/disable kernel-specific declarators */ + +#ifndef __init +#define __init +#endif + +#ifndef __iomem +#define __iomem +#endif + /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) -#if defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__) || defined(__PPC64__) +#if defined(__ia64__) || defined(__x86_64__) ||\ + defined(__aarch64__) || defined(__PPC64__) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long diff -Nru fwts-14.03.00/src/acpica/source/os_specific/service_layers/osunixxf.c fwts-14.03.01/src/acpica/source/os_specific/service_layers/osunixxf.c --- fwts-14.03.00/src/acpica/source/os_specific/service_layers/osunixxf.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/os_specific/service_layers/osunixxf.c 2014-03-27 02:14:17.000000000 +0000 @@ -1417,7 +1417,7 @@ * * FUNCTION: AcpiOsSignal * - * PARAMETERS: Function - ACPI CA signal function code + * PARAMETERS: Function - ACPI A signal function code * Info - Pointer to function-dependent structure * * RETURN: Status diff -Nru fwts-14.03.00/src/acpica/source/tools/acpiexec/aecommon.h fwts-14.03.01/src/acpica/source/tools/acpiexec/aecommon.h --- fwts-14.03.00/src/acpica/source/tools/acpiexec/aecommon.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/tools/acpiexec/aecommon.h 2014-03-27 02:14:17.000000000 +0000 @@ -135,8 +135,6 @@ #include #include -#pragma pack(push) /* Set default struct packing */ - extern BOOLEAN AcpiGbl_IgnoreErrors; extern UINT8 AcpiGbl_RegionFillValue; extern UINT8 AcpiGbl_UseHwReducedFadt; @@ -270,7 +268,4 @@ UINT32 EventNumber, void *Context); - -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _AECOMMON */ diff -Nru fwts-14.03.00/src/acpica/source/tools/acpiexec/aehandlers.c fwts-14.03.01/src/acpica/source/tools/acpiexec/aehandlers.c --- fwts-14.03.00/src/acpica/source/tools/acpiexec/aehandlers.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/acpica/source/tools/acpiexec/aehandlers.c 2014-03-27 02:14:17.000000000 +0000 @@ -384,7 +384,7 @@ printf ("[AcpiExec] Handler %u: Received a %s Notify on [%4.4s] %p Value 0x%2.2X (%s)\n", HandlerId, Type, AcpiUtGetNodeName (Device), Device, Value, - AcpiUtGetNotifyName (Value)); + AcpiUtGetNotifyName (Value, ACPI_TYPE_ANY)); if (AcpiGbl_DebugFile) { AcpiOsPrintf ("[AcpiExec] Handler %u: Received a %s notify, Value 0x%2.2X\n", @@ -420,7 +420,7 @@ printf ("[AcpiExec] Global: Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n", AcpiUtGetNodeName (Device), Device, Value, - AcpiUtGetNotifyName (Value)); + AcpiUtGetNotifyName (Value, ACPI_TYPE_ANY)); if (AcpiGbl_DebugFile) { AcpiOsPrintf ("[AcpiExec] Global: Received a System Notify, Value 0x%2.2X\n", Value); @@ -453,7 +453,7 @@ printf ("[AcpiExec] Global: Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n", AcpiUtGetNodeName (Device), Device, Value, - AcpiUtGetNotifyName (Value)); + AcpiUtGetNotifyName (Value, ACPI_TYPE_ANY)); if (AcpiGbl_DebugFile) { AcpiOsPrintf ("[AcpiExec] Global: Received a Device Notify, Value 0x%2.2X\n", Value); diff -Nru fwts-14.03.00/src/lib/include/fwts_version.h fwts-14.03.01/src/lib/include/fwts_version.h --- fwts-14.03.00/src/lib/include/fwts_version.h 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/lib/include/fwts_version.h 2014-03-27 02:14:17.000000000 +0000 @@ -16,5 +16,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#define FWTS_VERSION "V14.03.00" -#define FWTS_DATE "2014-03-17 07:16:47" +#define FWTS_VERSION "V14.03.01" +#define FWTS_DATE "2014-03-27 02:14:17" diff -Nru fwts-14.03.00/src/lib/src/fwts_acpi_object_eval.c fwts-14.03.01/src/lib/src/fwts_acpi_object_eval.c --- fwts-14.03.00/src/lib/src/fwts_acpi_object_eval.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/lib/src/fwts_acpi_object_eval.c 2014-03-27 02:14:17.000000000 +0000 @@ -32,81 +32,239 @@ const fwts_log_level level; const char *error_type; const char *error_text; + const char *advice; } acpi_eval_error; static const acpi_eval_error errors[] = { /* ACPI_STATUS fwts_log_level error_type error_text */ - { AE_ERROR, LOG_LEVEL_HIGH, "AEError", "Environment error" }, - { AE_NO_ACPI_TABLES, LOG_LEVEL_HIGH, "AENoACPITables", "NO ACPI tables" }, - { AE_NO_NAMESPACE, LOG_LEVEL_HIGH, "AENoNamespace", "No namespace" }, - { AE_NO_MEMORY, LOG_LEVEL_CRITICAL, "AENoMemory", "Out of memory" }, - { AE_NOT_FOUND, LOG_LEVEL_CRITICAL, "AENotFound", "Not found" }, - { AE_NOT_EXIST, LOG_LEVEL_CRITICAL, "AENotExist", "Not exist" }, - { AE_ALREADY_EXISTS, LOG_LEVEL_HIGH, "AEAlreadyExists", "Already exists" }, - { AE_TYPE, LOG_LEVEL_CRITICAL, "AETtype", "Type" }, - { AE_NULL_OBJECT, LOG_LEVEL_CRITICAL, "AENullObject", "Null object" }, - { AE_NULL_ENTRY, LOG_LEVEL_CRITICAL, "AENullEntry", "Null entry" }, - { AE_BUFFER_OVERFLOW, LOG_LEVEL_CRITICAL, "AEBufferOverflow", "Buffer overflow" }, - { AE_STACK_OVERFLOW, LOG_LEVEL_CRITICAL, "AEStackOverflow", "Stack overflow" }, - { AE_STACK_UNDERFLOW, LOG_LEVEL_CRITICAL, "AEStackUnderflow", "Stack underflow" }, - { AE_NOT_IMPLEMENTED, LOG_LEVEL_HIGH, "AENotImplemented", "Not implemented" }, - { AE_SUPPORT, LOG_LEVEL_HIGH, "AESupport", "Support" }, - { AE_LIMIT, LOG_LEVEL_CRITICAL, "AELimit", "Limit" }, - { AE_TIME, LOG_LEVEL_HIGH, "AETime", "Timeout" }, - { AE_ACQUIRE_DEADLOCK, LOG_LEVEL_CRITICAL, "AEAcqDeadlock", "Acquire deadlock" }, - { AE_RELEASE_DEADLOCK, LOG_LEVEL_CRITICAL, "AERelDeadlock", "Release deadlock" }, - { AE_NOT_ACQUIRED, LOG_LEVEL_CRITICAL, "AENotAcq", "Not acquired" }, - { AE_ALREADY_ACQUIRED, LOG_LEVEL_CRITICAL, "AEAlreadyAcq", "Already acquired" }, - { AE_NO_HARDWARE_RESPONSE, LOG_LEVEL_HIGH, "AENoHWResponse", "No hardware response" }, - { AE_NO_GLOBAL_LOCK, LOG_LEVEL_HIGH, "AENoGlobalLock", "No global lock" }, - { AE_ABORT_METHOD, LOG_LEVEL_CRITICAL, "AEAbortMethod", "Abort method" }, - { AE_SAME_HANDLER, LOG_LEVEL_HIGH, "AESameHandler", "Same handler" }, - { AE_NO_HANDLER, LOG_LEVEL_CRITICAL, "AENoHandler", "No handler" }, - { AE_OWNER_ID_LIMIT, LOG_LEVEL_HIGH, "AEOwnerIDLimit", "Owner ID limit" }, - - { AE_BAD_PARAMETER, LOG_LEVEL_HIGH, "AEBadParam", "Args: Bad paramater" }, - { AE_BAD_CHARACTER, LOG_LEVEL_HIGH, "AEBadChar", "Args: Bad character" }, - { AE_BAD_PATHNAME, LOG_LEVEL_HIGH, "AEBadPathname", "Args: Bad pathname" }, - { AE_BAD_DATA, LOG_LEVEL_HIGH, "AEBadData", "Args: Bad data" }, - { AE_BAD_HEX_CONSTANT, LOG_LEVEL_HIGH, "AEBadHexConst", "Args: Bad hex constant" }, - { AE_BAD_OCTAL_CONSTANT, LOG_LEVEL_HIGH, "AEBadOctConst", "Args: Bad octal constant" }, - { AE_BAD_DECIMAL_CONSTANT, LOG_LEVEL_HIGH, "AEBadDecConst", "Args: Bad decimal constant" }, - { AE_MISSING_ARGUMENTS, LOG_LEVEL_CRITICAL, "AEMissingArgs", "Args: Missing arguments" }, - { AE_BAD_ADDRESS, LOG_LEVEL_CRITICAL, "AEBadAddr", "Args: Bad address" }, - - { AE_AML_BAD_OPCODE, LOG_LEVEL_CRITICAL, "AEAMLBadOpCode", "Bad AML opcode" }, - { AE_AML_NO_OPERAND, LOG_LEVEL_HIGH, "AEAMLNoOperand", "Missing operand" }, - { AE_AML_OPERAND_TYPE, LOG_LEVEL_HIGH, "AEAMLOperandType", "Incorrect operand type" }, - { AE_AML_OPERAND_VALUE, LOG_LEVEL_HIGH, "AEAMLOperandValue", "Incorrect operand value" }, - { AE_AML_UNINITIALIZED_LOCAL, LOG_LEVEL_HIGH, "AEAMLUninitLocal", "Uninitialized local variable" }, - { AE_AML_UNINITIALIZED_ARG, LOG_LEVEL_HIGH, "AEAMLUninitArg", "Uninitialized argument" }, - { AE_AML_UNINITIALIZED_ELEMENT, LOG_LEVEL_HIGH, "AEAMLUninitElement", "Uninitialized element" }, - { AE_AML_NUMERIC_OVERFLOW, LOG_LEVEL_HIGH, "AEAMLNumericOverflow", "Numeric overflow" }, - { AE_AML_REGION_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLRegionLimit", "Region limit" }, - { AE_AML_BUFFER_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLBufferLimit", "Buffer limit" }, - { AE_AML_PACKAGE_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLPackgeLimit", "Package limit" }, - { AE_AML_DIVIDE_BY_ZERO, LOG_LEVEL_CRITICAL, "AEAMLDivideByZero", "Division by zero" }, - { AE_AML_NAME_NOT_FOUND, LOG_LEVEL_HIGH, "AEAMLNameNotFound", "Name not found" }, - { AE_AML_INTERNAL, LOG_LEVEL_HIGH, "AEAMLInternal", "Internal ACPICA execution engine error" }, - { AE_AML_INVALID_SPACE_ID, LOG_LEVEL_HIGH, "AEAMLInvalidSpaceID", "Invalid space ID error" }, - { AE_AML_STRING_LIMIT, LOG_LEVEL_HIGH, "AEAMLStringLimit", "String limit" }, - { AE_AML_NO_RETURN_VALUE, LOG_LEVEL_HIGH, "AEAMLNoReturnValue", "No return value" }, - { AE_AML_METHOD_LIMIT, LOG_LEVEL_HIGH, "AEAMLMethodLimit", "Method limit" }, - { AE_AML_NOT_OWNER, LOG_LEVEL_HIGH, "AEAMLNotOwner", "Not owner" }, - { AE_AML_MUTEX_ORDER, LOG_LEVEL_HIGH, "AEAMLMutexOrder", "Mutex order" }, - { AE_AML_MUTEX_NOT_ACQUIRED, LOG_LEVEL_HIGH, "AEAMLMutexNotAcq", "Mutux not acquired" }, - { AE_AML_INVALID_RESOURCE_TYPE, LOG_LEVEL_HIGH, "AEAMLInvResourceType", "Invalid resource type" }, - { AE_AML_INVALID_INDEX, LOG_LEVEL_HIGH, "AEAMLInvIndex", "Invalid index" }, - { AE_AML_REGISTER_LIMIT, LOG_LEVEL_HIGH, "AEAMLRegisterLimit", "Register limit" }, - { AE_AML_NO_WHILE, LOG_LEVEL_CRITICAL, "AEAMLNoWhile", "No while" }, - { AE_AML_ALIGNMENT, LOG_LEVEL_CRITICAL, "AEAMLAlignment", "Misaligmnent" }, - { AE_AML_NO_RESOURCE_END_TAG, LOG_LEVEL_HIGH, "AEAMLNoResEndTag", "No resource end tag"}, - { AE_AML_BAD_RESOURCE_VALUE, LOG_LEVEL_HIGH, "AEAMLBadResValue", "Bad resource value" }, - { AE_AML_CIRCULAR_REFERENCE, LOG_LEVEL_CRITICAL, "AEAMLCircularRef", "Circular reference" }, - { AE_AML_BAD_RESOURCE_LENGTH, LOG_LEVEL_HIGH, "AEAMLBadResLength", "Bad resource length" }, - { AE_AML_ILLEGAL_ADDRESS, LOG_LEVEL_CRITICAL, "AEAMLIllegalAddr", "Illegal address" }, - /* { AE_AML_INFINITE_LOOP, LOG_LEVEL_HIGH, "AEAMLInfiniteLoop", "Infinite loop" }, */ - { 0, 0, NULL, NULL } + { AE_ERROR, LOG_LEVEL_HIGH, "AEError", "Unspecified error", + "An internal unspecified ACPICA execution error has occurred." + }, + { AE_NO_ACPI_TABLES, LOG_LEVEL_HIGH, "AENoACPITables", "No ACPI tables", + "No ACPI tables could be found. Normally this indicates the tables could not be loaded " + "from firmware or a provided firmware dump file." + }, + { AE_NO_NAMESPACE, LOG_LEVEL_HIGH, "AENoNamespace", "No namespace", + "An ACPI namespace was not loaded. This happens if an ACPI root node could not be found." + }, + { AE_NO_MEMORY, LOG_LEVEL_CRITICAL, "AENoMemory", "Out of memory", + "No more memory could be allocated from the heap." + }, + { AE_NOT_FOUND, LOG_LEVEL_CRITICAL, "AENotFound", "Not found", + "An ACPI object or entity was requested but could not be found. Running fwts with the " + "--acpica=slack option may work around this issue." + }, + { AE_NOT_EXIST, LOG_LEVEL_CRITICAL, "AENotExist", "Not exist", + "An ACPI object or entity was requested but does not exist.", + }, + { AE_ALREADY_EXISTS, LOG_LEVEL_HIGH, "AEAlreadyExists", "Already exists", + "An ACPI object or entity already exists. Sometimes this occurs when code is not " + "serialized and it has been created a second time by another thread. ACPICA can detect " + "these errors and enable auto serialization to try to work around this error. " + }, + { AE_TYPE, LOG_LEVEL_CRITICAL, "AETtype", "Type", + "The type of an object is incorrect and does not match the expected type. ACPI will " + "generally abort execution of the AML op-code that causes this error." + }, + { AE_NULL_OBJECT, LOG_LEVEL_CRITICAL, "AENullObject", "Null object", + "An ACPI object is NULL when it was expected to be non-NULL." + }, + { AE_NULL_ENTRY, LOG_LEVEL_CRITICAL, "AENullEntry", "Null entry", + "The requested ACPI object did not exist. This can occur when a root entry is " + "NULL." + }, + { AE_BUFFER_OVERFLOW, LOG_LEVEL_CRITICAL, "AEBufferOverflow", "Buffer overflow", + "An ACPI buffer that was provided was too small to contain the data to be copied " + "into it. This generally indicates an AML bug." + }, + { AE_STACK_OVERFLOW, LOG_LEVEL_CRITICAL, "AEStackOverflow", "Stack overflow", + "An ACPI method call failed because the call nesting was too deep and the " + "internal APCI execution stack overflowed. This generally occurs with AML that " + "may be recursing too deeply." + }, + { AE_STACK_UNDERFLOW, LOG_LEVEL_CRITICAL, "AEStackUnderflow", "Stack underflow", + "An ACPI method call failed because the internal ACPI execution stack underflowed. " + "This occurred while walking the object stack and popping off an object from an empty stack." + }, + { AE_NOT_IMPLEMENTED, LOG_LEVEL_HIGH, "AENotImplemented", "Not implemented", + "The ACPICA execution engine has not implemented a feature." + }, + { AE_SUPPORT, LOG_LEVEL_HIGH, "AESupport", "Support", + "Normally this occurs when AML attempts to perform an action that is not supported, " + "such as converting objects in an unsupported way or attempting to access memory using " + "an unsupported address space type." + }, + { AE_LIMIT, LOG_LEVEL_CRITICAL, "AELimit", "Limit", + "A predefined limit was reached, for example, attempting to access an I/O port above the " + "allowed 64K limit or a semaphore handle is out of range." + }, + { AE_TIME, LOG_LEVEL_HIGH, "AETime", "Timeout", + "A timeout has been reached, for example a semaphore has timed out." + }, + { AE_ACQUIRE_DEADLOCK, LOG_LEVEL_CRITICAL, "AEAcqDeadlock", "Acquire deadlock", + "A mutex acquire was aborted because a potential deadlock was detected." + }, + { AE_RELEASE_DEADLOCK, LOG_LEVEL_CRITICAL, "AERelDeadlock", "Release deadlock", + "A mutex release was aborted because a potential deadlock was detected." + }, + { AE_NOT_ACQUIRED, LOG_LEVEL_CRITICAL, "AENotAcq", "Not acquired", + "An attempt to release a mutex or an ACPI global lock failed because it " + "had not previously acquired. This normally indicates an AML programming bug." + }, + { AE_ALREADY_ACQUIRED, LOG_LEVEL_CRITICAL, "AEAlreadyAcq", "Already acquired", + "An attempt to re-acquire mutex or an ACPI global lock failed because it " + "had not previously acquired. This normally indicates an AML programming bug." + }, + { AE_NO_HARDWARE_RESPONSE, LOG_LEVEL_HIGH, "AENoHWResponse", "No hardware response", + "ACPI gave up waiting for hardware to respond. For example, a SMI_CMD failed or " + "the platform does not have an ACPI global lock defined or an ACPI event could " + "not be enabled." + }, + { AE_NO_GLOBAL_LOCK, LOG_LEVEL_HIGH, "AENoGlobalLock", "No global lock", + "The platform does not define an ACPI global lock in the FACS." + }, + { AE_ABORT_METHOD, LOG_LEVEL_CRITICAL, "AEAbortMethod", "Abort method", + "Execution of an ACPI method was aborted because the internal ACPICA AcpiGbl_AbortMethod " + "flag was set to true. This should not occur." + }, + { AE_SAME_HANDLER, LOG_LEVEL_HIGH, "AESameHandler", "Same handler", + "An attempt was made to install the same handler that is already installed." + }, + { AE_NO_HANDLER, LOG_LEVEL_CRITICAL, "AENoHandler", "No handler", + "A handler for a General Purpose Event operation was not installed." + }, + { AE_OWNER_ID_LIMIT, LOG_LEVEL_HIGH, "AEOwnerIDLimit", "Owner ID limit", + "A maximum of 255 OwnerIds have been used. There are no more Owner IDs available for " + "ACPI tables or control methods." + }, + + { AE_BAD_PARAMETER, LOG_LEVEL_HIGH, "AEBadParam", "Args: Bad paramater", + "A parameter passed is out of range or invalid." + }, + { AE_BAD_CHARACTER, LOG_LEVEL_HIGH, "AEBadChar", "Args: Bad character", + "An invalid character was found in an ACPI name." + }, + { AE_BAD_PATHNAME, LOG_LEVEL_HIGH, "AEBadPathname", "Args: Bad pathname", + "An internal AML namestring could not be built because of an invalid pathname." + }, + { AE_BAD_DATA, LOG_LEVEL_HIGH, "AEBadData", "Args: Bad data", + "A buffer or package contained some incorrect data." + }, + { AE_BAD_HEX_CONSTANT, LOG_LEVEL_HIGH, "AEBadHexConst", "Args: Bad hex constant", + "An invalid character was found in a hexadecimal constant." + }, + { AE_BAD_OCTAL_CONSTANT, LOG_LEVEL_HIGH, "AEBadOctConst", "Args: Bad octal constant", + "An invalid character was found in an octal constant." + }, + { AE_BAD_DECIMAL_CONSTANT, LOG_LEVEL_HIGH, "AEBadDecConst", "Args: Bad decimal constant", + "An invalid character was found in a decimal constant." + }, + { AE_MISSING_ARGUMENTS, LOG_LEVEL_CRITICAL, "AEMissingArgs", "Args: Missing arguments", + "Too few arguments were passed into an ACPI control method." + }, + { AE_BAD_ADDRESS, LOG_LEVEL_CRITICAL, "AEBadAddr", "Args: Bad address", + "An illegal null I/O address was referenced by the AML." + }, + + { AE_AML_BAD_OPCODE, LOG_LEVEL_CRITICAL, "AEAMLBadOpCode", "Bad AML opcode", + "An invalid AML opcode encountered during AML execution." + }, + { AE_AML_NO_OPERAND, LOG_LEVEL_HIGH, "AEAMLNoOperand", "Missing operand", + "An AML opcode was missing a required operand." + }, + { AE_AML_OPERAND_TYPE, LOG_LEVEL_HIGH, "AEAMLOperandType", "Incorrect operand type", + "An AML opcode had an operand of an incorrect type." + }, + { AE_AML_OPERAND_VALUE, LOG_LEVEL_HIGH, "AEAMLOperandValue", "Incorrect operand value", + "An AML opcode has an operand of an inappropriate or invalid value.", + }, + { AE_AML_UNINITIALIZED_LOCAL, LOG_LEVEL_HIGH, "AEAMLUninitLocal", "Uninitialized local variable", + "A method attempted to use a local variable that was not initialized." + }, + { AE_AML_UNINITIALIZED_ARG, LOG_LEVEL_HIGH, "AEAMLUninitArg", "Uninitialized argument", + "A method attempted to use an uninitialized argument." + }, + { AE_AML_UNINITIALIZED_ELEMENT, LOG_LEVEL_HIGH, "AEAMLUninitElement", "Uninitialized element", + "A method attempted to use an empty element in an ACPI package." + }, + { AE_AML_NUMERIC_OVERFLOW, LOG_LEVEL_HIGH, "AEAMLNumericOverflow", "Numeric overflow", + "A numeric overflow occurred, for example when coverting a BCD value." + }, + { AE_AML_REGION_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLRegionLimit", "Region limit", + "An attempt to access beyond the end of an ACPI Operation Region occurred." + }, + { AE_AML_BUFFER_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLBufferLimit", "Buffer limit", + "An attempt to access beyond the end of an ACPI buffer occurred." + }, + { AE_AML_PACKAGE_LIMIT, LOG_LEVEL_CRITICAL, "AEAMLPackgeLimit", "Package limit", + "An attempt to access beyond the endof an ACPI package occurred." + }, + { AE_AML_DIVIDE_BY_ZERO, LOG_LEVEL_CRITICAL, "AEAMLDivideByZero", "Division by zero", + "A division by zero error occurred while excuting the AML Divide op-code" + }, + { AE_AML_NAME_NOT_FOUND, LOG_LEVEL_HIGH, "AEAMLNameNotFound", "Name not found", + "An ACPI named reference could not be resolved." + }, + { AE_AML_INTERNAL, LOG_LEVEL_HIGH, "AEAMLInternal", "Internal ACPICA execution engine error", + "An internal error occurred in the ACPICA execution interpreter. A bug report should " + "be filed against fwts so that this can be resolved." + }, + { AE_AML_INVALID_SPACE_ID, LOG_LEVEL_HIGH, "AEAMLInvalidSpaceID", "Invalid space ID error", + "An invalid ACPI Operation Region Space ID has been encountered." + }, + { AE_AML_STRING_LIMIT, LOG_LEVEL_HIGH, "AEAMLStringLimit", "String limit", + "A string more than 200 characters long has been used." + }, + { AE_AML_NO_RETURN_VALUE, LOG_LEVEL_HIGH, "AEAMLNoReturnValue", "No return value", + "A method did not return the required value that was expected." + }, + { AE_AML_METHOD_LIMIT, LOG_LEVEL_HIGH, "AEAMLMethodLimit", "Method limit", + "A control method reached a limit of 255 concurrent thread executions and hit the ACPICA " + "re-entrancy limit." + }, + { AE_AML_NOT_OWNER, LOG_LEVEL_HIGH, "AEAMLNotOwner", "Not owner", + "A thread attempted to release a mutex that it did not own.", + }, + { AE_AML_MUTEX_ORDER, LOG_LEVEL_HIGH, "AEAMLMutexOrder", "Mutex order", + "Deadlock prevention has detected that the current mutex sync level is too large." + }, + { AE_AML_MUTEX_NOT_ACQUIRED, LOG_LEVEL_HIGH, "AEAMLMutexNotAcq", "Mutux not acquired", + "An attempt was made to release a mutex that had not been acquired." + }, + { AE_AML_INVALID_RESOURCE_TYPE, LOG_LEVEL_HIGH, "AEAMLInvResourceType", "Invalid resource type", + "An ACPI resource list contained an invalid resource type." + }, + { AE_AML_INVALID_INDEX, LOG_LEVEL_HIGH, "AEAMLInvIndex", "Invalid index", + "An attempt to get a node with an index that was too large occurred, for example an ACPI " + "ArgN or LocalN were N was out of range." + }, + { AE_AML_REGISTER_LIMIT, LOG_LEVEL_HIGH, "AEAMLRegisterLimit", "Register limit", + "An attempt to use a bank value that is beyong the capacity of a register occurred." + }, + { AE_AML_NO_WHILE, LOG_LEVEL_CRITICAL, "AEAMLNoWhile", "No while", + "A Break or Continue op-code was reached without a matching While op-code." + }, + { AE_AML_ALIGNMENT, LOG_LEVEL_CRITICAL, "AEAMLAlignment", "Misaligmnent", + "A non-aligned memory transfer was attempted on a machine that does not " + "support it." + }, + { AE_AML_NO_RESOURCE_END_TAG, LOG_LEVEL_HIGH, "AEAMLNoResEndTag", "No resource end tag", + "An ACPI resource list had a missing End Tag." + }, + { AE_AML_BAD_RESOURCE_VALUE, LOG_LEVEL_HIGH, "AEAMLBadResValue", "Bad resource value", + "An ACPI resource element had an invalid value." + }, + { AE_AML_CIRCULAR_REFERENCE, LOG_LEVEL_CRITICAL, "AEAMLCircularRef", "Circular reference", + "Two references refer to each other, which is not allowed." + }, + { AE_AML_BAD_RESOURCE_LENGTH, LOG_LEVEL_HIGH, "AEAMLBadResLength", "Bad resource length", + "The length of an ACPI Resource Descriptor was incorrect." + }, + { AE_AML_ILLEGAL_ADDRESS, LOG_LEVEL_CRITICAL, "AEAMLIllegalAddr", "Illegal address", + "An memory, PCI configuration or I/O address was encountered with an illegal address." + }, + /* { AE_AML_INFINITE_LOOP, LOG_LEVEL_HIGH, "AEAMLInfiniteLoop", "Infinite loop", NULL }, */ + { 0, 0, NULL, NULL , NULL} }; static fwts_list *fwts_object_names; @@ -250,6 +408,8 @@ fwts_failed(fw, errors[i].level, errors[i].error_type, "Detected error '%s' when evaluating '%s'.", errors[i].error_text, name); + if (errors[i].advice != NULL) + fwts_advice(fw, "%s", errors[i].advice); return; } } diff -Nru fwts-14.03.00/src/lib/src/fwts_alloc.c fwts-14.03.01/src/lib/src/fwts_alloc.c --- fwts-14.03.00/src/lib/src/fwts_alloc.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/lib/src/fwts_alloc.c 2014-03-27 02:14:17.000000000 +0000 @@ -46,7 +46,9 @@ unsigned int magic; } fwts_mmap_header; -#define LIMIT_2GB 0x80000000ULL +#define CHUNK_SIZE (8192) /* page plus loads of slack */ +#define LIMIT_2GB (0x80000000ULL) +#define LIMIT_START (0x00010000ULL) #ifndef MAP_32BIT /* @@ -62,6 +64,7 @@ void *addr_start; void *addr_end; void *last_addr_end = NULL; + void *first_addr_start = NULL; void *ret = MAP_FAILED; if (requested_size == 0) /* Illegal */ @@ -74,6 +77,35 @@ sscanf(buffer, "%p-%p %*s %*x %*s %*u %s", &addr_start, &addr_end, pathname); + /* + * Try and allocate under first mmap'd address space + */ + if ((first_addr_start == NULL) && + (addr_start > (void*)LIMIT_START)) { + size_t sz = (requested_size + CHUNK_SIZE) & ~(CHUNK_SIZE - 1); + void *addr = addr_start - sz; + + /* + * If addr is over the 2GB limit and we know + * that this is the first mapping then we should + * be able to map a region below the 2GB limit as + * nothing is already mapped there + */ + if (addr > (void*)LIMIT_2GB) + addr = (void*)LIMIT_2GB - sz; + + ret = mmap(addr, requested_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0); + if (ret != MAP_FAILED) + break; /* Success! */ + + first_addr_start = addr_start; + } + + /* + * No allocation yet, so try now to squeeze one + * in between already mapped regions + */ if ((last_addr_end != NULL) && (last_addr_end < (void*)LIMIT_2GB)) { if ((addr_start - last_addr_end) > (ptrdiff_t)requested_size) { @@ -85,9 +117,11 @@ } } - /* We really don't want to mmap at the end of the heap + /* + * We really don't want to mmap at the end of the heap * and if we've reached the stack we've gone too far so - * abort */ + * abort + */ if ((strncmp("[heap]", pathname, 6) == 0) || (strncmp("[stack]", pathname, 7) == 0)) { ret = MAP_FAILED; diff -Nru fwts-14.03.00/src/lib/src/fwts_hwinfo.c fwts-14.03.01/src/lib/src/fwts_hwinfo.c --- fwts-14.03.00/src/lib/src/fwts_hwinfo.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/lib/src/fwts_hwinfo.c 2014-03-27 02:14:17.000000000 +0000 @@ -352,7 +352,6 @@ fwts_net_config *config2 = (fwts_net_config *)data2; return strcmp(config1->name, config2->name) || - strcmp(config1->addr, config2->addr) || strcmp(config1->hw_addr, config2->hw_addr); } diff -Nru fwts-14.03.00/src/lib/src/fwts_log.c fwts-14.03.01/src/lib/src/fwts_log.c --- fwts-14.03.00/src/lib/src/fwts_log.c 2014-03-17 07:16:47.000000000 +0000 +++ fwts-14.03.01/src/lib/src/fwts_log.c 2014-03-27 02:14:17.000000000 +0000 @@ -233,8 +233,14 @@ { "INF", LOG_INFO }, { "SUM", LOG_SUMMARY }, { "SEP", LOG_SEPARATOR }, + { "NLN", LOG_NEWLINE }, { "ADV", LOG_ADVICE }, { "HED", LOG_HEADING }, + { "PAS", LOG_PASSED }, + { "FAL", LOG_FAILED }, + { "SKP", LOG_SKIPPED }, + { "ABT", LOG_ABORTED }, + { "INO", LOG_INFOONLY }, { "ALL", ~0 }, { NULL, 0 } };