diff mbox

[2/2] fwts-test: Add regression test for PPTT

Message ID 1500578087-28100-2-git-send-email-alex.hung@canonical.com
State Superseded
Headers show

Commit Message

Alex Hung July 20, 2017, 7:14 p.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 Makefile.am                           |  2 +
 fwts-test/pptt-0001/acpidump-0001.log | 37 +++++++++++++++++
 fwts-test/pptt-0001/acpidump-0002.log | 38 ++++++++++++++++++
 fwts-test/pptt-0001/pptt-0001.log     | 66 ++++++++++++++++++++++++++++++
 fwts-test/pptt-0001/pptt-0002.log     | 75 +++++++++++++++++++++++++++++++++++
 fwts-test/pptt-0001/test-0001.sh      | 23 +++++++++++
 fwts-test/pptt-0001/test-0002.sh      | 23 +++++++++++
 7 files changed, 264 insertions(+)
 create mode 100644 fwts-test/pptt-0001/acpidump-0001.log
 create mode 100644 fwts-test/pptt-0001/acpidump-0002.log
 create mode 100644 fwts-test/pptt-0001/pptt-0001.log
 create mode 100644 fwts-test/pptt-0001/pptt-0002.log
 create mode 100755 fwts-test/pptt-0001/test-0001.sh
 create mode 100755 fwts-test/pptt-0001/test-0002.sh

Comments

Colin Ian King Aug. 22, 2017, 3:21 p.m. UTC | #1
On 20/07/17 20:14, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  Makefile.am                           |  2 +
>  fwts-test/pptt-0001/acpidump-0001.log | 37 +++++++++++++++++
>  fwts-test/pptt-0001/acpidump-0002.log | 38 ++++++++++++++++++
>  fwts-test/pptt-0001/pptt-0001.log     | 66 ++++++++++++++++++++++++++++++
>  fwts-test/pptt-0001/pptt-0002.log     | 75 +++++++++++++++++++++++++++++++++++
>  fwts-test/pptt-0001/test-0001.sh      | 23 +++++++++++
>  fwts-test/pptt-0001/test-0002.sh      | 23 +++++++++++
>  7 files changed, 264 insertions(+)
>  create mode 100644 fwts-test/pptt-0001/acpidump-0001.log
>  create mode 100644 fwts-test/pptt-0001/acpidump-0002.log
>  create mode 100644 fwts-test/pptt-0001/pptt-0001.log
>  create mode 100644 fwts-test/pptt-0001/pptt-0002.log
>  create mode 100755 fwts-test/pptt-0001/test-0001.sh
>  create mode 100755 fwts-test/pptt-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index 2729e39..f16de80 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -130,6 +130,8 @@ TESTS = fwts-test/acpidump-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/pptt-0001/test-0001.sh \
> +	fwts-test/pptt-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/pptt-0001/acpidump-0001.log b/fwts-test/pptt-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..f59ace2
> --- /dev/null
> +++ b/fwts-test/pptt-0001/acpidump-0001.log
> @@ -0,0 +1,37 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +PPTT @ 0x00000000
> +  0000: 50 50 54 54 a6 00 00 00 01 b0 49 4e 54 45 4c 20  PPTT......INTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 29 06 17 20 00 18 00 00 00 00 00 00 00 00 00 00  ).. ............
> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 00 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0050: 00 00 00 00 00 1c 00 00 03 00 00 00 00 00 00 00  ................
> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0070: 01 18 00 00 3f 00 00 00 00 00 00 00 00 00 00 00  ....?...........
> +  0080: 00 00 00 00 00 00 00 00 02 1e 00 00 00 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00a0: 00 00 00 00 00 00                                ......
> diff --git a/fwts-test/pptt-0001/acpidump-0002.log b/fwts-test/pptt-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..c069109
> --- /dev/null
> +++ b/fwts-test/pptt-0001/acpidump-0002.log
> @@ -0,0 +1,38 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +PPTT @ 0x00000000
> +  0000: 50 50 54 54 a6 00 00 00 01 2c 49 4e 54 45 4c 20  PPTT.....,INTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 29 06 17 20 00 18 01 00 00 00 00 00 00 00 00 00  ).. ............
> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 02 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0050: 00 00 00 00 00 1c 00 00 07 00 00 00 00 00 00 00  ................
> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0070: 01 18 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 00 00 00 02 1e 03 00 00 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00a0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/pptt-0001/pptt-0001.log b/fwts-test/pptt-0001/pptt-0001.log
> new file mode 100644
> index 0000000..c94d31f
> --- /dev/null
> +++ b/fwts-test/pptt-0001/pptt-0001.log
> @@ -0,0 +1,66 @@
> +pptt            pptt: PPTT Processor Properties Topology Table test.
> +pptt            ----------------------------------------------------------
> +pptt            Test 1 of 1: Validate PPTT table.
> +pptt            PPTT Processor Properties Topology Table:
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000000
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000001
> +pptt                Private Resources[0]:           0x00000000
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000000
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x1c
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000003
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000002
> +pptt                Private Resources[0]:           0x00000000
> +pptt                Private Resources[1]:           0x00000000
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x0000003f
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x02
> +pptt                Length:                         0x1e
> +pptt                Reserved:                       0x0000
> +pptt                VENDOR_ID:                      0x00000000
> +pptt                LEVEL_1_ID:                     0x0000000000000000
> +pptt                LEVEL_2_ID:                     0x0000000000000000
> +pptt                MAJOR_REV:                      0x0000
> +pptt                MINOR_REV:                      0x0000
> +pptt                SPIN_REV:                       0x0000
> +pptt            
> +pptt            PASSED: Test 1, No issues found in PPTT table.
> +pptt            
> +pptt            ==========================================================
> +pptt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +pptt            info only.
> +pptt            ==========================================================
> diff --git a/fwts-test/pptt-0001/pptt-0002.log b/fwts-test/pptt-0001/pptt-0002.log
> new file mode 100644
> index 0000000..a8f057f
> --- /dev/null
> +++ b/fwts-test/pptt-0001/pptt-0002.log
> @@ -0,0 +1,75 @@
> +pptt            pptt: PPTT Processor Properties Topology Table test.
> +pptt            ----------------------------------------------------------
> +pptt            Test 1 of 1: Validate PPTT table.
> +pptt            PPTT Processor Properties Topology Table:
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0001
> +pptt                Flags:                          0x00000000
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000001
> +pptt                Private Resources[0]:           0x00000000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0001 instead
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0002
> +pptt                Flags:                          0x00000000
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0002 instead
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x1c
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000007
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000002
> +pptt                Private Resources[0]:           0x00000000
> +pptt                Private Resources[1]:           0x00000000
> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
> +pptt            Bits[31..2] must be zero, got 0x00000007 instead
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x000000ff
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0xc0
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
> +pptt            Bits[31..7] must be zero, got 0x000000ff instead
> +pptt            
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x02
> +pptt                Length:                         0x1e
> +pptt                Reserved:                       0x0003
> +pptt                VENDOR_ID:                      0x00000000
> +pptt                LEVEL_1_ID:                     0x0000000000000000
> +pptt                LEVEL_2_ID:                     0x0000000000000000
> +pptt                MAJOR_REV:                      0x0000
> +pptt                MINOR_REV:                      0x0000
> +pptt                SPIN_REV:                       0x0000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0003 instead
> +pptt            
> +pptt            
> +pptt            ==========================================================
> +pptt            0 passed, 5 failed, 0 warning, 0 aborted, 0 skipped, 0
> +pptt            info only.
> +pptt            ==========================================================
> diff --git a/fwts-test/pptt-0001/test-0001.sh b/fwts-test/pptt-0001/test-0001.sh
> new file mode 100755
> index 0000000..481fcb2
> --- /dev/null
> +++ b/fwts-test/pptt-0001/test-0001.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test acpitables against PPTT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/pptt.log.$$
> +
> +$FWTS --show-tests | grep pptt > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0001.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-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/pptt-0001/test-0002.sh b/fwts-test/pptt-0001/test-0002.sh
> new file mode 100755
> index 0000000..6faec92
> --- /dev/null
> +++ b/fwts-test/pptt-0001/test-0002.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test acpitables against invalid PPTT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/pptt.log.$$
> +
> +$FWTS --show-tests | grep pptt > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0002.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-0002.log >> $FAILURE_LOG
> +ret=$?
> +if [ $ret -eq 0 ]; then
> +	echo PASSED: $TEST, $NAME
> +else
> +	echo FAILED: $TEST, $NAME
> +fi
> +
> +rm $TMPLOG
> +exit $ret
> 

