[PATCH 2/2] fwts-test: Add LPIT table regression test
Colin King
colin.king at canonical.com
Tue Jun 30 17:20:33 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
Makefile.am | 2 +
.../arg-show-tests-0001/arg-show-tests-0001.log | 2 +
.../arg-show-tests-full-0001.log | 6 ++-
fwts-test/lpit-0001/acpidump-0001.log | 36 +++++++++++++++++
fwts-test/lpit-0001/acpidump-0002.log | 36 +++++++++++++++++
fwts-test/lpit-0001/lpit-0001.log | 47 ++++++++++++++++++++++
fwts-test/lpit-0001/lpit-0002.log | 47 ++++++++++++++++++++++
fwts-test/lpit-0001/test-0001.sh | 17 ++++++++
fwts-test/lpit-0001/test-0002.sh | 17 ++++++++
9 files changed, 209 insertions(+), 1 deletion(-)
create mode 100644 fwts-test/lpit-0001/acpidump-0001.log
create mode 100644 fwts-test/lpit-0001/acpidump-0002.log
create mode 100644 fwts-test/lpit-0001/lpit-0001.log
create mode 100644 fwts-test/lpit-0001/lpit-0002.log
create mode 100755 fwts-test/lpit-0001/test-0001.sh
create mode 100755 fwts-test/lpit-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index ebfca0f..61dfde8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,6 +79,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/klog-0002/test-0001.sh \
fwts-test/klog-0002/test-0002.sh \
fwts-test/klog-0002/test-0003.sh \
+ fwts-test/lpit-0001/test-0001.sh \
+ fwts-test/lpit-0001/test-0002.sh \
fwts-test/slit-0001/test-0001.sh \
fwts-test/slit-0001/test-0002.sh \
fwts-test/madt-0001/test-0001.sh \
diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
index 9f4b305..5d5bb4a 100644
--- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
+++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log
@@ -19,6 +19,7 @@ ACPI tests:
gtdt GTDT Generic Timer Description Table test.
hest HEST Hardware Error Source Table test.
hpet HPET IA-PC High Precision Event Timer Tanble tests.
+ lpit LPIT LPIT Low Power Idle Table test.
madt MADT Multiple APIC Description Table test.
mcfg MCFG PCI Express* memory mapped config space test.
method ACPI DSDT Method Semantic tests.
@@ -68,6 +69,7 @@ Batch tests:
hest HEST Hardware Error Source Table test.
hpet HPET IA-PC High Precision Event Timer Tanble tests.
klog Scan kernel log for errors and warnings.
+ lpit LPIT LPIT Low Power Idle Table test.
madt MADT Multiple APIC Description Table test.
maxfreq Test max CPU frequencies against max scaling frequency.
maxreadreq Test firmware has set PCI Express MaxReadReq to a higher value on non-motherboard devices.
diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
index cd013bd..96e6764 100644
--- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
+++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log
@@ -46,6 +46,8 @@ ACPI tests:
Test HPET base in HPET table.
Test HPET base in DSDT and/or SSDT.
Test HPET configuration.
+ lpit (1 test):
+ LPIT Low Power Idle Table test.
madt (1 test):
MADT Multiple APIC Description Table test.
mcfg (2 tests):
@@ -339,6 +341,8 @@ Batch tests:
Test HPET configuration.
klog (1 test):
Kernel log error check.
+ lpit (1 test):
+ LPIT Low Power Idle Table test.
madt (1 test):
MADT Multiple APIC Description Table test.
maxfreq (1 test):
@@ -794,4 +798,4 @@ UEFI tests:
Test UEFI RT service query variable info interface stress test.
Test UEFI RT service get variable interface, invalid parameters.
-Total of 651 tests
+Total of 653 tests
diff --git a/fwts-test/lpit-0001/acpidump-0001.log b/fwts-test/lpit-0001/acpidump-0001.log
new file mode 100644
index 0000000..9bdf39b
--- /dev/null
+++ b/fwts-test/lpit-0001/acpidump-0001.log
@@ -0,0 +1,36 @@
+FACS @ 0x00000000
+ 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS at ...........
+ 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+
+FACP @ 0x00000000
+ 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD
+ 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD
+ 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G......
+ 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................
+ 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................
+ 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ...............
+ 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2...
+ 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G..
+ 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... ..........
+ 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................
+ 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................
+ 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ........... at ..
+ 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
+ 00f0: 00 00 00 00 ....
+
+LPIT @ 0x00000000
+ 0000: 4c 50 49 54 94 00 00 00 01 20 41 4d 44 20 20 20 SLIT............
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 ................
+ 0020: 01 00 00 00 00 00 00 00 38 00 00 00 ad de 00 00 ................
+ 0030: 00 00 00 00 7f 40 00 00 80 70 60 50 40 30 20 10 ................
+ 0040: 11 00 00 00 20 00 00 00 7f 40 00 00 80 70 60 50 ................
+ 0050: 40 30 20 10 a0 b0 00 00 00 00 00 00 00 00 00 00 ................
+ 0060: 38 00 00 00 ef be 00 00 02 00 00 00 7f 40 00 00 ................
+ 0070: 80 70 60 50 40 30 20 f0 23 00 00 00 70 00 00 00
+ 0080: 7f 40 00 00 f0 70 60 50 40 30 20 f0 a0 b0 00 00
+ 0090: 00 00 00 00
diff --git a/fwts-test/lpit-0001/acpidump-0002.log b/fwts-test/lpit-0001/acpidump-0002.log
new file mode 100644
index 0000000..43b48a4
--- /dev/null
+++ b/fwts-test/lpit-0001/acpidump-0002.log
@@ -0,0 +1,36 @@
+FACS @ 0x00000000
+ 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS at ...........
+ 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+
+FACP @ 0x00000000
+ 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD
+ 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD
+ 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G......
+ 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................
+ 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................
+ 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ...............
+ 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2...
+ 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G..
+ 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... ..........
+ 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................
+ 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................
+ 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ........... at ..
+ 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
+ 00f0: 00 00 00 00 ....
+
+LPIT @ 0x00000000
+ 0000: 4c 50 49 54 94 00 00 00 01 20 41 4d 44 20 20 20 SLIT............
+ 0010: 41 47 45 53 41 20 20 20 01 00 00 00 41 4d 44 20 ................
+ 0020: 01 00 00 00 00 00 00 00 38 00 00 00 ad de ff ff ................
+ 0030: fd ff 00 00 7f 40 00 00 80 70 60 50 40 30 20 10 ................
+ 0040: 11 00 00 00 20 00 00 00 7f 10 00 00 80 70 60 50 ................
+ 0050: 40 30 20 10 a0 b0 00 00 00 00 00 00 00 00 00 00 ................
+ 0060: 30 00 00 00 ef be 00 00 02 00 00 00 7f 40 00 00 ................
+ 0070: 80 70 60 50 40 30 20 f0 23 00 00 00 70 00 00 00
+ 0080: 7f 40 00 00 f0 70 60 50 40 30 20 f0 a0 b0 00 00
+ 0090: 00 00 00 00
diff --git a/fwts-test/lpit-0001/lpit-0001.log b/fwts-test/lpit-0001/lpit-0001.log
new file mode 100644
index 0000000..7d05b67
--- /dev/null
+++ b/fwts-test/lpit-0001/lpit-0001.log
@@ -0,0 +1,47 @@
+lpit lpit: LPIT LPIT Low Power Idle Table test.
+lpit ----------------------------------------------------------
+lpit Test 1 of 1: LPIT Low Power Idle Table test.
+lpit Native C-state based LPI structure:
+lpit Type: 0x00000000
+lpit Length: 0x00000038
+lpit ID: 0xdead
+lpit Reserved: 0x0000
+lpit Flags: 0x00000000
+lpit Entry Trigger:
+lpit Address Space ID: 0x7f
+lpit Register Bit Width 0x40
+lpit Register Bit Offset 0x00
+lpit Access Size 0x00
+lpit Address 0x1020304050607080
+lpit Residency: 0x00000011
+lpit Latency: 0x00000020
+lpit Residency Counter:
+lpit Address Space ID: 0x7f
+lpit Register Bit Width 0x40
+lpit Register Bit Offset 0x00
+lpit Access Size 0x00
+lpit Address 0x1020304050607080
+lpit Residency Counter Freq: 0x000000000000b0a0
+lpit
+lpit Native C-state based LPI structure:
+lpit Type: 0x00000000
+lpit Length: 0x00000038
+lpit ID: 0xbeef
+lpit Reserved: 0x0000
+lpit Flags: 0x00000002
+lpit Entry Trigger:
+lpit Address Space ID: 0x7f
+lpit Register Bit Width 0x40
+lpit Register Bit Offset 0x00
+lpit Access Size 0x00
+lpit Address 0xf020304050607080
+lpit Residency: 0x00000023
+lpit Latency: 0x00000070
+lpit Residency Counter not available
+lpit
+lpit PASSED: Test 1, No issues found in LPIT table.
+lpit
+lpit ==========================================================
+lpit 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+lpit info only.
+lpit ==========================================================
diff --git a/fwts-test/lpit-0001/lpit-0002.log b/fwts-test/lpit-0001/lpit-0002.log
new file mode 100644
index 0000000..efa317a
--- /dev/null
+++ b/fwts-test/lpit-0001/lpit-0002.log
@@ -0,0 +1,47 @@
+lpit lpit: LPIT LPIT Low Power Idle Table test.
+lpit ----------------------------------------------------------
+lpit Test 1 of 1: LPIT Low Power Idle Table test.
+lpit Native C-state based LPI structure:
+lpit Type: 0x00000000
+lpit Length: 0x00000038
+lpit ID: 0xdead
+lpit Reserved: 0xffff
+lpit Flags: 0x0000fffd
+lpit Entry Trigger:
+lpit Address Space ID: 0x7f
+lpit Register Bit Width 0x40
+lpit Register Bit Offset 0x00
+lpit Access Size 0x00
+lpit Address 0x1020304050607080
+lpit Residency: 0x00000011
+lpit Latency: 0x00000020
+lpit Residency Counter:
+lpit Address Space ID: 0x7f
+lpit Register Bit Width 0x10
+lpit Register Bit Offset 0x00
+lpit Access Size 0x00
+lpit Address 0x1020304050607080
+lpit Residency Counter Freq: 0x000000000000b0a0
+lpit
+lpit FAILED [LOW] LPITNativeCStateLpitReservedNonZero: Test 1,
+lpit Native C-state based LPI structure reserved field was
+lpit expected to be zero, got 0xffff instead
+lpit FAILED [LOW] LPITNativeCStateLpitFlagsReserved: Test 1,
+lpit Some of the Native C-state based LPI structure flags bits
+lpit [31:2] are set, they are expected to be zero
+lpit FAILED [LOW] LPITNativeCStateLpitResidencyCounterWidth:
+lpit Test 1, Native C-state based LPI structure Residency
+lpit Structure Register Bit Width was 16 for a FFH Address
+lpit Space (e.g. a MSR), and was expecting 64.
+lpit
+lpit Native C-state based LPI structure:
+lpit Type: 0x00000000
+lpit Length: 0x00000030
+lpit FAILED [HIGH] LPITNativeCStateLpitShort: Test 1, Native
+lpit C-state based LPI structure is too short, got 48 bytes,
+lpit expected 56 bytes
+lpit
+lpit ==========================================================
+lpit 0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
+lpit info only.
+lpit ==========================================================
diff --git a/fwts-test/lpit-0001/test-0001.sh b/fwts-test/lpit-0001/test-0001.sh
new file mode 100755
index 0000000..a7366bd
--- /dev/null
+++ b/fwts-test/lpit-0001/test-0001.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against LPIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/lpit.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/lpit-0001/acpidump-0001.log lpit - | cut -c7- | grep "^lpit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/lpit-0001/lpit-0001.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+ echo PASSED: $TEST, $NAME
+else
+ echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret
diff --git a/fwts-test/lpit-0001/test-0002.sh b/fwts-test/lpit-0001/test-0002.sh
new file mode 100755
index 0000000..582b9b8
--- /dev/null
+++ b/fwts-test/lpit-0001/test-0002.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid LPIT"
+NAME=test-0001.sh
+TMPLOG=$TMP/lpit.log.$$
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/lpit-0001/acpidump-0002.log lpit - | cut -c7- | grep "^lpit" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/lpit-0001/lpit-0002.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+ echo PASSED: $TEST, $NAME
+else
+ echo FAILED: $TEST, $NAME
+fi
+
+#rm $TMPLOG
+exit $ret
--
2.1.4
More information about the fwts-devel
mailing list