diff mbox

[3/3,V3] fwts-test: Add regression test for MPST

Message ID 1470212033-6185-3-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung Aug. 3, 2016, 8:13 a.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
---
 Makefile.am                           |  2 +
 fwts-test/mpst-0001/acpidump-0001.log | 39 ++++++++++++++++
 fwts-test/mpst-0001/acpidump-0002.log | 39 ++++++++++++++++
 fwts-test/mpst-0001/mpst-0001.log     | 61 ++++++++++++++++++++++++
 fwts-test/mpst-0001/mpst-0002.log     | 88 +++++++++++++++++++++++++++++++++++
 fwts-test/mpst-0001/test-0001.sh      | 23 +++++++++
 fwts-test/mpst-0001/test-0002.sh      | 23 +++++++++
 7 files changed, 275 insertions(+)
 create mode 100644 fwts-test/mpst-0001/acpidump-0001.log
 create mode 100644 fwts-test/mpst-0001/acpidump-0002.log
 create mode 100644 fwts-test/mpst-0001/mpst-0001.log
 create mode 100644 fwts-test/mpst-0001/mpst-0002.log
 create mode 100755 fwts-test/mpst-0001/test-0001.sh
 create mode 100755 fwts-test/mpst-0001/test-0002.sh

Comments

Ivan Hu Aug. 8, 2016, 3:29 a.m. UTC | #1
On 2016年08月03日 16:13, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> Acked-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  Makefile.am                           |  2 +
>  fwts-test/mpst-0001/acpidump-0001.log | 39 ++++++++++++++++
>  fwts-test/mpst-0001/acpidump-0002.log | 39 ++++++++++++++++
>  fwts-test/mpst-0001/mpst-0001.log     | 61 ++++++++++++++++++++++++
>  fwts-test/mpst-0001/mpst-0002.log     | 88 +++++++++++++++++++++++++++++++++++
>  fwts-test/mpst-0001/test-0001.sh      | 23 +++++++++
>  fwts-test/mpst-0001/test-0002.sh      | 23 +++++++++
>  7 files changed, 275 insertions(+)
>  create mode 100644 fwts-test/mpst-0001/acpidump-0001.log
>  create mode 100644 fwts-test/mpst-0001/acpidump-0002.log
>  create mode 100644 fwts-test/mpst-0001/mpst-0001.log
>  create mode 100644 fwts-test/mpst-0001/mpst-0002.log
>  create mode 100755 fwts-test/mpst-0001/test-0001.sh
>  create mode 100755 fwts-test/mpst-0001/test-0002.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index abff598..7ee3e31 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -94,6 +94,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/madt-0001/test-0002.sh \
>  	fwts-test/mchi-0001/test-0001.sh \
>  	fwts-test/mchi-0001/test-0002.sh \
> +	fwts-test/mpst-0001/test-0001.sh \
> +	fwts-test/mpst-0001/test-0002.sh \
>  	fwts-test/msdm-0001/test-0001.sh \
>  	fwts-test/msdm-0001/test-0002.sh \
>  	fwts-test/method-0001/test-0001.sh \
> diff --git a/fwts-test/mpst-0001/acpidump-0001.log b/fwts-test/mpst-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..3a6b3dd
> --- /dev/null
> +++ b/fwts-test/mpst-0001/acpidump-0001.log
> @@ -0,0 +1,39 @@
> +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                                      ....
> +
> +MPST @ 0x00000000
> +  0000: 4d 50 53 54 b6 00 00 00 01 4a 49 4e 54 45 4c 20  MPST.....JINTEL
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 27 05 16 20 00 00 00 00 02 00 00 00 00 00 01 00  '.. ............
> +  0030: 2a 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
> +  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
> +  0050: 00 00 01 00 02 00 00 00 02 00 24 00 00 00 00 00  ..........$.....
> +  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
> +  0070: 00 00 01 00 00 00 05 06 03 00 02 00 00 00 41 00  ..............A.
> +  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
> +  0090: 34 12 00 00 00 00 00 00 00 00 41 00 00 00 00 30  4.........A....0
> +  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 00 00  ...@...2Tv......
> +  00b0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/mpst-0001/acpidump-0002.log b/fwts-test/mpst-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..04d1898
> --- /dev/null
> +++ b/fwts-test/mpst-0001/acpidump-0002.log
> @@ -0,0 +1,39 @@
> +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                                      ....
> +
> +MPST @ 0x00000000
> +  0000: 4d 50 53 54 b6 00 00 00 01 c5 49 4e 54 45 4c 20  MPST......INTEL
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 27 05 16 20 00 00 00 01 02 00 03 00 00 04 01 00  '.. ............
> +  0030: 2a 01 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
> +  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
> +  0050: 00 00 01 00 02 00 00 05 02 00 24 01 00 00 00 00  ..........$.....
> +  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
> +  0070: 00 00 01 00 00 00 05 06 03 00 02 00 06 00 02 00  ................
> +  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
> +  0090: 34 12 07 00 00 00 00 00 00 00 03 00 00 00 00 30  4..............0
> +  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 08 00  ...@...2Tv......
> +  00b0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/mpst-0001/mpst-0001.log b/fwts-test/mpst-0001/mpst-0001.log
> new file mode 100644
> index 0000000..9ebd0d8
> --- /dev/null
> +++ b/fwts-test/mpst-0001/mpst-0001.log
> @@ -0,0 +1,61 @@
> +mpst            mpst: MPST Memory Power State Table test.
> +mpst            ----------------------------------------------------------
> +mpst            Test 1 of 1: Validate MPST table.
> +mpst            MPST Table:
> +mpst              Communication Channel ID:        0x00
> +mpst              Reserved:                        0x00000000
> +mpst              Memory Power Node Count:         0x0002
> +mpst              Reserved:                        0x0000
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x00
> +mpst                Memory Power Node Id:          0x0001
> +mpst                Power Node Length:             0x0000002a
> +mpst                Base Address:                  0x00000000f0000000
> +mpst                Memory Length:                 0x00000000e0000000
> +mpst                Number of Power States:        0x00000002
> +mpst                Number of Physical Components: 0x00000003
> +mpst                Power State Value:             0x01
> +mpst                Power State Information Index: 0x02
> +mpst                Power State Value:             0x03
> +mpst                Power State Information Index: 0x04
> +mpst                Physical Component Id:         0x00
> +mpst                Physical Component Id:         0x01
> +mpst                Physical Component Id:         0x02
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x00
> +mpst                Memory Power Node Id:          0x0002
> +mpst                Power Node Length:             0x00000024
> +mpst                Base Address:                  0x00000000a0000000
> +mpst                Memory Length:                 0x00000000b0000000
> +mpst                Number of Power States:        0x00000001
> +mpst                Number of Physical Components: 0x00000001
> +mpst                Power State Value:             0x05
> +mpst                Power State Information Index: 0x06
> +mpst                Physical Component Id:         0x03
> +mpst              Memory Characteristics Count:    0x0002
> +mpst              Reserved:                        0x0000
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x41
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00001000
> +mpst                Relative Power Saving:         0x00002000
> +mpst                Exit Latency:                  0x123456789abcdef0
> +mpst                Reserved:                      0x0000000000000000
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x41
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00003000
> +mpst                Relative Power Saving:         0x00004000
> +mpst                Exit Latency:                  0xfedcba9876543210
> +mpst                Reserved:                      0x0000000000000000
> +mpst
> +mpst            PASSED: Test 1, No issues found in MPST table.
> +mpst
> +mpst            ==========================================================
> +mpst            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +mpst            info only.
> +mpst            ==========================================================
> diff --git a/fwts-test/mpst-0001/mpst-0002.log b/fwts-test/mpst-0001/mpst-0002.log
> new file mode 100644
> index 0000000..adda211
> --- /dev/null
> +++ b/fwts-test/mpst-0001/mpst-0002.log
> @@ -0,0 +1,88 @@
> +mpst            mpst: MPST Memory Power State Table test.
> +mpst            ----------------------------------------------------------
> +mpst            Test 1 of 1: Validate MPST table.
> +mpst            MPST Table:
> +mpst              Communication Channel ID:        0x00
> +mpst              Reserved:                        0x00010000
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x00010000 instead
> +mpst              Memory Power Node Count:         0x0002
> +mpst              Reserved:                        0x0003
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0003 instead
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x04
> +mpst                Memory Power Node Id:          0x0001
> +mpst                Power Node Length:             0x0000012a
> +mpst                Base Address:                  0x00000000f0000000
> +mpst                Memory Length:                 0x00000000e0000000
> +mpst                Number of Power States:        0x00000002
> +mpst                Number of Physical Components: 0x00000003
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x04 instead
> +mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
> +mpst            Node Length should be 0x0000002a, got 0x0000012a instead
> +mpst                Power State Value:             0x01
> +mpst                Power State Information Index: 0x02
> +mpst                Power State Value:             0x03
> +mpst                Power State Information Index: 0x04
> +mpst                Physical Component Id:         0x00
> +mpst                Physical Component Id:         0x01
> +mpst                Physical Component Id:         0x02
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x05
> +mpst                Memory Power Node Id:          0x0002
> +mpst                Power Node Length:             0x00000124
> +mpst                Base Address:                  0x00000000a0000000
> +mpst                Memory Length:                 0x00000000b0000000
> +mpst                Number of Power States:        0x00000001
> +mpst                Number of Physical Components: 0x00000001
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x05 instead
> +mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
> +mpst            Node Length should be 0x00000024, got 0x00000124 instead
> +mpst                Power State Value:             0x05
> +mpst                Power State Information Index: 0x06
> +mpst                Physical Component Id:         0x03
> +mpst              Memory Characteristics Count:    0x0002
> +mpst              Reserved:                        0x0006
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0006 instead
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x02
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00001000
> +mpst                Relative Power Saving:         0x00002000
> +mpst                Exit Latency:                  0x123456789abcdef0
> +mpst                Reserved:                      0x0000000000000007
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
> +mpst            Power Characteristics ID must be 1, got 0x02 instead
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
> +mpst            MPST Power Characteristics Revision must be 1, got 0x00
> +mpst            instead
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0000000000000007 instead
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x03
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00003000
> +mpst                Relative Power Saving:         0x00004000
> +mpst                Exit Latency:                  0xfedcba9876543210
> +mpst                Reserved:                      0x0000000000000008
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
> +mpst            Power Characteristics ID must be 1, got 0x03 instead
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
> +mpst            MPST Power Characteristics Revision must be 1, got 0x00
> +mpst            instead
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0000000000000008 instead
> +mpst
> +mpst
> +mpst            ==========================================================
> +mpst            0 passed, 13 failed, 0 warning, 0 aborted, 0 skipped, 0
> +mpst            info only.
> +mpst            ==========================================================
> diff --git a/fwts-test/mpst-0001/test-0001.sh b/fwts-test/mpst-0001/test-0001.sh
> new file mode 100755
> index 0000000..cb89942
> --- /dev/null
> +++ b/fwts-test/mpst-0001/test-0001.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against MPST"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/mpst.log.$$
> +
> +$FWTS --show-tests | grep MPST > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0001.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-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/mpst-0001/test-0002.sh b/fwts-test/mpst-0001/test-0002.sh
> new file mode 100755
> index 0000000..0110154
> --- /dev/null
> +++ b/fwts-test/mpst-0001/test-0002.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid MPST"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/mpst.log.$$
> +
> +$FWTS --show-tests | grep MPST > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0002.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-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>
Colin Ian King Aug. 15, 2016, 9:07 a.m. UTC | #2
On 03/08/16 09:13, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> Acked-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  Makefile.am                           |  2 +
>  fwts-test/mpst-0001/acpidump-0001.log | 39 ++++++++++++++++
>  fwts-test/mpst-0001/acpidump-0002.log | 39 ++++++++++++++++
>  fwts-test/mpst-0001/mpst-0001.log     | 61 ++++++++++++++++++++++++
>  fwts-test/mpst-0001/mpst-0002.log     | 88 +++++++++++++++++++++++++++++++++++
>  fwts-test/mpst-0001/test-0001.sh      | 23 +++++++++
>  fwts-test/mpst-0001/test-0002.sh      | 23 +++++++++
>  7 files changed, 275 insertions(+)
>  create mode 100644 fwts-test/mpst-0001/acpidump-0001.log
>  create mode 100644 fwts-test/mpst-0001/acpidump-0002.log
>  create mode 100644 fwts-test/mpst-0001/mpst-0001.log
>  create mode 100644 fwts-test/mpst-0001/mpst-0002.log
>  create mode 100755 fwts-test/mpst-0001/test-0001.sh
>  create mode 100755 fwts-test/mpst-0001/test-0002.sh
> 
> diff --git a/Makefile.am b/Makefile.am
> index abff598..7ee3e31 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -94,6 +94,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \
>  	fwts-test/madt-0001/test-0002.sh \
>  	fwts-test/mchi-0001/test-0001.sh \
>  	fwts-test/mchi-0001/test-0002.sh \
> +	fwts-test/mpst-0001/test-0001.sh \
> +	fwts-test/mpst-0001/test-0002.sh \
>  	fwts-test/msdm-0001/test-0001.sh \
>  	fwts-test/msdm-0001/test-0002.sh \
>  	fwts-test/method-0001/test-0001.sh \
> diff --git a/fwts-test/mpst-0001/acpidump-0001.log b/fwts-test/mpst-0001/acpidump-0001.log
> new file mode 100644
> index 0000000..3a6b3dd
> --- /dev/null
> +++ b/fwts-test/mpst-0001/acpidump-0001.log
> @@ -0,0 +1,39 @@
> +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                                      ....
> +
> +MPST @ 0x00000000                                               
> +  0000: 4d 50 53 54 b6 00 00 00 01 4a 49 4e 54 45 4c 20  MPST.....JINTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 27 05 16 20 00 00 00 00 02 00 00 00 00 00 01 00  '.. ............
> +  0030: 2a 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
> +  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
> +  0050: 00 00 01 00 02 00 00 00 02 00 24 00 00 00 00 00  ..........$.....
> +  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
> +  0070: 00 00 01 00 00 00 05 06 03 00 02 00 00 00 41 00  ..............A.
> +  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
> +  0090: 34 12 00 00 00 00 00 00 00 00 41 00 00 00 00 30  4.........A....0
> +  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 00 00  ...@...2Tv......
> +  00b0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/mpst-0001/acpidump-0002.log b/fwts-test/mpst-0001/acpidump-0002.log
> new file mode 100644
> index 0000000..04d1898
> --- /dev/null
> +++ b/fwts-test/mpst-0001/acpidump-0002.log
> @@ -0,0 +1,39 @@
> +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                                      ....
> +
> +MPST @ 0x00000000
> +  0000: 4d 50 53 54 b6 00 00 00 01 c5 49 4e 54 45 4c 20  MPST......INTEL 
> +  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
> +  0020: 27 05 16 20 00 00 00 01 02 00 03 00 00 04 01 00  '.. ............
> +  0030: 2a 01 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
> +  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
> +  0050: 00 00 01 00 02 00 00 05 02 00 24 01 00 00 00 00  ..........$.....
> +  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
> +  0070: 00 00 01 00 00 00 05 06 03 00 02 00 06 00 02 00  ................
> +  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
> +  0090: 34 12 07 00 00 00 00 00 00 00 03 00 00 00 00 30  4..............0
> +  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 08 00  ...@...2Tv......
> +  00b0: 00 00 00 00 00 00                                ......
> +
> diff --git a/fwts-test/mpst-0001/mpst-0001.log b/fwts-test/mpst-0001/mpst-0001.log
> new file mode 100644
> index 0000000..9ebd0d8
> --- /dev/null
> +++ b/fwts-test/mpst-0001/mpst-0001.log
> @@ -0,0 +1,61 @@
> +mpst            mpst: MPST Memory Power State Table test.
> +mpst            ----------------------------------------------------------
> +mpst            Test 1 of 1: Validate MPST table.
> +mpst            MPST Table:
> +mpst              Communication Channel ID:        0x00
> +mpst              Reserved:                        0x00000000
> +mpst              Memory Power Node Count:         0x0002
> +mpst              Reserved:                        0x0000
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x00
> +mpst                Memory Power Node Id:          0x0001
> +mpst                Power Node Length:             0x0000002a
> +mpst                Base Address:                  0x00000000f0000000
> +mpst                Memory Length:                 0x00000000e0000000
> +mpst                Number of Power States:        0x00000002
> +mpst                Number of Physical Components: 0x00000003
> +mpst                Power State Value:             0x01
> +mpst                Power State Information Index: 0x02
> +mpst                Power State Value:             0x03
> +mpst                Power State Information Index: 0x04
> +mpst                Physical Component Id:         0x00
> +mpst                Physical Component Id:         0x01
> +mpst                Physical Component Id:         0x02
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x00
> +mpst                Memory Power Node Id:          0x0002
> +mpst                Power Node Length:             0x00000024
> +mpst                Base Address:                  0x00000000a0000000
> +mpst                Memory Length:                 0x00000000b0000000
> +mpst                Number of Power States:        0x00000001
> +mpst                Number of Physical Components: 0x00000001
> +mpst                Power State Value:             0x05
> +mpst                Power State Information Index: 0x06
> +mpst                Physical Component Id:         0x03
> +mpst              Memory Characteristics Count:    0x0002
> +mpst              Reserved:                        0x0000
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x41
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00001000
> +mpst                Relative Power Saving:         0x00002000
> +mpst                Exit Latency:                  0x123456789abcdef0
> +mpst                Reserved:                      0x0000000000000000
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x41
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00003000
> +mpst                Relative Power Saving:         0x00004000
> +mpst                Exit Latency:                  0xfedcba9876543210
> +mpst                Reserved:                      0x0000000000000000
> +mpst            
> +mpst            PASSED: Test 1, No issues found in MPST table.
> +mpst            
> +mpst            ==========================================================
> +mpst            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
> +mpst            info only.
> +mpst            ==========================================================
> diff --git a/fwts-test/mpst-0001/mpst-0002.log b/fwts-test/mpst-0001/mpst-0002.log
> new file mode 100644
> index 0000000..adda211
> --- /dev/null
> +++ b/fwts-test/mpst-0001/mpst-0002.log
> @@ -0,0 +1,88 @@
> +mpst            mpst: MPST Memory Power State Table test.
> +mpst            ----------------------------------------------------------
> +mpst            Test 1 of 1: Validate MPST table.
> +mpst            MPST Table:
> +mpst              Communication Channel ID:        0x00
> +mpst              Reserved:                        0x00010000
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x00010000 instead
> +mpst              Memory Power Node Count:         0x0002
> +mpst              Reserved:                        0x0003
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0003 instead
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x04
> +mpst                Memory Power Node Id:          0x0001
> +mpst                Power Node Length:             0x0000012a
> +mpst                Base Address:                  0x00000000f0000000
> +mpst                Memory Length:                 0x00000000e0000000
> +mpst                Number of Power States:        0x00000002
> +mpst                Number of Physical Components: 0x00000003
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x04 instead
> +mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
> +mpst            Node Length should be 0x0000002a, got 0x0000012a instead
> +mpst                Power State Value:             0x01
> +mpst                Power State Information Index: 0x02
> +mpst                Power State Value:             0x03
> +mpst                Power State Information Index: 0x04
> +mpst                Physical Component Id:         0x00
> +mpst                Physical Component Id:         0x01
> +mpst                Physical Component Id:         0x02
> +mpst              MPST Power Node:
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x05
> +mpst                Memory Power Node Id:          0x0002
> +mpst                Power Node Length:             0x00000124
> +mpst                Base Address:                  0x00000000a0000000
> +mpst                Memory Length:                 0x00000000b0000000
> +mpst                Number of Power States:        0x00000001
> +mpst                Number of Physical Components: 0x00000001
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x05 instead
> +mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
> +mpst            Node Length should be 0x00000024, got 0x00000124 instead
> +mpst                Power State Value:             0x05
> +mpst                Power State Information Index: 0x06
> +mpst                Physical Component Id:         0x03
> +mpst              Memory Characteristics Count:    0x0002
> +mpst              Reserved:                        0x0006
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0006 instead
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x02
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00001000
> +mpst                Relative Power Saving:         0x00002000
> +mpst                Exit Latency:                  0x123456789abcdef0
> +mpst                Reserved:                      0x0000000000000007
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
> +mpst            Power Characteristics ID must be 1, got 0x02 instead
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
> +mpst            MPST Power Characteristics Revision must be 1, got 0x00
> +mpst            instead
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0000000000000007 instead
> +mpst              MPST Power Characteristics:
> +mpst                Power State Structure ID:      0x03
> +mpst                Flags:                         0x00
> +mpst                Reserved:                      0x0000
> +mpst                Average Power Consumed:        0x00003000
> +mpst                Relative Power Saving:         0x00004000
> +mpst                Exit Latency:                  0xfedcba9876543210
> +mpst                Reserved:                      0x0000000000000008
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
> +mpst            Power Characteristics ID must be 1, got 0x03 instead
> +mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
> +mpst            MPST Power Characteristics Revision must be 1, got 0x00
> +mpst            instead
> +mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
> +mpst            field must be zero, got 0x0000000000000008 instead
> +mpst            
> +mpst            
> +mpst            ==========================================================
> +mpst            0 passed, 13 failed, 0 warning, 0 aborted, 0 skipped, 0
> +mpst            info only.
> +mpst            ==========================================================
> diff --git a/fwts-test/mpst-0001/test-0001.sh b/fwts-test/mpst-0001/test-0001.sh
> new file mode 100755
> index 0000000..cb89942
> --- /dev/null
> +++ b/fwts-test/mpst-0001/test-0001.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against MPST"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/mpst.log.$$
> +
> +$FWTS --show-tests | grep MPST > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0001.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-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/mpst-0001/test-0002.sh b/fwts-test/mpst-0001/test-0002.sh
> new file mode 100755
> index 0000000..0110154
> --- /dev/null
> +++ b/fwts-test/mpst-0001/test-0002.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash
> +#
> +TEST="Test table against invalid MPST"
> +NAME=test-0001.sh
> +TMPLOG=$TMP/mpst.log.$$
> +
> +$FWTS --show-tests | grep MPST > /dev/null
> +if [ $? -eq 1 ]; then
> +	echo SKIP: $TEST, $NAME
> +	exit 77
> +fi
> +
> +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0002.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
> +diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-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: Colin Ian King <colin.king@canonical.com>
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index abff598..7ee3e31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,6 +94,8 @@  TESTS = fwts-test/acpidump-0001/test-0001.sh \
 	fwts-test/madt-0001/test-0002.sh \
 	fwts-test/mchi-0001/test-0001.sh \
 	fwts-test/mchi-0001/test-0002.sh \
