[PATCH 2/2] fwts-test: Add regression test for PCCT
Alex Hung
alex.hung at canonical.com
Mon Jul 25 09:39:31 UTC 2016
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
Makefile.am | 2 +
fwts-test/pcct-0001/acpidump-0001.log | 44 +++++++++++++++++
fwts-test/pcct-0001/acpidump-0002.log | 44 +++++++++++++++++
fwts-test/pcct-0001/pcct-0001.log | 79 ++++++++++++++++++++++++++++++
fwts-test/pcct-0001/pcct-0002.log | 90 +++++++++++++++++++++++++++++++++++
fwts-test/pcct-0001/test-0001.sh | 23 +++++++++
fwts-test/pcct-0001/test-0002.sh | 23 +++++++++
7 files changed, 305 insertions(+)
create mode 100644 fwts-test/pcct-0001/acpidump-0001.log
create mode 100644 fwts-test/pcct-0001/acpidump-0002.log
create mode 100644 fwts-test/pcct-0001/pcct-0001.log
create mode 100644 fwts-test/pcct-0001/pcct-0002.log
create mode 100755 fwts-test/pcct-0001/test-0001.sh
create mode 100755 fwts-test/pcct-0001/test-0002.sh
diff --git a/Makefile.am b/Makefile.am
index bda44d7..7425d4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -102,6 +102,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
fwts-test/oops-0001/test-0003.sh \
fwts-test/osilinux-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/rsdp-0001/test-0001.sh \
fwts-test/rsdt-0001/test-0001.sh \
fwts-test/sbst-0001/test-0001.sh \
diff --git a/fwts-test/pcct-0001/acpidump-0001.log b/fwts-test/pcct-0001/acpidump-0001.log
new file mode 100644
index 0000000..8aff607
--- /dev/null
+++ b/fwts-test/pcct-0001/acpidump-0001.log
@@ -0,0 +1,44 @@
+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 ....
+
+PCCT @ 0x00000000
+ 0000: 50 43 43 54 06 01 00 00 01 60 49 4e 54 45 4c 20 PCCT.....`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 01 00 00 00 00 00 00 00 00 00 00 00 '.. ............
+ 0030: 00 3e 00 00 00 00 00 00 11 11 11 11 11 11 11 11 .>..............
+ 0040: 22 22 22 22 22 22 22 22 01 32 00 03 33 33 33 33 """""""".2..3333
+ 0050: 33 33 33 33 44 44 44 44 44 44 44 44 55 55 55 55 3333DDDDDDDDUUUU
+ 0060: 55 55 55 55 66 66 66 66 77 77 77 77 88 88 01 3e UUUUffffwwww...>
+ 0070: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 55 55 ..............UU
+ 0080: 55 55 55 55 55 55 01 32 00 03 44 44 44 44 44 44 UUUUUU.2..DDDDDD
+ 0090: 44 44 44 44 44 44 44 44 44 44 55 55 55 55 55 55 DDDDDDDDDDUUUUUU
+ 00a0: 55 55 66 66 66 66 77 77 77 77 88 88 02 5a 01 00 UUffffwwww...Z..
+ 00b0: 00 00 03 00 00 00 00 00 00 00 00 00 99 99 99 99 ................
+ 00c0: 99 99 99 99 01 32 00 03 44 44 44 44 44 44 44 44 .....2..DDDDDDDD
+ 00d0: 44 44 44 44 44 44 44 44 55 55 55 55 55 55 55 55 DDDDDDDDUUUUUUUU
+ 00e0: 66 66 66 66 77 77 77 77 88 88 01 32 00 03 33 33 ffffwwww...2..33
+ 00f0: 33 33 33 33 33 33 44 44 44 44 44 44 44 44 55 55 333333DDDDDDDDUU
+ 0100: 55 55 55 55 55 55 UUUUUU
+
diff --git a/fwts-test/pcct-0001/acpidump-0002.log b/fwts-test/pcct-0001/acpidump-0002.log
new file mode 100644
index 0000000..d98f96d
--- /dev/null
+++ b/fwts-test/pcct-0001/acpidump-0002.log
@@ -0,0 +1,44 @@
+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 ....
+
+PCCT @ 0x00000000
+ 0000: 50 43 43 54 06 01 00 00 01 57 49 4e 54 45 4c 20 PCCT.....WINTEL
+ 0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c TEMPLATE....INTL
+ 0020: 27 05 16 20 01 00 00 00 00 00 00 00 00 00 00 00 '.. ............
+ 0030: 00 3e 00 00 00 00 00 00 11 11 11 11 11 11 11 11 .>..............
+ 0040: 22 22 22 22 22 22 22 22 02 32 00 03 33 33 33 33 """""""".2..3333
+ 0050: 33 33 33 33 44 44 44 44 44 44 44 44 55 55 55 55 3333DDDDDDDDUUUU
+ 0060: 55 55 55 55 66 66 66 66 77 77 77 77 88 88 01 3e UUUUffffwwww...>
+ 0070: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 55 55 ..............UU
+ 0080: 55 55 55 55 55 55 04 32 00 03 44 44 44 44 44 44 UUUUUU.2..DDDDDD
+ 0090: 44 44 44 44 44 44 44 44 44 44 55 55 55 55 55 55 DDDDDDDDDDUUUUUU
+ 00a0: 55 55 66 66 66 66 77 77 77 77 88 88 02 5a 01 00 UUffffwwww...Z..
+ 00b0: 00 00 03 00 00 00 00 00 00 00 00 00 99 99 99 99 ................
+ 00c0: 99 99 99 99 03 32 00 03 44 44 44 44 44 44 44 44 .....2..DDDDDDDD
+ 00d0: 44 44 44 44 44 44 44 44 55 55 55 55 55 55 55 55 DDDDDDDDUUUUUUUU
+ 00e0: 66 66 66 66 77 77 77 77 88 88 04 32 00 03 33 33 ffffwwww...2..33
+ 00f0: 33 33 33 33 33 33 44 44 44 44 44 44 44 44 55 55 333333DDDDDDDDUU
+ 0100: 55 55 55 55 55 55 UUUUUU
+
diff --git a/fwts-test/pcct-0001/pcct-0001.log b/fwts-test/pcct-0001/pcct-0001.log
new file mode 100644
index 0000000..d82a6bd
--- /dev/null
+++ b/fwts-test/pcct-0001/pcct-0001.log
@@ -0,0 +1,79 @@
+pcct pcct: PCCT Platform Communications Channel test.
+pcct ----------------------------------------------------------
+pcct Test 1 of 1: Validate PCC table.
+pcct PCC Table:
+pcct Flags: 0x00000001
+pcct Reserved: 0x0000000000000000
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x00
+pcct Length: 0x3e
+pcct Reserved: 0x0000000000000000
+pcct Base Address: 0x1111111111111111
+pcct Length: 0x2222222222222222
+pcct Doorbell Register:
+pcct Address Space ID 0x01
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x3333333333333333
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x01
+pcct Length: 0x3e
+pcct Doorbell Interrupt: 0x00000001
+pcct Doorbell Interrupt Flags: 0x01
+pcct Reserved: 0x00
+pcct Base Address: 0x0000000000000000
+pcct Length: 0x5555555555555555
+pcct Doorbell Register:
+pcct Address Space ID 0x01
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x4444444444444444
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x02
+pcct Length: 0x5a
+pcct Doorbell Interrupt: 0x00000001
+pcct Doorbell Interrupt Flags: 0x03
+pcct Reserved: 0x00
+pcct Base Address: 0x0000000000000000
+pcct Length: 0x9999999999999999
+pcct Doorbell Register:
+pcct Address Space ID 0x01
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x4444444444444444
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct Doorbell Ack Register:
+pcct Address Space ID 0x01
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x3333333333333333
+pcct Doorbell Ack Preserve: 0x4444444444444444
+pcct Doorbell Ack Write: 0x5555555555555555
+pcct
+pcct PASSED: Test 1, No issues found in PCC table.
+pcct
+pcct ==========================================================
+pcct 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+pcct info only.
+pcct ==========================================================
diff --git a/fwts-test/pcct-0001/pcct-0002.log b/fwts-test/pcct-0001/pcct-0002.log
new file mode 100644
index 0000000..5c80230
--- /dev/null
+++ b/fwts-test/pcct-0001/pcct-0002.log
@@ -0,0 +1,90 @@
+pcct pcct: PCCT Platform Communications Channel test.
+pcct ----------------------------------------------------------
+pcct Test 1 of 1: Validate PCC table.
+pcct PCC Table:
+pcct Flags: 0x00000001
+pcct Reserved: 0x0000000000000000
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x00
+pcct Length: 0x3e
+pcct Reserved: 0x0000000000000000
+pcct Base Address: 0x1111111111111111
+pcct Length: 0x2222222222222222
+pcct Doorbell Register:
+pcct Address Space ID 0x02
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x3333333333333333
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct FAILED [HIGH] PCCTSubspaceInvalidAddrSpaceID: Test 1, PCCT
+pcct Subspace Type 0 has space ID = 0x02 which is not System I
+pcct /O Space or System Memory Space
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x01
+pcct Length: 0x3e
+pcct Doorbell Interrupt: 0x00000001
+pcct Doorbell Interrupt Flags: 0x01
+pcct Reserved: 0x00
+pcct Base Address: 0x0000000000000000
+pcct Length: 0x5555555555555555
+pcct Doorbell Register:
+pcct Address Space ID 0x04
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x4444444444444444
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct FAILED [HIGH] PCCTSubspaceInvalidAddrSpaceID: Test 1, PCCT
+pcct Subspace Type 1 has space ID = 0x04 which is not System I
+pcct /O Space or System Memory Space
+pcct
+pcct PCC Subspace Structure:
+pcct Type: 0x02
+pcct Length: 0x5a
+pcct Doorbell Interrupt: 0x00000001
+pcct Doorbell Interrupt Flags: 0x03
+pcct Reserved: 0x00
+pcct Base Address: 0x0000000000000000
+pcct Length: 0x9999999999999999
+pcct Doorbell Register:
+pcct Address Space ID 0x03
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x4444444444444444
+pcct Doorbell Preserve: 0x4444444444444444
+pcct Doorbell Write: 0x5555555555555555
+pcct Nominal Latency: 0x66666666
+pcct Max Periodic Access Rate: 0x77777777
+pcct Min Request Turnaround Time: 0x00008888
+pcct Doorbell Ack Register:
+pcct Address Space ID 0x04
+pcct Register Bit Width 0x32
+pcct Register Bit Offset 0x00
+pcct Access Size 0x03
+pcct Address 0x3333333333333333
+pcct Doorbell Ack Preserve: 0x4444444444444444
+pcct Doorbell Ack Write: 0x5555555555555555
+pcct FAILED [HIGH] PCCTSubspaceInvalidAddrSpaceID: Test 1, PCCT
+pcct Subspace Type 2 has space ID = 0x03 which is not System I
+pcct /O Space or System Memory Space
+pcct FAILED [HIGH] PCCTSubspaceInvalidAddrSpaceID: Test 1, PCCT
+pcct Subspace Type 2 has space ID = 0x03 which is not System I
+pcct /O Space or System Memory Space
+pcct
+pcct
+pcct ==========================================================
+pcct 0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0
+pcct info only.
+pcct ==========================================================
diff --git a/fwts-test/pcct-0001/test-0001.sh b/fwts-test/pcct-0001/test-0001.sh
new file mode 100755
index 0000000..ddc16e4
--- /dev/null
+++ b/fwts-test/pcct-0001/test-0001.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test table against PCCT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pcct.log.$$
+
+$FWTS --show-tests | grep PCCT > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pcct-0001/acpidump-0001.log pcct - | cut -c7- | grep "^pcct" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pcct-0001/pcct-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/pcct-0001/test-0002.sh b/fwts-test/pcct-0001/test-0002.sh
new file mode 100755
index 0000000..f940f61
--- /dev/null
+++ b/fwts-test/pcct-0001/test-0002.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+TEST="Test table against invalid PCCT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pcct.log.$$
+
+$FWTS --show-tests | grep PCCT > /dev/null
+if [ $? -eq 1 ]; then
+ echo SKIP: $TEST, $NAME
+ exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pcct-0001/acpidump-0002.log pcct - | cut -c7- | grep "^pcct" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pcct-0001/pcct-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