this does not pass against V3 of the PPTT test.

Colin
Alex Hung Aug. 22, 2017, 7:57 p.m. UTC | #2
On Tue, Aug 22, 2017 at 8:21 AM, Colin Ian King
<colin.king@canonical.com> wrote:
> On 20/07/17 20:14, Alex Hung wrote:
>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>> ---
>>  Makefile.am                           |  2 +
>>  fwts-test/pptt-0001/acpidump-0001.log | 37 +++++++++++++++++
>>  fwts-test/pptt-0001/acpidump-0002.log | 38 ++++++++++++++++++
>>  fwts-test/pptt-0001/pptt-0001.log     | 66 ++++++++++++++++++++++++++++++
>>  fwts-test/pptt-0001/pptt-0002.log     | 75 +++++++++++++++++++++++++++++++++++
>>  fwts-test/pptt-0001/test-0001.sh      | 23 +++++++++++
>>  fwts-test/pptt-0001/test-0002.sh      | 23 +++++++++++
>>  7 files changed, 264 insertions(+)
>>  create mode 100644 fwts-test/pptt-0001/acpidump-0001.log
>>  create mode 100644 fwts-test/pptt-0001/acpidump-0002.log
>>  create mode 100644 fwts-test/pptt-0001/pptt-0001.log
>>  create mode 100644 fwts-test/pptt-0001/pptt-0002.log
>>  create mode 100755 fwts-test/pptt-0001/test-0001.sh
>>  create mode 100755 fwts-test/pptt-0001/test-0002.sh
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 2729e39..f16de80 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -130,6 +130,8 @@ TESTS = fwts-test/acpidump-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/pptt-0001/test-0001.sh \
>> +     fwts-test/pptt-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/pptt-0001/acpidump-0001.log b/fwts-test/pptt-0001/acpidump-0001.log
>> new file mode 100644
>> index 0000000..f59ace2
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/acpidump-0001.log
>> @@ -0,0 +1,37 @@
>> +FACS @ 0x00000000
>> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
>> +  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  . ...........@..
>> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
>> +  00f0: 00 00 00 00                                      ....
>> +
>> +PPTT @ 0x00000000
>> +  0000: 50 50 54 54 a6 00 00 00 01 b0 49 4e 54 45 4c 20  PPTT......INTEL
>> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
>> +  0020: 29 06 17 20 00 18 00 00 00 00 00 00 00 00 00 00  ).. ............
>> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 00 00  ................
>> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  0050: 00 00 00 00 00 1c 00 00 03 00 00 00 00 00 00 00  ................
>> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  0070: 01 18 00 00 3f 00 00 00 00 00 00 00 00 00 00 00  ....?...........
>> +  0080: 00 00 00 00 00 00 00 00 02 1e 00 00 00 00 00 00  ................
>> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  00a0: 00 00 00 00 00 00                                ......
>> diff --git a/fwts-test/pptt-0001/acpidump-0002.log b/fwts-test/pptt-0001/acpidump-0002.log
>> new file mode 100644
>> index 0000000..c069109
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/acpidump-0002.log
>> @@ -0,0 +1,38 @@
>> +FACS @ 0x00000000
>> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
>> +  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  . ...........@..
>> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
>> +  00f0: 00 00 00 00                                      ....
>> +
>> +PPTT @ 0x00000000
>> +  0000: 50 50 54 54 a6 00 00 00 01 2c 49 4e 54 45 4c 20  PPTT.....,INTEL
>> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
>> +  0020: 29 06 17 20 00 18 01 00 00 00 00 00 00 00 00 00  ).. ............
>> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 02 00  ................
>> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  0050: 00 00 00 00 00 1c 00 00 07 00 00 00 00 00 00 00  ................
>> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  0070: 01 18 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  0080: 00 00 00 00 c0 00 00 00 02 1e 03 00 00 00 00 00  ................
>> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>> +  00a0: 00 00 00 00 00 00                                ......
>> +
>> diff --git a/fwts-test/pptt-0001/pptt-0001.log b/fwts-test/pptt-0001/pptt-0001.log
>> new file mode 100644
>> index 0000000..c94d31f
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/pptt-0001.log
>> @@ -0,0 +1,66 @@
>> +pptt            pptt: PPTT Processor Properties Topology Table test.
>> +pptt            ----------------------------------------------------------
>> +pptt            Test 1 of 1: Validate PPTT table.
>> +pptt            PPTT Processor Properties Topology Table:
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x00
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x00000000
>> +pptt                Parent:                         0x00000000
>> +pptt                ACPI Processor ID:              0x00000000
>> +pptt                Number of Private Resources:    0x00000001
>> +pptt                Private Resources[0]:           0x00000000
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x01
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x00000000
>> +pptt                Next Level of Cache:            0x00000000
>> +pptt                Size:                           0x00000000
>> +pptt                Number of sets:                 0x00000000
>> +pptt                Associativity:                  0x00
>> +pptt                Attributes:                     0x00
>> +pptt                Line size:                      0x0000
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x00
>> +pptt                Length:                         0x1c
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x00000003
>> +pptt                Parent:                         0x00000000
>> +pptt                ACPI Processor ID:              0x00000000
>> +pptt                Number of Private Resources:    0x00000002
>> +pptt                Private Resources[0]:           0x00000000
>> +pptt                Private Resources[1]:           0x00000000
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x01
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x0000003f
>> +pptt                Next Level of Cache:            0x00000000
>> +pptt                Size:                           0x00000000
>> +pptt                Number of sets:                 0x00000000
>> +pptt                Associativity:                  0x00
>> +pptt                Attributes:                     0x00
>> +pptt                Line size:                      0x0000
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x02
>> +pptt                Length:                         0x1e
>> +pptt                Reserved:                       0x0000
>> +pptt                VENDOR_ID:                      0x00000000
>> +pptt                LEVEL_1_ID:                     0x0000000000000000
>> +pptt                LEVEL_2_ID:                     0x0000000000000000
>> +pptt                MAJOR_REV:                      0x0000
>> +pptt                MINOR_REV:                      0x0000
>> +pptt                SPIN_REV:                       0x0000
>> +pptt
>> +pptt            PASSED: Test 1, No issues found in PPTT table.
>> +pptt
>> +pptt            ==========================================================
>> +pptt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
>> +pptt            info only.
>> +pptt            ==========================================================
>> diff --git a/fwts-test/pptt-0001/pptt-0002.log b/fwts-test/pptt-0001/pptt-0002.log
>> new file mode 100644
>> index 0000000..a8f057f
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/pptt-0002.log
>> @@ -0,0 +1,75 @@
>> +pptt            pptt: PPTT Processor Properties Topology Table test.
>> +pptt            ----------------------------------------------------------
>> +pptt            Test 1 of 1: Validate PPTT table.
>> +pptt            PPTT Processor Properties Topology Table:
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x00
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0001
>> +pptt                Flags:                          0x00000000
>> +pptt                Parent:                         0x00000000
>> +pptt                ACPI Processor ID:              0x00000000
>> +pptt                Number of Private Resources:    0x00000001
>> +pptt                Private Resources[0]:           0x00000000
>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>> +pptt            field must be zero, got 0x0001 instead
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x01
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0002
>> +pptt                Flags:                          0x00000000
>> +pptt                Next Level of Cache:            0x00000000
>> +pptt                Size:                           0x00000000
>> +pptt                Number of sets:                 0x00000000
>> +pptt                Associativity:                  0x00
>> +pptt                Attributes:                     0x00
>> +pptt                Line size:                      0x0000
>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>> +pptt            field must be zero, got 0x0002 instead
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x00
>> +pptt                Length:                         0x1c
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x00000007
>> +pptt                Parent:                         0x00000000
>> +pptt                ACPI Processor ID:              0x00000000
>> +pptt                Number of Private Resources:    0x00000002
>> +pptt                Private Resources[0]:           0x00000000
>> +pptt                Private Resources[1]:           0x00000000
>> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
>> +pptt            Bits[31..2] must be zero, got 0x00000007 instead
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x01
>> +pptt                Length:                         0x18
>> +pptt                Reserved:                       0x0000
>> +pptt                Flags:                          0x000000ff
>> +pptt                Next Level of Cache:            0x00000000
>> +pptt                Size:                           0x00000000
>> +pptt                Number of sets:                 0x00000000
>> +pptt                Associativity:                  0xc0
>> +pptt                Attributes:                     0x00
>> +pptt                Line size:                      0x0000
>> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
>> +pptt            Bits[31..7] must be zero, got 0x000000ff instead
>> +pptt
>> +pptt              PPTT Processor Topology Structure:
>> +pptt                Type:                           0x02
>> +pptt                Length:                         0x1e
>> +pptt                Reserved:                       0x0003
>> +pptt                VENDOR_ID:                      0x00000000
>> +pptt                LEVEL_1_ID:                     0x0000000000000000
>> +pptt                LEVEL_2_ID:                     0x0000000000000000
>> +pptt                MAJOR_REV:                      0x0000
>> +pptt                MINOR_REV:                      0x0000
>> +pptt                SPIN_REV:                       0x0000
>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>> +pptt            field must be zero, got 0x0003 instead
>> +pptt
>> +pptt
>> +pptt            ==========================================================
>> +pptt            0 passed, 5 failed, 0 warning, 0 aborted, 0 skipped, 0
>> +pptt            info only.
>> +pptt            ==========================================================
>> diff --git a/fwts-test/pptt-0001/test-0001.sh b/fwts-test/pptt-0001/test-0001.sh
>> new file mode 100755
>> index 0000000..481fcb2
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/test-0001.sh
>> @@ -0,0 +1,23 @@
>> +#!/bin/bash
>> +#
>> +TEST="Test acpitables against PPTT"
>> +NAME=test-0001.sh
>> +TMPLOG=$TMP/pptt.log.$$
>> +
>> +$FWTS --show-tests | grep pptt > /dev/null
>> +if [ $? -eq 1 ]; then
>> +     echo SKIP: $TEST, $NAME
>> +     exit 77
>> +fi
>> +
>> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0001.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
>> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-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/pptt-0001/test-0002.sh b/fwts-test/pptt-0001/test-0002.sh
>> new file mode 100755
>> index 0000000..6faec92
>> --- /dev/null
>> +++ b/fwts-test/pptt-0001/test-0002.sh
>> @@ -0,0 +1,23 @@
>> +#!/bin/bash
>> +#
>> +TEST="Test acpitables against invalid PPTT"
>> +NAME=test-0001.sh
>> +TMPLOG=$TMP/pptt.log.$$
>> +
>> +$FWTS --show-tests | grep pptt > /dev/null
>> +if [ $? -eq 1 ]; then
>> +     echo SKIP: $TEST, $NAME
>> +     exit 77
>> +fi
>> +
>> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0002.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
>> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-0002.log >> $FAILURE_LOG
>> +ret=$?
>> +if [ $ret -eq 0 ]; then
>> +     echo PASSED: $TEST, $NAME
>> +else
>> +     echo FAILED: $TEST, $NAME
>> +fi
>> +
>> +rm $TMPLOG
>> +exit $ret
>>
>
> this does not pass against V3 of the PPTT test.
>
> Colin