+	fwts-test/mpst-0001/test-0001.sh \
+	fwts-test/mpst-0001/test-0002.sh \
 	fwts-test/msdm-0001/test-0001.sh \
 	fwts-test/msdm-0001/test-0002.sh \
 	fwts-test/method-0001/test-0001.sh \
diff --git a/fwts-test/mpst-0001/acpidump-0001.log b/fwts-test/mpst-0001/acpidump-0001.log
new file mode 100644
index 0000000..3a6b3dd
--- /dev/null
+++ b/fwts-test/mpst-0001/acpidump-0001.log
@@ -0,0 +1,39 @@ 
+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                                      ....
+
+MPST @ 0x00000000                                               
+  0000: 4d 50 53 54 b6 00 00 00 01 4a 49 4e 54 45 4c 20  MPST.....JINTEL 
+  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
+  0020: 27 05 16 20 00 00 00 00 02 00 00 00 00 00 01 00  '.. ............
+  0030: 2a 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
+  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
+  0050: 00 00 01 00 02 00 00 00 02 00 24 00 00 00 00 00  ..........$.....
+  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
+  0070: 00 00 01 00 00 00 05 06 03 00 02 00 00 00 41 00  ..............A.
+  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
+  0090: 34 12 00 00 00 00 00 00 00 00 41 00 00 00 00 30  4.........A....0
+  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 00 00  ...@...2Tv......
+  00b0: 00 00 00 00 00 00                                ......
+
diff --git a/fwts-test/mpst-0001/acpidump-0002.log b/fwts-test/mpst-0001/acpidump-0002.log
new file mode 100644
index 0000000..04d1898
--- /dev/null
+++ b/fwts-test/mpst-0001/acpidump-0002.log
@@ -0,0 +1,39 @@ 
+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                                      ....
+
+MPST @ 0x00000000
+  0000: 4d 50 53 54 b6 00 00 00 01 c5 49 4e 54 45 4c 20  MPST......INTEL 
+  0010: 54 45 4d 50 4c 41 54 45 01 00 00 00 49 4e 54 4c  TEMPLATE....INTL
+  0020: 27 05 16 20 00 00 00 01 02 00 03 00 00 04 01 00  '.. ............
+  0030: 2a 01 00 00 00 00 00 f0 00 00 00 00 00 00 00 e0  *...............
+  0040: 00 00 00 00 02 00 00 00 03 00 00 00 01 02 03 04  ................
+  0050: 00 00 01 00 02 00 00 05 02 00 24 01 00 00 00 00  ..........$.....
+  0060: 00 a0 00 00 00 00 00 00 00 b0 00 00 00 00 01 00  ................
+  0070: 00 00 01 00 00 00 05 06 03 00 02 00 06 00 02 00  ................
+  0080: 00 00 00 10 00 00 00 20 00 00 f0 de bc 9a 78 56  ....... ......xV
+  0090: 34 12 07 00 00 00 00 00 00 00 03 00 00 00 00 30  4..............0
+  00a0: 00 00 00 40 00 00 10 32 54 76 98 ba dc fe 08 00  ...@...2Tv......
+  00b0: 00 00 00 00 00 00                                ......
+
diff --git a/fwts-test/mpst-0001/mpst-0001.log b/fwts-test/mpst-0001/mpst-0001.log
new file mode 100644
index 0000000..9ebd0d8
--- /dev/null
+++ b/fwts-test/mpst-0001/mpst-0001.log
@@ -0,0 +1,61 @@ 
+mpst            mpst: MPST Memory Power State Table test.
+mpst            ----------------------------------------------------------
+mpst            Test 1 of 1: Validate MPST table.
+mpst            MPST Table:
+mpst              Communication Channel ID:        0x00
+mpst              Reserved:                        0x00000000
+mpst              Memory Power Node Count:         0x0002
+mpst              Reserved:                        0x0000
+mpst              MPST Power Node:
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x00
+mpst                Memory Power Node Id:          0x0001
+mpst                Power Node Length:             0x0000002a
+mpst                Base Address:                  0x00000000f0000000
+mpst                Memory Length:                 0x00000000e0000000
+mpst                Number of Power States:        0x00000002
+mpst                Number of Physical Components: 0x00000003
+mpst                Power State Value:             0x01
+mpst                Power State Information Index: 0x02
+mpst                Power State Value:             0x03
+mpst                Power State Information Index: 0x04
+mpst                Physical Component Id:         0x00
+mpst                Physical Component Id:         0x01
+mpst                Physical Component Id:         0x02
+mpst              MPST Power Node:
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x00
+mpst                Memory Power Node Id:          0x0002
+mpst                Power Node Length:             0x00000024
+mpst                Base Address:                  0x00000000a0000000
+mpst                Memory Length:                 0x00000000b0000000
+mpst                Number of Power States:        0x00000001
+mpst                Number of Physical Components: 0x00000001
+mpst                Power State Value:             0x05
+mpst                Power State Information Index: 0x06
+mpst                Physical Component Id:         0x03
+mpst              Memory Characteristics Count:    0x0002
+mpst              Reserved:                        0x0000
+mpst              MPST Power Characteristics:
+mpst                Power State Structure ID:      0x41
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x0000
+mpst                Average Power Consumed:        0x00001000
+mpst                Relative Power Saving:         0x00002000
+mpst                Exit Latency:                  0x123456789abcdef0
+mpst                Reserved:                      0x0000000000000000
+mpst              MPST Power Characteristics:
+mpst                Power State Structure ID:      0x41
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x0000
+mpst                Average Power Consumed:        0x00003000
+mpst                Relative Power Saving:         0x00004000
+mpst                Exit Latency:                  0xfedcba9876543210
+mpst                Reserved:                      0x0000000000000000
+mpst            
+mpst            PASSED: Test 1, No issues found in MPST table.
+mpst            
+mpst            ==========================================================
+mpst            1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0
+mpst            info only.
+mpst            ==========================================================
diff --git a/fwts-test/mpst-0001/mpst-0002.log b/fwts-test/mpst-0001/mpst-0002.log
new file mode 100644
index 0000000..adda211
--- /dev/null
+++ b/fwts-test/mpst-0001/mpst-0002.log
@@ -0,0 +1,88 @@ 
+mpst            mpst: MPST Memory Power State Table test.
+mpst            ----------------------------------------------------------
+mpst            Test 1 of 1: Validate MPST table.
+mpst            MPST Table:
+mpst              Communication Channel ID:        0x00
+mpst              Reserved:                        0x00010000
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x00010000 instead
+mpst              Memory Power Node Count:         0x0002
+mpst              Reserved:                        0x0003
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x0003 instead
+mpst              MPST Power Node:
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x04
+mpst                Memory Power Node Id:          0x0001
+mpst                Power Node Length:             0x0000012a
+mpst                Base Address:                  0x00000000f0000000
+mpst                Memory Length:                 0x00000000e0000000
+mpst                Number of Power States:        0x00000002
+mpst                Number of Physical Components: 0x00000003
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x04 instead
+mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
+mpst            Node Length should be 0x0000002a, got 0x0000012a instead
+mpst                Power State Value:             0x01
+mpst                Power State Information Index: 0x02
+mpst                Power State Value:             0x03
+mpst                Power State Information Index: 0x04
+mpst                Physical Component Id:         0x00
+mpst                Physical Component Id:         0x01
+mpst                Physical Component Id:         0x02
+mpst              MPST Power Node:
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x05
+mpst                Memory Power Node Id:          0x0002
+mpst                Power Node Length:             0x00000124
+mpst                Base Address:                  0x00000000a0000000
+mpst                Memory Length:                 0x00000000b0000000
+mpst                Number of Power States:        0x00000001
+mpst                Number of Physical Components: 0x00000001
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x05 instead
+mpst            FAILED [HIGH] MPSTBadPowerNodeLength: Test 1, MPST Power
+mpst            Node Length should be 0x00000024, got 0x00000124 instead
+mpst                Power State Value:             0x05
+mpst                Power State Information Index: 0x06
+mpst                Physical Component Id:         0x03
+mpst              Memory Characteristics Count:    0x0002
+mpst              Reserved:                        0x0006
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x0006 instead
+mpst              MPST Power Characteristics:
+mpst                Power State Structure ID:      0x02
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x0000
+mpst                Average Power Consumed:        0x00001000
+mpst                Relative Power Saving:         0x00002000
+mpst                Exit Latency:                  0x123456789abcdef0
+mpst                Reserved:                      0x0000000000000007
+mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
+mpst            Power Characteristics ID must be 1, got 0x02 instead
+mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
+mpst            MPST Power Characteristics Revision must be 1, got 0x00
+mpst            instead
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x0000000000000007 instead
+mpst              MPST Power Characteristics:
+mpst                Power State Structure ID:      0x03
+mpst                Flags:                         0x00
+mpst                Reserved:                      0x0000
+mpst                Average Power Consumed:        0x00003000
+mpst                Relative Power Saving:         0x00004000
+mpst                Exit Latency:                  0xfedcba9876543210
+mpst                Reserved:                      0x0000000000000008
+mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsID: Test 1, MPST
+mpst            Power Characteristics ID must be 1, got 0x03 instead
+mpst            FAILED [HIGH] MPSTBadPowerCharacteristicsRevision: Test 1,
+mpst            MPST Power Characteristics Revision must be 1, got 0x00
+mpst            instead
+mpst            FAILED [LOW] MPSTReservedNonZero: Test 1, MPST reserved
+mpst            field must be zero, got 0x0000000000000008 instead
+mpst            
+mpst            
+mpst            ==========================================================
+mpst            0 passed, 13 failed, 0 warning, 0 aborted, 0 skipped, 0
+mpst            info only.
+mpst            ==========================================================
diff --git a/fwts-test/mpst-0001/test-0001.sh b/fwts-test/mpst-0001/test-0001.sh
new file mode 100755
index 0000000..cb89942
--- /dev/null
+++ b/fwts-test/mpst-0001/test-0001.sh
@@ -0,0 +1,23 @@ 
+#!/bin/bash
+#
+TEST="Test table against MPST"
+NAME=test-0001.sh
+TMPLOG=$TMP/mpst.log.$$
+
+$FWTS --show-tests | grep MPST > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0001.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-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/mpst-0001/test-0002.sh b/fwts-test/mpst-0001/test-0002.sh
new file mode 100755
index 0000000..0110154
--- /dev/null
+++ b/fwts-test/mpst-0001/test-0002.sh
@@ -0,0 +1,23 @@ 
+#!/bin/bash
+#
+TEST="Test table against invalid MPST"
+NAME=test-0001.sh
+TMPLOG=$TMP/mpst.log.$$
+
+$FWTS --show-tests | grep MPST > /dev/null
+if [ $? -eq 1 ]; then
+	echo SKIP: $TEST, $NAME
+	exit 77
+fi
+
+$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/mpst-0001/acpidump-0002.log mpst - | cut -c7- | grep "^mpst" > $TMPLOG
+diff $TMPLOG $FWTSTESTDIR/mpst-0001/mpst-0002.log >> $FAILURE_LOG
+ret=$?
+if [ $ret -eq 0 ]; then
+	echo PASSED: $TEST, $NAME
+else
+	echo FAILED: $TEST, $NAME
+fi
+
+rm $TMPLOG
+exit $ret