[PATCH 3/3] fwts-test: Add regression test for PMTT
Alex Hung
alex.hung at canonical.com
Fri Aug 5 12:07:48 UTC 2016
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
Makefile.am | 2 +
fwts-test/pmtt-0001/acpidump-0001.log | 40 ++++++++++++
fwts-test/pmtt-0001/acpidump-0002.log | 41 ++++++++++++
fwts-test/pmtt-0001/pmtt-0001.log | 98 ++++++++++++++++++++++++++++
fwts-test/pmtt-0001/pmtt-0002.log | 117 ++++++++++++++++++++++++++++++++++
fwts-test/pmtt-0001/test-0001.sh | 23 +++++++
fwts-test/pmtt-0001/test-0002.sh | 23 +++++++
7 files changed, 344 insertions(+)
create mode 100644 fwts-test/pmtt-0001/acpidump-0001.log
create mode 100644 fwts-test/pmtt-0001/acpidump-0002.log
create mode 100644 fwts-test/pmtt-0001/pmtt-0001.log
create mode 100644 fwts-test/pmtt-0001/pmtt-0002.log
create mode 100755 fwts-test/pmtt-0001/test-0001.sh
create mode 100755 fwts-test/pmtt-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index 7ee3e31..67dc55a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -108,6 +108,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/osilinux-0001/test-0002.sh \
fwts-test/pcct-0001/test-0001.sh \
fwts-test/pcct-0001/test-0002.sh \
+ fwts-test/pmtt-0001/test-0001.sh \
+ fwts-test/pmtt-0001/test-0002.sh \
fwts-test/rsdp-0001/test-0001.sh \
fwts-test/rsdt-0001/test-0001.sh \
fwts-test/sbst-0001/test-0001.sh \
diff --git a/fwts-test/pmtt-0001/acpidump-0001.log b/fwts-test/pmtt-0001/acpidump-0001.log
new file mode 100644
index 0000000..26d6b64
--- /dev/null
+++ b/fwts-test/pmtt-0001/acpidump-0001.log
@@ -0,0 +1,40 @@
+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 ................
+ 0040: 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 ....
+
+PMTT @ 0x00000000
+ 0000: 50 4d 54 54 d8 00 00 00 01 d4 49 4e 54 45 4c 20 PMTT......INTEL
+ 0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c TEMPLATE....INTL
+ 0020: 27 05 16 20 00 00 00 00 00 00 98 00 01 00 00 00 '.. ............
+ 0030: 01 00 00 00 01 00 6c 00 05 00 00 00 00 f0 00 00 ......l.........
+ 0040: 00 e0 00 00 00 d0 00 00 00 c0 00 00 04 00 08 00 ................
+ 0050: 00 00 04 00 00 10 00 00 00 20 00 00 00 30 00 00 ......... ...0..
+ 0060: 00 40 00 00 02 00 14 00 02 00 00 00 00 00 00 00 . at ..............
+ 0070: 00 00 00 a0 0a 00 00 00 02 00 14 00 02 00 00 00 ................
+ 0080: 01 00 00 00 00 00 00 b0 0b 00 00 00 02 00 14 00 ................
+ 0090: 02 00 00 00 01 00 00 00 00 00 00 c0 ff ff ff ff ................
+ 00a0: 01 00 20 00 01 00 00 00 00 10 00 00 00 20 00 00 .. .......... ..
+ 00b0: 00 30 00 00 00 40 00 00 04 00 08 00 00 00 00 00 .0... at ..........
+ 00c0: 00 00 0c 00 03 00 00 00 02 00 00 00 00 00 0c 00 ................
+ 00d0: 07 00 00 00 03 00 00 00 ........
diff --git a/fwts-test/pmtt-0001/acpidump-0002.log b/fwts-test/pmtt-0001/acpidump-0002.log
new file mode 100644
index 0000000..fc159e4
--- /dev/null
+++ b/fwts-test/pmtt-0001/acpidump-0002.log
@@ -0,0 +1,41 @@
+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 ................
+ 0040: 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 ....
+
+PMTT @ 0x00000000
+ 0000: 50 4d 54 54 d8 00 00 00 01 d4 49 4e 54 45 4c 20 PMTT......INTEL
+ 0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c TEMPLATE....INTL
+ 0020: 27 05 16 20 00 00 00 02 00 01 98 00 01 00 03 00 '.. ............
+ 0030: 01 00 00 04 01 05 6c 00 05 00 00 00 00 f0 00 00 ......l.........
+ 0040: 00 e0 00 00 00 d0 00 00 00 c0 00 00 04 00 08 00 ................
+ 0050: 00 06 04 00 00 10 00 00 00 20 00 00 00 30 00 00 ......... ...0..
+ 0060: 00 40 00 00 02 07 14 00 02 00 00 00 00 00 00 00 . at ..............
+ 0070: 00 00 00 a0 0a 00 00 00 02 00 14 00 02 00 00 00 ................
+ 0080: 01 00 00 00 00 00 00 b0 0b 00 12 34 02 00 14 00 ................
+ 0090: 02 00 00 00 01 00 00 00 00 00 00 c0 ff ff ff ff ................
+ 00a0: 01 00 20 00 01 00 00 00 00 10 00 00 00 20 00 00 .. .......... ..
+ 00b0: 00 30 00 00 00 40 00 00 04 00 08 00 00 00 00 00 .0... at ..........
+ 00c0: 00 00 0c 00 13 00 00 00 02 00 00 00 00 00 0c 00 ................
+ 00d0: 0F 00 00 00 03 00 00 00 ........
+
diff --git a/fwts-test/pmtt-0001/pmtt-0001.log b/fwts-test/pmtt-0001/pmtt-0001.log
new file mode 100644
index 0000000..cbe8b26
--- /dev/null
+++ b/fwts-test/pmtt-0001/pmtt-0001.log
@@ -0,0 +1,98 @@
+pmtt pmtt: PMTT Memory Topology Table test.
+pmtt ----------------------------------------------------------
+pmtt Test 1 of 1: Validate PMTT table.
+pmtt PMTT Table:
+pmtt Reserved: 0x00000000
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x00
+pmtt Length: 0x0098
+pmtt Flags: 0x0001
+pmtt Reserved: 0x0000
+pmtt Socket Identifier: 0x0001
+pmtt Reserved: 0x0000
+pmtt PMTT Subtable:
+pmtt Type: 0x01
+pmtt Reserved: 0x00
+pmtt Length: 0x006c
+pmtt Flags: 0x0005
+pmtt Reserved: 0x0000
+pmtt Read Latency: 0x0000f000
+pmtt Write latency: 0x0000e000
+pmtt Read Bandwidth: 0x0000d000
+pmtt Write Bandwidth: 0x0000c000
+pmtt Optimal Access Unit: 0x0004
+pmtt Optimal Access Alignment: 0x0008
+pmtt Reserved: 0x0000
+pmtt Number of Proximity Domains: 0x0004
+pmtt Proximity Domain: 0x00001000
+pmtt Proximity Domain: 0x00002000
+pmtt Proximity Domain: 0x00003000
+pmtt Proximity Domain: 0x00004000
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x00
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt Physical Component Identifier: 0x0000
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xa0000000
+pmtt SMBIOS Handle: 0x0000000a
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x00
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt Physical Component Identifier: 0x0001
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xb0000000
+pmtt SMBIOS Handle: 0x0000000b
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x00
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt Physical Component Identifier: 0x0001
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xc0000000
+pmtt SMBIOS Handle: 0xffffffff
+pmtt PMTT Subtable:
+pmtt Type: 0x01
+pmtt Reserved: 0x00
+pmtt Length: 0x0020
+pmtt Flags: 0x0001
+pmtt Reserved: 0x0000
+pmtt Read Latency: 0x00001000
+pmtt Write latency: 0x00002000
+pmtt Read Bandwidth: 0x00003000
+pmtt Write Bandwidth: 0x00004000
+pmtt Optimal Access Unit: 0x0004
+pmtt Optimal Access Alignment: 0x0008
+pmtt Reserved: 0x0000
+pmtt Number of Proximity Domains: 0x0000
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x00
+pmtt Length: 0x000c
+pmtt Flags: 0x0003
+pmtt Reserved: 0x0000
+pmtt Socket Identifier: 0x0002
+pmtt Reserved: 0x0000
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x00
+pmtt Length: 0x000c
+pmtt Flags: 0x0007
+pmtt Reserved: 0x0000
+pmtt Socket Identifier: 0x0003
+pmtt Reserved: 0x0000
+pmtt
+pmtt PASSED: Test 1, No issues found in PMTT table.
+pmtt
+pmtt ==========================================================
+pmtt 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+pmtt info only.
+pmtt ==========================================================
diff --git a/fwts-test/pmtt-0001/pmtt-0002.log b/fwts-test/pmtt-0001/pmtt-0002.log
new file mode 100644
index 0000000..c5e060d
--- /dev/null
+++ b/fwts-test/pmtt-0001/pmtt-0002.log
@@ -0,0 +1,117 @@
+pmtt pmtt: PMTT Memory Topology Table test.
+pmtt ----------------------------------------------------------
+pmtt Test 1 of 1: Validate PMTT table.
+pmtt PMTT Table:
+pmtt Reserved: 0x02000000
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x02000000 instead
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x01
+pmtt Length: 0x0098
+pmtt Flags: 0x0001
+pmtt Reserved: 0x0003
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x01 instead
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x0003 instead
+pmtt Socket Identifier: 0x0001
+pmtt Reserved: 0x0400
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x0400 instead
+pmtt PMTT Subtable:
+pmtt Type: 0x01
+pmtt Reserved: 0x05
+pmtt Length: 0x006c
+pmtt Flags: 0x0005
+pmtt Reserved: 0x0000
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x05 instead
+pmtt Read Latency: 0x0000f000
+pmtt Write latency: 0x0000e000
+pmtt Read Bandwidth: 0x0000d000
+pmtt Write Bandwidth: 0x0000c000
+pmtt Optimal Access Unit: 0x0004
+pmtt Optimal Access Alignment: 0x0008
+pmtt Reserved: 0x0600
+pmtt Number of Proximity Domains: 0x0004
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x0600 instead
+pmtt Proximity Domain: 0x00001000
+pmtt Proximity Domain: 0x00002000
+pmtt Proximity Domain: 0x00003000
+pmtt Proximity Domain: 0x00004000
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x07
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt FAILED [LOW] PMTTReservedNonZero: Test 1, PMTT reserved
+pmtt field must be zero, got 0x07 instead
+pmtt Physical Component Identifier: 0x0000
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xa0000000
+pmtt SMBIOS Handle: 0x0000000a
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x00
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt Physical Component Identifier: 0x0001
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xb0000000
+pmtt SMBIOS Handle: 0x3412000b
+pmtt FAILED [HIGH] PMTTBADSMBIOSHandle: Test 1, PMTT upper 2
+pmtt bytes must be zero, got 0x3412000b instead
+pmtt PMTT Subtable:
+pmtt Type: 0x02
+pmtt Reserved: 0x00
+pmtt Length: 0x0014
+pmtt Flags: 0x0002
+pmtt Reserved: 0x0000
+pmtt Physical Component Identifier: 0x0001
+pmtt Reserved: 0x0000
+pmtt Size of DIMM: 0xc0000000
+pmtt SMBIOS Handle: 0xffffffff
+pmtt PMTT Subtable:
+pmtt Type: 0x01
+pmtt Reserved: 0x00
+pmtt Length: 0x0020
+pmtt Flags: 0x0001
+pmtt Reserved: 0x0000
+pmtt Read Latency: 0x00001000
+pmtt Write latency: 0x00002000
+pmtt Read Bandwidth: 0x00003000
+pmtt Write Bandwidth: 0x00004000
+pmtt Optimal Access Unit: 0x0004
+pmtt Optimal Access Alignment: 0x0008
+pmtt Reserved: 0x0000
+pmtt Number of Proximity Domains: 0x0000
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x00
+pmtt Length: 0x000c
+pmtt Flags: 0x0013
+pmtt Reserved: 0x0000
+pmtt FAILED [HIGH] PMTTBadFlags: Test 1, PMTT Flags's
+pmtt Bits[15..4] must be zero, got 0x0013 instead
+pmtt Socket Identifier: 0x0002
+pmtt Reserved: 0x0000
+pmtt PMTT Subtable:
+pmtt Type: 0x00
+pmtt Reserved: 0x00
+pmtt Length: 0x000c
+pmtt Flags: 0x000f
+pmtt Reserved: 0x0000
+pmtt FAILED [HIGH] PMTTBadFlags: Test 1, PMTT Flags's
+pmtt Bits[3..2] must not be 11b
+pmtt Socket Identifier: 0x0003
+pmtt Reserved: 0x0000
+pmtt
+pmtt
+pmtt ==========================================================
+pmtt 0 passed, 10 failed, 0 warning, 0 aborted, 0 skipped, 0
+pmtt info only.
+pmtt ==========================================================
diff --git a/fwts-test/pmtt-0001/test-0001.sh b/fwts-test/pmtt-0001/test-0001.sh
new file mode 100755
index 0000000..f265210
--- /dev/null
+++ b/fwts-test/pmtt-0001/test-0001.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test apcitables against PMTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pmtt.log.$$
+
+$FWTS --show-tests | grep pmtt > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pmtt-0001/acpidump-0001.log pmtt - | cut -c7- | grep "^pmtt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pmtt-0001/pmtt-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/pmtt-0001/test-0002.sh b/fwts-test/pmtt-0001/test-0002.sh
new file mode 100755
index 0000000..7c3c714
--- /dev/null
+++ b/fwts-test/pmtt-0001/test-0002.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test apcitables against invalid PMTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pmtt.log.$$
+
+$FWTS --show-tests | grep pmtt > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pmtt-0001/acpidump-0002.log pmtt - | cut -c7- | grep "^pmtt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pmtt-0001/pmtt-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.7.4
More information about the fwts-devel
mailing list