Thanks Colin. An updated V2 was available @
http://patchwork.ozlabs.org/patch/791846/
Colin Ian King Aug. 22, 2017, 10:17 p.m. UTC | #3
On 22/08/17 20:57, Alex Hung wrote:
> On Tue, Aug 22, 2017 at 8:21 AM, Colin Ian King
> <colin.king@canonical.com> wrote:
>> On 20/07/17 20:14, Alex Hung wrote:
>>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>>> ---
>>>  Makefile.am                           |  2 +
>>>  fwts-test/pptt-0001/acpidump-0001.log | 37 +++++++++++++++++
>>>  fwts-test/pptt-0001/acpidump-0002.log | 38 ++++++++++++++++++
>>>  fwts-test/pptt-0001/pptt-0001.log     | 66 ++++++++++++++++++++++++++++++
>>>  fwts-test/pptt-0001/pptt-0002.log     | 75 +++++++++++++++++++++++++++++++++++
>>>  fwts-test/pptt-0001/test-0001.sh      | 23 +++++++++++
>>>  fwts-test/pptt-0001/test-0002.sh      | 23 +++++++++++
>>>  7 files changed, 264 insertions(+)
>>>  create mode 100644 fwts-test/pptt-0001/acpidump-0001.log
>>>  create mode 100644 fwts-test/pptt-0001/acpidump-0002.log
>>>  create mode 100644 fwts-test/pptt-0001/pptt-0001.log
>>>  create mode 100644 fwts-test/pptt-0001/pptt-0002.log
>>>  create mode 100755 fwts-test/pptt-0001/test-0001.sh
>>>  create mode 100755 fwts-test/pptt-0001/test-0002.sh
>>>
>>> diff --git a/Makefile.am b/Makefile.am
>>> index 2729e39..f16de80 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -130,6 +130,8 @@ TESTS = fwts-test/acpidump-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/pptt-0001/test-0001.sh \
>>> +     fwts-test/pptt-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/pptt-0001/acpidump-0001.log b/fwts-test/pptt-0001/acpidump-0001.log
>>> new file mode 100644
>>> index 0000000..f59ace2
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/acpidump-0001.log
>>> @@ -0,0 +1,37 @@
>>> +FACS @ 0x00000000
>>> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
>>> +  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  . ...........@..
>>> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
>>> +  00f0: 00 00 00 00                                      ....
>>> +
>>> +PPTT @ 0x00000000
>>> +  0000: 50 50 54 54 a6 00 00 00 01 b0 49 4e 54 45 4c 20  PPTT......INTEL
>>> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
>>> +  0020: 29 06 17 20 00 18 00 00 00 00 00 00 00 00 00 00  ).. ............
>>> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 00 00  ................
>>> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  0050: 00 00 00 00 00 1c 00 00 03 00 00 00 00 00 00 00  ................
>>> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  0070: 01 18 00 00 3f 00 00 00 00 00 00 00 00 00 00 00  ....?...........
>>> +  0080: 00 00 00 00 00 00 00 00 02 1e 00 00 00 00 00 00  ................
>>> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  00a0: 00 00 00 00 00 00                                ......
>>> diff --git a/fwts-test/pptt-0001/acpidump-0002.log b/fwts-test/pptt-0001/acpidump-0002.log
>>> new file mode 100644
>>> index 0000000..c069109
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/acpidump-0002.log
>>> @@ -0,0 +1,38 @@
>>> +FACS @ 0x00000000
>>> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
>>> +  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  . ...........@..
>>> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
>>> +  00f0: 00 00 00 00                                      ....
>>> +
>>> +PPTT @ 0x00000000
>>> +  0000: 50 50 54 54 a6 00 00 00 01 2c 49 4e 54 45 4c 20  PPTT.....,INTEL
>>> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
>>> +  0020: 29 06 17 20 00 18 01 00 00 00 00 00 00 00 00 00  ).. ............
>>> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 02 00  ................
>>> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  0050: 00 00 00 00 00 1c 00 00 07 00 00 00 00 00 00 00  ................
>>> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  0070: 01 18 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  0080: 00 00 00 00 c0 00 00 00 02 1e 03 00 00 00 00 00  ................
>>> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>>> +  00a0: 00 00 00 00 00 00                                ......
>>> +
>>> diff --git a/fwts-test/pptt-0001/pptt-0001.log b/fwts-test/pptt-0001/pptt-0001.log
>>> new file mode 100644
>>> index 0000000..c94d31f
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/pptt-0001.log
>>> @@ -0,0 +1,66 @@
>>> +pptt            pptt: PPTT Processor Properties Topology Table test.
>>> +pptt            ----------------------------------------------------------
>>> +pptt            Test 1 of 1: Validate PPTT table.
>>> +pptt            PPTT Processor Properties Topology Table:
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x00
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x00000000
>>> +pptt                Parent:                         0x00000000
>>> +pptt                ACPI Processor ID:              0x00000000
>>> +pptt                Number of Private Resources:    0x00000001
>>> +pptt                Private Resources[0]:           0x00000000
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x01
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x00000000
>>> +pptt                Next Level of Cache:            0x00000000
>>> +pptt                Size:                           0x00000000
>>> +pptt                Number of sets:                 0x00000000
>>> +pptt                Associativity:                  0x00
>>> +pptt                Attributes:                     0x00
>>> +pptt                Line size:                      0x0000
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x00
>>> +pptt                Length:                         0x1c
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x00000003
>>> +pptt                Parent:                         0x00000000
>>> +pptt                ACPI Processor ID:              0x00000000
>>> +pptt                Number of Private Resources:    0x00000002
>>> +pptt                Private Resources[0]:           0x00000000
>>> +pptt                Private Resources[1]:           0x00000000
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x01
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x0000003f
>>> +pptt                Next Level of Cache:            0x00000000
>>> +pptt                Size:                           0x00000000
>>> +pptt                Number of sets:                 0x00000000
>>> +pptt                Associativity:                  0x00
>>> +pptt                Attributes:                     0x00
>>> +pptt                Line size:                      0x0000
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x02
>>> +pptt                Length:                         0x1e
>>> +pptt                Reserved:                       0x0000
>>> +pptt                VENDOR_ID:                      0x00000000
>>> +pptt                LEVEL_1_ID:                     0x0000000000000000
>>> +pptt                LEVEL_2_ID:                     0x0000000000000000
>>> +pptt                MAJOR_REV:                      0x0000
>>> +pptt                MINOR_REV:                      0x0000
>>> +pptt                SPIN_REV:                       0x0000
>>> +pptt
>>> +pptt            PASSED: Test 1, No issues found in PPTT table.
>>> +pptt
>>> +pptt            ==========================================================
>>> +pptt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
>>> +pptt            info only.
>>> +pptt            ==========================================================
>>> diff --git a/fwts-test/pptt-0001/pptt-0002.log b/fwts-test/pptt-0001/pptt-0002.log
>>> new file mode 100644
>>> index 0000000..a8f057f
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/pptt-0002.log
>>> @@ -0,0 +1,75 @@
>>> +pptt            pptt: PPTT Processor Properties Topology Table test.
>>> +pptt            ----------------------------------------------------------
>>> +pptt            Test 1 of 1: Validate PPTT table.
>>> +pptt            PPTT Processor Properties Topology Table:
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x00
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0001
>>> +pptt                Flags:                          0x00000000
>>> +pptt                Parent:                         0x00000000
>>> +pptt                ACPI Processor ID:              0x00000000
>>> +pptt                Number of Private Resources:    0x00000001
>>> +pptt                Private Resources[0]:           0x00000000
>>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>>> +pptt            field must be zero, got 0x0001 instead
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x01
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0002
>>> +pptt                Flags:                          0x00000000
>>> +pptt                Next Level of Cache:            0x00000000
>>> +pptt                Size:                           0x00000000
>>> +pptt                Number of sets:                 0x00000000
>>> +pptt                Associativity:                  0x00
>>> +pptt                Attributes:                     0x00
>>> +pptt                Line size:                      0x0000
>>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>>> +pptt            field must be zero, got 0x0002 instead
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x00
>>> +pptt                Length:                         0x1c
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x00000007
>>> +pptt                Parent:                         0x00000000
>>> +pptt                ACPI Processor ID:              0x00000000
>>> +pptt                Number of Private Resources:    0x00000002
>>> +pptt                Private Resources[0]:           0x00000000
>>> +pptt                Private Resources[1]:           0x00000000
>>> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
>>> +pptt            Bits[31..2] must be zero, got 0x00000007 instead
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x01
>>> +pptt                Length:                         0x18
>>> +pptt                Reserved:                       0x0000
>>> +pptt                Flags:                          0x000000ff
>>> +pptt                Next Level of Cache:            0x00000000
>>> +pptt                Size:                           0x00000000
>>> +pptt                Number of sets:                 0x00000000
>>> +pptt                Associativity:                  0xc0
>>> +pptt                Attributes:                     0x00
>>> +pptt                Line size:                      0x0000
>>> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
>>> +pptt            Bits[31..7] must be zero, got 0x000000ff instead
>>> +pptt
>>> +pptt              PPTT Processor Topology Structure:
>>> +pptt                Type:                           0x02
>>> +pptt                Length:                         0x1e
>>> +pptt                Reserved:                       0x0003
>>> +pptt                VENDOR_ID:                      0x00000000
>>> +pptt                LEVEL_1_ID:                     0x0000000000000000
>>> +pptt                LEVEL_2_ID:                     0x0000000000000000
>>> +pptt                MAJOR_REV:                      0x0000
>>> +pptt                MINOR_REV:                      0x0000
>>> +pptt                SPIN_REV:                       0x0000
>>> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
>>> +pptt            field must be zero, got 0x0003 instead
>>> +pptt
>>> +pptt
>>> +pptt            ==========================================================
>>> +pptt            0 passed, 5 failed, 0 warning, 0 aborted, 0 skipped, 0
>>> +pptt            info only.
>>> +pptt            ==========================================================
>>> diff --git a/fwts-test/pptt-0001/test-0001.sh b/fwts-test/pptt-0001/test-0001.sh
>>> new file mode 100755
>>> index 0000000..481fcb2
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/test-0001.sh
>>> @@ -0,0 +1,23 @@
>>> +#!/bin/bash
>>> +#
>>> +TEST="Test acpitables against PPTT"
>>> +NAME=test-0001.sh
>>> +TMPLOG=$TMP/pptt.log.$$
>>> +
>>> +$FWTS --show-tests | grep pptt > /dev/null
>>> +if [ $? -eq 1 ]; then
>>> +     echo SKIP: $TEST, $NAME
>>> +     exit 77
>>> +fi
>>> +
>>> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0001.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
>>> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-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/pptt-0001/test-0002.sh b/fwts-test/pptt-0001/test-0002.sh
>>> new file mode 100755
>>> index 0000000..6faec92
>>> --- /dev/null
>>> +++ b/fwts-test/pptt-0001/test-0002.sh
>>> @@ -0,0 +1,23 @@
>>> +#!/bin/bash
>>> +#
>>> +TEST="Test acpitables against invalid PPTT"
>>> +NAME=test-0001.sh
>>> +TMPLOG=$TMP/pptt.log.$$
>>> +
>>> +$FWTS --show-tests | grep pptt > /dev/null
>>> +if [ $? -eq 1 ]; then
>>> +     echo SKIP: $TEST, $NAME
>>> +     exit 77
>>> +fi
>>> +
>>> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0002.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
>>> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-0002.log >> $FAILURE_LOG
>>> +ret=$?
>>> +if [ $ret -eq 0 ]; then
>>> +     echo PASSED: $TEST, $NAME
>>> +else
>>> +     echo FAILED: $TEST, $NAME
>>> +fi
>>> +
>>> +rm $TMPLOG
>>> +exit $ret
>>>
>>
>> this does not pass against V3 of the PPTT test.
>>
>> Colin
> 
> Thanks Colin. An updated V2 was available @
> http://patchwork.ozlabs.org/patch/791846/
> 
Ah, OK, well, I guess a V3 is required if a V3 of the fwts PPTT is send
as I did make some comments on V2 which may need some attention.

Colin
Ivan Hu Aug. 24, 2017, 4:22 a.m. UTC | #4
On 08/24/2017 12:11 PM, Alex Hung wrote:
> 
> 
> 
> -------- Forwarded Message --------
> Subject: [PATCH 2/2] fwts-test: Add regression test for PPTT
> Date: Thu, 20 Jul 2017 12:14:47 -0700
> From: Alex Hung <alex.hung@canonical.com>
> To: fwts-devel@lists.ubuntu.com
> CC: Alex Hung <alex.hung@canonical.com>
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   Makefile.am                           |  2 +
>   fwts-test/pptt-0001/acpidump-0001.log | 37 +++++++++++++++++
>   fwts-test/pptt-0001/acpidump-0002.log | 38 ++++++++++++++++++
>   fwts-test/pptt-0001/pptt-0001.log     | 66 ++++++++++++++++++++++++++++++
>   fwts-test/pptt-0001/pptt-0002.log     | 75 
> +++++++++++++++++++++++++++++++++++
>   fwts-test/pptt-0001/test-0001.sh      | 23 +++++++++++
>   fwts-test/pptt-0001/test-0002.sh      | 23 +++++++++++
>   7 files changed, 264 insertions(+)
>   create mode 100644 fwts-test/pptt-0001/acpidump-0001.log
>   create mode 100644 fwts-test/pptt-0001/acpidump-0002.log
>   create mode 100644 fwts-test/pptt-0001/pptt-0001.log
>   create mode 100644 fwts-test/pptt-0001/pptt-0002.log
>   create mode 100755 fwts-test/pptt-0001/test-0001.sh
>   create mode 100755 fwts-test/pptt-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index 2729e39..f16de80 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -130,6 +130,8 @@ TESTS = fwts-test/acpidump-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/pptt-0001/test-0001.sh \
> +    fwts-test/pptt-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/pptt-0001/acpidump-0001.log 
> b/fwts-test/pptt-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..f59ace2
> --- /dev/null
> +++ b/fwts-test/pptt-0001/acpidump-0001.log
> @@ -0,0 +1,37 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +PPTT @ 0x00000000
> +  0000: 50 50 54 54 a6 00 00 00 01 b0 49 4e 54 45 4c 20 PPTT......INTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 29 06 17 20 00 18 00 00 00 00 00 00 00 00 00 00  ).. ............
> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 00 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0050: 00 00 00 00 00 1c 00 00 03 00 00 00 00 00 00 00  ................
> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0070: 01 18 00 00 3f 00 00 00 00 00 00 00 00 00 00 00  ....?...........
> +  0080: 00 00 00 00 00 00 00 00 02 1e 00 00 00 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00a0: 00 00 00 00 00 00                                ......
> diff --git a/fwts-test/pptt-0001/acpidump-0002.log 
> b/fwts-test/pptt-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..c069109
> --- /dev/null
> +++ b/fwts-test/pptt-0001/acpidump-0002.log
> @@ -0,0 +1,38 @@
> +FACS @ 0x00000000
> +  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
> +  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  . ...........@..
> +  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
> +  00f0: 00 00 00 00                                      ....
> +
> +PPTT @ 0x00000000
> +  0000: 50 50 54 54 a6 00 00 00 01 2c 49 4e 54 45 4c 20 PPTT.....,INTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 29 06 17 20 00 18 01 00 00 00 00 00 00 00 00 00  ).. ............
> +  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 02 00  ................
> +  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0050: 00 00 00 00 00 1c 00 00 07 00 00 00 00 00 00 00  ................
> +  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0070: 01 18 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
> +  0080: 00 00 00 00 c0 00 00 00 02 1e 03 00 00 00 00 00  ................
> +  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> +  00a0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/pptt-0001/pptt-0001.log 
> b/fwts-test/pptt-0001/pptt-0001.log
> new file mode 100644
> index 0000000..c94d31f
> --- /dev/null
> +++ b/fwts-test/pptt-0001/pptt-0001.log
> @@ -0,0 +1,66 @@
> +pptt            pptt: PPTT Processor Properties Topology Table test.
> +pptt            ----------------------------------------------------------
> +pptt            Test 1 of 1: Validate PPTT table.
> +pptt            PPTT Processor Properties Topology Table:
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000000
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000001
> +pptt                Private Resources[0]:           0x00000000
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000000
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x1c
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000003
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000002
> +pptt                Private Resources[0]:           0x00000000
> +pptt                Private Resources[1]:           0x00000000
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x0000003f
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x02
> +pptt                Length:                         0x1e
> +pptt                Reserved:                       0x0000
> +pptt                VENDOR_ID:                      0x00000000
> +pptt                LEVEL_1_ID:                     0x0000000000000000
> +pptt                LEVEL_2_ID:                     0x0000000000000000
> +pptt                MAJOR_REV:                      0x0000
> +pptt                MINOR_REV:                      0x0000
> +pptt                SPIN_REV:                       0x0000
> +pptt            +pptt            PASSED: Test 1, No issues found in 
> PPTT table.
> +pptt            +pptt 
> ==========================================================
> +pptt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +pptt            info only.
> +pptt            ==========================================================
> diff --git a/fwts-test/pptt-0001/pptt-0002.log 
> b/fwts-test/pptt-0001/pptt-0002.log
> new file mode 100644
> index 0000000..a8f057f
> --- /dev/null
> +++ b/fwts-test/pptt-0001/pptt-0002.log
> @@ -0,0 +1,75 @@
> +pptt            pptt: PPTT Processor Properties Topology Table test.
> +pptt            ----------------------------------------------------------
> +pptt            Test 1 of 1: Validate PPTT table.
> +pptt            PPTT Processor Properties Topology Table:
> +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0001
> +pptt                Flags:                          0x00000000
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000001
> +pptt                Private Resources[0]:           0x00000000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0001 instead
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0002
> +pptt                Flags:                          0x00000000
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0x00
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0002 instead
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x00
> +pptt                Length:                         0x1c
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x00000007
> +pptt                Parent:                         0x00000000
> +pptt                ACPI Processor ID:              0x00000000
> +pptt                Number of Private Resources:    0x00000002
> +pptt                Private Resources[0]:           0x00000000
> +pptt                Private Resources[1]:           0x00000000
> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
> +pptt            Bits[31..2] must be zero, got 0x00000007 instead
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x01
> +pptt                Length:                         0x18
> +pptt                Reserved:                       0x0000
> +pptt                Flags:                          0x000000ff
> +pptt                Next Level of Cache:            0x00000000
> +pptt                Size:                           0x00000000
> +pptt                Number of sets:                 0x00000000
> +pptt                Associativity:                  0xc0
> +pptt                Attributes:                     0x00
> +pptt                Line size:                      0x0000
> +pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
> +pptt            Bits[31..7] must be zero, got 0x000000ff instead
> +pptt            +pptt              PPTT Processor Topology Structure:
> +pptt                Type:                           0x02
> +pptt                Length:                         0x1e
> +pptt                Reserved:                       0x0003
> +pptt                VENDOR_ID:                      0x00000000
> +pptt                LEVEL_1_ID:                     0x0000000000000000
> +pptt                LEVEL_2_ID:                     0x0000000000000000
> +pptt                MAJOR_REV:                      0x0000
> +pptt                MINOR_REV:                      0x0000
> +pptt                SPIN_REV:                       0x0000
> +pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
> +pptt            field must be zero, got 0x0003 instead
> +pptt            +pptt            +pptt 
> ==========================================================
> +pptt            0 passed, 5 failed, 0 warning, 0 aborted, 0 skipped, 0
> +pptt            info only.
> +pptt            ==========================================================
> diff --git a/fwts-test/pptt-0001/test-0001.sh 
> b/fwts-test/pptt-0001/test-0001.sh
> new file mode 100755
> index 0000000..481fcb2
> --- /dev/null
> +++ b/fwts-test/pptt-0001/test-0001.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test acpitables against PPTT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/pptt.log.$$
> +
> +$FWTS --show-tests | grep pptt > /dev/null
> +if [ $? -eq 1 ]; then
> +    echo SKIP: $TEST, $NAME
> +    exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 
> --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0001.log pptt - | cut -c7- | 
> grep "^pptt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-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/pptt-0001/test-0002.sh 
> b/fwts-test/pptt-0001/test-0002.sh
> new file mode 100755
> index 0000000..6faec92
> --- /dev/null
> +++ b/fwts-test/pptt-0001/test-0002.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test acpitables against invalid PPTT"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/pptt.log.$$
> +
> +$FWTS --show-tests | grep pptt > /dev/null
> +if [ $? -eq 1 ]; then
> +    echo SKIP: $TEST, $NAME
> +    exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 
> --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0002.log pptt - | cut -c7- | 
> grep "^pptt" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-0002.log >> $FAILURE_LOG
> +ret=$?
> +if [ $ret -eq 0 ]; then
> +    echo PASSED: $TEST, $NAME
> +else
> +    echo FAILED: $TEST, $NAME
> +fi
> +
> +rm $TMPLOG
> +exit $ret

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index 2729e39..f16de80 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -130,6 +130,8 @@  TESTS = fwts-test/acpidump-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/pptt-0001/test-0001.sh \
+	fwts-test/pptt-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/pptt-0001/acpidump-0001.log b/fwts-test/pptt-0001/acpidump-0001.log
new file mode 100644
index 0000000..f59ace2
--- /dev/null
+++ b/fwts-test/pptt-0001/acpidump-0001.log
@@ -0,0 +1,37 @@ 
+FACS @ 0x00000000
+  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+PPTT @ 0x00000000
+  0000: 50 50 54 54 a6 00 00 00 01 b0 49 4e 54 45 4c 20  PPTT......INTEL 
+  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
+  0020: 29 06 17 20 00 18 00 00 00 00 00 00 00 00 00 00  ).. ............
+  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 00 00  ................
+  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+  0050: 00 00 00 00 00 1c 00 00 03 00 00 00 00 00 00 00  ................
+  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
+  0070: 01 18 00 00 3f 00 00 00 00 00 00 00 00 00 00 00  ....?...........
+  0080: 00 00 00 00 00 00 00 00 02 1e 00 00 00 00 00 00  ................
+  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+  00a0: 00 00 00 00 00 00                                ......
diff --git a/fwts-test/pptt-0001/acpidump-0002.log b/fwts-test/pptt-0001/acpidump-0002.log
new file mode 100644
index 0000000..c069109
--- /dev/null
+++ b/fwts-test/pptt-0001/acpidump-0002.log
@@ -0,0 +1,38 @@ 
+FACS @ 0x00000000
+  0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00  FACS@...........
+  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  . ...........@..
+  00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ...............
+  00f0: 00 00 00 00                                      ....
+
+PPTT @ 0x00000000
+  0000: 50 50 54 54 a6 00 00 00 01 2c 49 4e 54 45 4c 20  PPTT.....,INTEL 
+  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
+  0020: 29 06 17 20 00 18 01 00 00 00 00 00 00 00 00 00  ).. ............
+  0030: 00 00 00 00 01 00 00 00 00 00 00 00 01 18 02 00  ................
+  0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+  0050: 00 00 00 00 00 1c 00 00 07 00 00 00 00 00 00 00  ................
+  0060: 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
+  0070: 01 18 00 00 ff 00 00 00 00 00 00 00 00 00 00 00  ................
+  0080: 00 00 00 00 c0 00 00 00 02 1e 03 00 00 00 00 00  ................
+  0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+  00a0: 00 00 00 00 00 00                                ......
+
diff --git a/fwts-test/pptt-0001/pptt-0001.log b/fwts-test/pptt-0001/pptt-0001.log
new file mode 100644
index 0000000..c94d31f
--- /dev/null
+++ b/fwts-test/pptt-0001/pptt-0001.log
@@ -0,0 +1,66 @@ 
+pptt            pptt: PPTT Processor Properties Topology Table test.
+pptt            ----------------------------------------------------------
+pptt            Test 1 of 1: Validate PPTT table.
+pptt            PPTT Processor Properties Topology Table:
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x00
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x00000000
+pptt                Parent:                         0x00000000
+pptt                ACPI Processor ID:              0x00000000
+pptt                Number of Private Resources:    0x00000001
+pptt                Private Resources[0]:           0x00000000
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x01
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x00000000
+pptt                Next Level of Cache:            0x00000000
+pptt                Size:                           0x00000000
+pptt                Number of sets:                 0x00000000
+pptt                Associativity:                  0x00
+pptt                Attributes:                     0x00
+pptt                Line size:                      0x0000
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x00
+pptt                Length:                         0x1c
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x00000003
+pptt                Parent:                         0x00000000
+pptt                ACPI Processor ID:              0x00000000
+pptt                Number of Private Resources:    0x00000002
+pptt                Private Resources[0]:           0x00000000
+pptt                Private Resources[1]:           0x00000000
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x01
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x0000003f
+pptt                Next Level of Cache:            0x00000000
+pptt                Size:                           0x00000000
+pptt                Number of sets:                 0x00000000
+pptt                Associativity:                  0x00
+pptt                Attributes:                     0x00
+pptt                Line size:                      0x0000
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x02
+pptt                Length:                         0x1e
+pptt                Reserved:                       0x0000
+pptt                VENDOR_ID:                      0x00000000
+pptt                LEVEL_1_ID:                     0x0000000000000000
+pptt                LEVEL_2_ID:                     0x0000000000000000
+pptt                MAJOR_REV:                      0x0000
+pptt                MINOR_REV:                      0x0000
+pptt                SPIN_REV:                       0x0000
+pptt            
+pptt            PASSED: Test 1, No issues found in PPTT table.
+pptt            
+pptt            ==========================================================
+pptt            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+pptt            info only.
+pptt            ==========================================================
diff --git a/fwts-test/pptt-0001/pptt-0002.log b/fwts-test/pptt-0001/pptt-0002.log
new file mode 100644
index 0000000..a8f057f
--- /dev/null
+++ b/fwts-test/pptt-0001/pptt-0002.log
@@ -0,0 +1,75 @@ 
+pptt            pptt: PPTT Processor Properties Topology Table test.
+pptt            ----------------------------------------------------------
+pptt            Test 1 of 1: Validate PPTT table.
+pptt            PPTT Processor Properties Topology Table:
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x00
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0001
+pptt                Flags:                          0x00000000
+pptt                Parent:                         0x00000000
+pptt                ACPI Processor ID:              0x00000000
+pptt                Number of Private Resources:    0x00000001
+pptt                Private Resources[0]:           0x00000000
+pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
+pptt            field must be zero, got 0x0001 instead
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x01
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0002
+pptt                Flags:                          0x00000000
+pptt                Next Level of Cache:            0x00000000
+pptt                Size:                           0x00000000
+pptt                Number of sets:                 0x00000000
+pptt                Associativity:                  0x00
+pptt                Attributes:                     0x00
+pptt                Line size:                      0x0000
+pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
+pptt            field must be zero, got 0x0002 instead
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x00
+pptt                Length:                         0x1c
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x00000007
+pptt                Parent:                         0x00000000
+pptt                ACPI Processor ID:              0x00000000
+pptt                Number of Private Resources:    0x00000002
+pptt                Private Resources[0]:           0x00000000
+pptt                Private Resources[1]:           0x00000000
+pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
+pptt            Bits[31..2] must be zero, got 0x00000007 instead
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x01
+pptt                Length:                         0x18
+pptt                Reserved:                       0x0000
+pptt                Flags:                          0x000000ff
+pptt                Next Level of Cache:            0x00000000
+pptt                Size:                           0x00000000
+pptt                Number of sets:                 0x00000000
+pptt                Associativity:                  0xc0
+pptt                Attributes:                     0x00
+pptt                Line size:                      0x0000
+pptt            FAILED [HIGH] PPTTBadFlags: Test 1, PPTT Flags's
+pptt            Bits[31..7] must be zero, got 0x000000ff instead
+pptt            
+pptt              PPTT Processor Topology Structure:
+pptt                Type:                           0x02
+pptt                Length:                         0x1e
+pptt                Reserved:                       0x0003
+pptt                VENDOR_ID:                      0x00000000
+pptt                LEVEL_1_ID:                     0x0000000000000000
+pptt                LEVEL_2_ID:                     0x0000000000000000
+pptt                MAJOR_REV:                      0x0000
+pptt                MINOR_REV:                      0x0000
+pptt                SPIN_REV:                       0x0000
+pptt            FAILED [LOW] PPTTReservedNonZero: Test 1, PPTT reserved
+pptt            field must be zero, got 0x0003 instead
+pptt            
+pptt            
+pptt            ==========================================================
+pptt            0 passed, 5 failed, 0 warning, 0 aborted, 0 skipped, 0
+pptt            info only.
+pptt            ==========================================================
diff --git a/fwts-test/pptt-0001/test-0001.sh b/fwts-test/pptt-0001/test-0001.sh
new file mode 100755
index 0000000..481fcb2
--- /dev/null
+++ b/fwts-test/pptt-0001/test-0001.sh
@@ -0,0 +1,23 @@ 
+#!/bin/bash
+#
+TEST="Test acpitables against PPTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pptt.log.$$
+
+$FWTS --show-tests | grep pptt > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0001.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-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/pptt-0001/test-0002.sh b/fwts-test/pptt-0001/test-0002.sh
new file mode 100755
index 0000000..6faec92
--- /dev/null
+++ b/fwts-test/pptt-0001/test-0002.sh
@@ -0,0 +1,23 @@ 
+#!/bin/bash
+#
+TEST="Test acpitables against invalid PPTT"
+NAME=test-0001.sh
+TMPLOG=$TMP/pptt.log.$$
+
+$FWTS --show-tests | grep pptt > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/pptt-0001/acpidump-0002.log pptt - | cut -c7- | grep "^pptt" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/pptt-0001/pptt-0002.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+	echo PASSED: $TEST, $NAME
+else
+	echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret