Message ID | 1437073344-18256-3-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2015年07月17日 03:02, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > Makefile.am | 2 + > .../arg-show-tests-0001/arg-show-tests-0001.log | 2 + > .../arg-show-tests-full-0001.log | 6 +- > fwts-test/iort-0001/acpidump-0001.log | 51 +++++ > fwts-test/iort-0001/acpidump-0002.log | 51 +++++ > fwts-test/iort-0001/iort-0001.log | 119 +++++++++++ > fwts-test/iort-0001/iort-0002.log | 217 +++++++++++++++++++++ > fwts-test/iort-0001/test-0001.sh | 17 ++ > fwts-test/iort-0001/test-0002.sh | 17 ++ > 9 files changed, 481 insertions(+), 1 deletion(-) > create mode 100644 fwts-test/iort-0001/acpidump-0001.log > create mode 100644 fwts-test/iort-0001/acpidump-0002.log > create mode 100644 fwts-test/iort-0001/iort-0001.log > create mode 100644 fwts-test/iort-0001/iort-0002.log > create mode 100755 fwts-test/iort-0001/test-0001.sh > create mode 100755 fwts-test/iort-0001/test-0002.sh > > diff --git a/Makefile.am b/Makefile.am > index 0cf0db5..d8083b4 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -73,6 +73,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ > fwts-test/facs-0001/test-0002.sh \ > fwts-test/hest-0001/test-0001.sh \ > fwts-test/hest-0001/test-0002.sh \ > + fwts-test/iort-0001/test-0001.sh \ > + fwts-test/iort-0001/test-0002.sh \ > fwts-test/klog-0001/test-0001.sh \ > fwts-test/klog-0001/test-0002.sh \ > fwts-test/klog-0001/test-0003.sh \ > diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > index aaf1291..9f26b73 100644 > --- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > +++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > @@ -19,6 +19,7 @@ ACPI tests: > gtdt GTDT Generic Timer Description Table test. > hest HEST Hardware Error Source Table test. > hpet HPET IA-PC High Precision Event Timer Table tests. > + iort IORT IO Remapping Table test. > lpit LPIT Low Power Idle Table test. > madt MADT Multiple APIC Description Table test. > mcfg MCFG PCI Express* memory mapped config space test. > @@ -74,6 +75,7 @@ Batch tests: > hda_audio HDA Audio Pin Configuration test. > hest HEST Hardware Error Source Table test. > hpet HPET IA-PC High Precision Event Timer Table tests. > + iort IORT IO Remapping Table test. > klog Scan kernel log for errors and warnings. > lpit LPIT Low Power Idle Table test. > madt MADT Multiple APIC Description Table test. > diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > index 43c4064..0d8d6b4 100644 > --- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > @@ -46,6 +46,8 @@ ACPI tests: > Test HPET base in HPET table. > Test HPET base in DSDT and/or SSDT. > Test HPET configuration. > + iort (1 test): > + IORT IO Remapping Table test. > lpit (1 test): > LPIT Low Power Idle Table test. > madt (1 test): > @@ -351,6 +353,8 @@ Batch tests: > Test HPET base in HPET table. > Test HPET base in DSDT and/or SSDT. > Test HPET configuration. > + iort (1 test): > + IORT IO Remapping Table test. > klog (1 test): > Kernel log error check. > lpit (1 test): > @@ -820,4 +824,4 @@ UEFI tests: > Test UEFI RT service query variable info interface stress test. > Test UEFI RT service get variable interface, invalid parameters. > > -Total of 664 tests > +Total of 666 tests > diff --git a/fwts-test/iort-0001/acpidump-0001.log b/fwts-test/iort-0001/acpidump-0001.log > new file mode 100644 > index 0000000..87e9e14 > --- /dev/null > +++ b/fwts-test/iort-0001/acpidump-0001.log > @@ -0,0 +1,51 @@ > +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 .... > + > +IORT @ 0x00000000 > + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ > + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ > + 0020: 01 00 00 00 04 00 00 00 30 00 00 00 00 00 00 00 ................ > + 0030: 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 0040: 03 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ > + 0050: 01 50 00 00 00 00 00 00 02 00 00 00 24 00 00 00 ................ > + 0060: 00 00 00 00 01 00 00 00 0f 00 00 03 20 54 45 53 .............TES > + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... > + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ > + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ > + 00a0: 02 40 00 00 00 00 00 00 01 00 00 00 20 00 00 00 ................ > + 00b0: 01 00 00 00 0e 00 00 03 01 00 00 00 ff ee bb c0 ................ > + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ > + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 00e0: 03 a4 00 00 00 00 00 00 01 00 00 00 90 00 00 00 ................ > + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ > + 0100: 02 00 00 00 01 00 00 00 3c 00 00 00 04 00 00 00 ................ > + 0110: 50 00 00 00 04 00 00 00 70 00 00 00 f0 00 00 00 ................ > + 0120: 01 00 00 00 f1 00 00 00 01 00 00 00 00 00 00 00 ................ > + 0130: 00 00 80 e0 01 00 00 00 00 00 70 d0 01 00 00 00 ................ > + 0140: 00 00 60 c0 01 00 00 00 00 00 50 b0 01 00 00 00 ................ > + 0150: c0 80 00 f0 01 00 00 00 80 80 00 f0 01 00 00 00 ................ > + 0160: 40 80 00 f0 01 00 00 00 00 80 00 f0 01 00 00 00 ................ > + 0170: 00 00 ff ff 01 00 00 00 20 30 40 50 00 00 00 00 ................ > + 0180: 01 00 00 00 .... > diff --git a/fwts-test/iort-0001/acpidump-0002.log b/fwts-test/iort-0001/acpidump-0002.log > new file mode 100644 > index 0000000..9729b06 > --- /dev/null > +++ b/fwts-test/iort-0001/acpidump-0002.log > @@ -0,0 +1,51 @@ > +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 .... > + > +IORT @ 0x00000000 > + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ > + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ > + 0020: 01 00 00 00 05 00 00 00 30 00 00 00 00 00 00 00 ................ > + 0030: 00 20 00 03 ff ff ff ff 80 00 00 00 e0 00 00 00 ................ > + 0040: 04 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ > + 0050: 01 50 00 02 01 f0 00 00 03 00 00 00 24 00 00 00 ................ > + 0060: ff ff ff ff 04 00 00 00 0f ad de 03 20 54 45 53 .............TES > + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... > + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ > + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ > + 00a0: 02 40 00 50 0f 00 00 00 10 00 00 00 20 00 00 00 ................ > + 00b0: d1 00 00 00 fe 00 80 03 03 00 00 00 ff ee bb c0 ................ > + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ > + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 00e0: 03 94 00 a0 00 81 00 00 01 00 00 00 90 00 00 00 ................ > + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ > + 0100: 04 00 00 00 aa 00 00 00 3c 00 00 00 04 00 00 00 ................ > + 0110: 50 00 00 00 05 00 00 00 70 00 00 00 f0 00 00 00 ................ > + 0120: 02 00 00 00 f1 00 00 00 04 00 00 00 00 00 00 00 ................ > + 0130: 00 00 80 e0 08 00 00 00 00 00 70 d0 10 00 00 00 ................ > + 0140: 00 00 60 c0 20 00 00 00 00 00 50 b0 40 00 00 00 ................ > + 0150: c0 80 00 f0 aa 00 00 00 80 80 00 f0 ab 00 00 00 ................ > + 0160: 40 80 00 f0 92 00 00 00 00 80 00 f0 04 00 00 00 ................ > + 0170: 00 00 ff ff ff 00 00 00 20 30 40 50 00 00 00 00 ................ > + 0180: 01 00 00 00 .... > diff --git a/fwts-test/iort-0001/iort-0001.log b/fwts-test/iort-0001/iort-0001.log > new file mode 100644 > index 0000000..e8bda77 > --- /dev/null > +++ b/fwts-test/iort-0001/iort-0001.log > @@ -0,0 +1,119 @@ > +iort iort: IORT IO Remapping Table test. > +iort ---------------------------------------------------------- > +iort Test 1 of 1: IORT IO Remapping Table test. > +iort IORT IO Remapping Table test > +iort Number of IORT Nodes: 0x0004 > +iort IORT Node Array Offset: 0x0030 > +iort Reserved: 0x0000 > +iort > +iort IORT ITS Group Node: > +iort Type: 0x00 > +iort Length: 0x0020 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000000 > +iort Reference to ID Array: 0x00000000 > +iort Number of ITSs: 0x00000003 > +iort GIC ITS Identifier: 0x01020304 > +iort GIC ITS Identifier: 0x05060708 > +iort GIC ITS Identifier: 0x090a0b0c > +iort > +iort IORT Named Component Node: > +iort Type: 0x01 > +iort Length: 0x0050 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000002 > +iort Reference to ID Array: 0x00000024 > +iort Node Flags: 0x00000000 > +iort Cache Coherent Attribute: 0x00000001 > +iort Allocation Hints: 0x0f > +iort Reserved: 0x0000 > +iort Memory Access Flags 0x03 > +iort Device Memory Addr. Size: 0x20 > +iort Device Object Name: TEST > +iort ID Mapping 0 > +iort Input Base: 0x00000001 > +iort ID Count: 0x00000001 > +iort Output Base: 0x00000002 > +iort Output Reference: 0xffffffff > +iort Flags: 0x00000001 > +iort ID Mapping 1 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000002 > +iort Output Base: 0x00000003 > +iort Output Reference: 0x88888888 > +iort Flags: 0x00000001 > +iort > +iort IORT PCI Root Complex Node: > +iort Type: 0x02 > +iort Length: 0x0040 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000020 > +iort Cache Coherent Attribute: 0x00000001 > +iort Allocation Hints: 0x0e > +iort Reserved: 0x0000 > +iort Memory Access Flags 0x0003 > +iort ATS Attribute: 0x00000001 > +iort PCI Segment Number: 0xc0bbeeff > +iort ID Mapping 0 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000003 > +iort Output Base: 0x00000004 > +iort Output Reference: 0x00000005 > +iort Flags: 0x00000001 > +iort > +iort IORT SMMU node: > +iort Type: 0x03 > +iort Length: 0x00a4 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000090 > +iort Base Address: 0xf01030c020908000 > +iort Span: 0x0000000020000000 > +iort Model: 0x00000002 > +iort Flags: 0x00000001 > +iort Global Intr. Offset: 0x0000003c > +iort Number of Context Intr.: 0x00000004 > +iort Context Intr. Offset: 0x00000050 > +iort Number of PMU Intr.: 0x00000004 > +iort PMU Intr. Offset: 0x00000070 > +iort Global Interrupt Array: > +iort SMMU_NSgIrpt: 0x000000f0 > +iort SMMU_NSgIrpt Flags: 0x00000001 > +iort SMMU_NSgCfgIrpt: 0x000000f1 > +iort SMMU_NSgCfgIrpt Flags: 0x00000001 > +iort Context Interrupt Array: > +iort GSIV: 0xe0800000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xd0700000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xc0600000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xb0500000 > +iort Interrupt Flags: 0x00000001 > +iort PMU Interrupt Array: > +iort GSIV: 0xf00080c0 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008080 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008040 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008000 > +iort Interrupt Flags: 0x00000001 > +iort ID Mapping 0 > +iort Input Base: 0xffff0000 > +iort ID Count: 0x00000001 > +iort Output Base: 0x50403020 > +iort Output Reference: 0x00000000 > +iort Flags: 0x00000001 > +iort > +iort PASSED: Test 1, No issues found in IORT. > +iort > +iort ========================================================== > +iort 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 > +iort info only. > +iort ========================================================== > diff --git a/fwts-test/iort-0001/iort-0002.log b/fwts-test/iort-0001/iort-0002.log > new file mode 100644 > index 0000000..a726735 > --- /dev/null > +++ b/fwts-test/iort-0001/iort-0002.log > @@ -0,0 +1,217 @@ > +iort iort: IORT IO Remapping Table test. > +iort ---------------------------------------------------------- > +iort Test 1 of 1: IORT IO Remapping Table test. > +iort IORT IO Remapping Table test > +iort Number of IORT Nodes: 0x0005 > +iort IORT Node Array Offset: 0x0030 > +iort Reserved: 0x0000 > +iort > +iort IORT ITS Group Node: > +iort Type: 0x00 > +iort Length: 0x0020 > +iort Revision: 0x03 > +iort Reserved: 0xffffffff > +iort Number of ID mappings: 0x00000080 > +iort Reference to ID Array: 0x000000e0 > +iort Number of ITSs: 0x00000004 > +iort FAILED [HIGH] IORTItsIdArrayOutsideTable: Test 1, IORT ITS > +iort Identifier Array end is outside the IORT ACPI table. > +iort Either the Number of ID mappings is too large or the IORT > +iort table size or ITS Group Node is too small. > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x03 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x0ffffffff and should be zero. > +iort FAILED [LOW] IORTNodeMappingsCountNonZero: Test 1, IORT > +iort Node Number of ID Mappings field is 0x000000080 and should > +iort be zero for this node type. > +iort FAILED [LOW] IORTNodeRefToIdArrayNonZero: Test 1, IORT > +iort Node Referenced to ID Array field is 0x0000000e0 and > +iort should be zero for this node type. > +iort > +iort IORT Named Component Node: > +iort Type: 0x01 > +iort Length: 0x0050 > +iort Revision: 0x02 > +iort Reserved: 0x0000f001 > +iort Number of ID mappings: 0x00000003 > +iort Reference to ID Array: 0x00000024 > +iort Node Flags: 0xffffffff > +iort Cache Coherent Attribute: 0x00000004 > +iort Allocation Hints: 0x0f > +iort Reserved: 0xdead > +iort Memory Access Flags 0x03 > +iort Device Memory Addr. Size: 0x20 > +iort Device Object Name: TEST > +iort ID Mapping 0 > +iort Input Base: 0x00000001 > +iort ID Count: 0x00000001 > +iort Output Base: 0x00000002 > +iort Output Reference: 0xffffffff > +iort Flags: 0x00000001 > +iort ID Mapping 1 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000002 > +iort Output Base: 0x00000003 > +iort Output Reference: 0x88888888 > +iort Flags: 0x00000001 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x02 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x00000f001 and should be zero. > +iort FAILED [HIGH] IORTNamedComponentNodeFlagsNonZero: Test 1, > +iort IORT Named Component Node Flags is 0xffffffff and is > +iort reserved and should be zero. > +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT > +iort Named Component Node Coherent Attribute is 0x4 and should > +iort be either 0 (device is fully coherent) or 1 (device is not > +iort coherent). > +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT > +iort Named Component Node Node Reserved is 0xdead and is > +iort reserved and should be zero. > +iort FAILED [HIGH] IORTMemAttrInvalid: Test 1, IORT Named > +iort Component Node Memory Attributes are illegal, CCA cannot > +iort be 0 if CPM and DACS are 1. If the device has a coherent > +iort path to memory and natively outputs IWB-OWB-ISH then CCA > +iort must be 1. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 2 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort > +iort IORT PCI Root Complex Node: > +iort Type: 0x02 > +iort Length: 0x0040 > +iort Revision: 0x50 > +iort Reserved: 0x0000000f > +iort Number of ID mappings: 0x00000010 > +iort Reference to ID Array: 0x00000020 > +iort Cache Coherent Attribute: 0x000000d1 > +iort Allocation Hints: 0xfe > +iort Reserved: 0x8000 > +iort Memory Access Flags 0x0003 > +iort ATS Attribute: 0x00000003 > +iort PCI Segment Number: 0xc0bbeeff > +iort ID Mapping 0 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000003 > +iort Output Base: 0x00000004 > +iort Output Reference: 0x00000005 > +iort Flags: 0x00000001 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x50 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x00000000f and should be zero. > +iort FAILED [HIGH] IORTCPCIRootComplexAtsAttrInvalid: Test 1, > +iort IORT PCI Root Complex Node ATS Attribute is 0x3 and was > +iort expecting either 0 (root complex supports ATS) or 1 (root > +iort complex does not support ATS). > +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT > +iort PCI Root Complex Node Coherent Attribute is 0xd1 and > +iort should be either 0 (device is fully coherent) or 1 (device > +iort is not coherent). > +iort FAILED [HIGH] IORTAllocHintsReservedNonZero: Test 1, IORT > +iort PCI Root Complex Node Allocation Hints reserved bits [7:4] > +iort are reserved and should be zero. > +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT PCI > +iort Root Complex Node Node Reserved is 0x8000 and is reserved > +iort and should be zero. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 1 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort > +iort IORT SMMU node: > +iort Type: 0x03 > +iort Length: 0x0094 > +iort Revision: 0xa0 > +iort Reserved: 0x00008100 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000090 > +iort Base Address: 0xf01030c020908000 > +iort Span: 0x0000000020000000 > +iort Model: 0x00000004 > +iort Flags: 0x000000aa > +iort Global Intr. Offset: 0x0000003c > +iort Number of Context Intr.: 0x00000004 > +iort Context Intr. Offset: 0x00000050 > +iort Number of PMU Intr.: 0x00000005 > +iort PMU Intr. Offset: 0x00000070 > +iort Global Interrupt Array: > +iort SMMU_NSgIrpt: 0x000000f0 > +iort SMMU_NSgIrpt Flags: 0x00000002 > +iort SMMU_NSgCfgIrpt: 0x000000f1 > +iort SMMU_NSgCfgIrpt Flags: 0x00000004 > +iort Context Interrupt Array: > +iort GSIV: 0xe0800000 > +iort Interrupt Flags: 0x00000008 > +iort GSIV: 0xd0700000 > +iort Interrupt Flags: 0x00000010 > +iort GSIV: 0xc0600000 > +iort Interrupt Flags: 0x00000020 > +iort GSIV: 0xb0500000 > +iort Interrupt Flags: 0x00000040 > +iort PMU Interrupt Array: > +iort GSIV: 0xf00080c0 > +iort Interrupt Flags: 0x000000aa > +iort GSIV: 0xf0008080 > +iort Interrupt Flags: 0x000000ab > +iort GSIV: 0xf0008040 > +iort Interrupt Flags: 0x00000092 > +iort GSIV: 0xf0008000 > +iort Interrupt Flags: 0x00000004 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0xa0 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x000008100 and should be zero. > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_NsgIrpt Flags field reserved bits [31:1] should > +iort be all zero, got 0x2 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_NsgCfgIrpt Flags field reserved bits [31:1] > +iort should be all zero, got 0x4 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x8 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x10 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x20 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x40 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0xaa > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0xab > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x92 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x4 > +iort FAILED [HIGH] IORTSmmuInterruptsOutsideTable: Test 1, IORT > +iort SMMU Interrupt 4 is outside the IORT ACPI table. Either > +iort the offset is incorrect or the IORT table size is too > +iort small. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 0 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort FAILED [HIGH] IORTSmmuInvalidModel: Test 1, IORT SMMU > +iort Model is 0x4 and was expecting a model value 0 to 3. > +iort FAILED [HIGH] IORTSmmuReservedFlags: Test 1, IORT SMMU > +iort Reserved Flags is 0xaa and has some reserved bits [31:2] > +iort set when they should be zero. > +iort > +iort FAILED [HIGH] IORTInvalidType: Test 1, IORT Type 0xff is > +iort invalid, aborting check > +iort > +iort ========================================================== > +iort 0 passed, 36 failed, 0 warning, 0 aborted, 0 skipped, 0 > +iort info only. > +iort ========================================================== > diff --git a/fwts-test/iort-0001/test-0001.sh b/fwts-test/iort-0001/test-0001.sh > new file mode 100755 > index 0000000..8c18dc1 > --- /dev/null > +++ b/fwts-test/iort-0001/test-0001.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > +# > +TEST="Test apci table against IORT" > +NAME=test-0001.sh > +TMPLOG=$TMP/iort.log.$$ > + > +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0001.log iort - | cut -c7- | grep "^iort" > $TMPLOG > +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-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/iort-0001/test-0002.sh b/fwts-test/iort-0001/test-0002.sh > new file mode 100755 > index 0000000..dd1fe64 > --- /dev/null > +++ b/fwts-test/iort-0001/test-0002.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > +# > +TEST="Test apci table against invalid IORT" > +NAME=test-0001.sh > +TMPLOG=$TMP/iort.log.$$ > + > +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0002.log iort - | cut -c7- | grep "^iort" > $TMPLOG > +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-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>
On 07/17/2015 03:02 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > Makefile.am | 2 + > .../arg-show-tests-0001/arg-show-tests-0001.log | 2 + > .../arg-show-tests-full-0001.log | 6 +- > fwts-test/iort-0001/acpidump-0001.log | 51 +++++ > fwts-test/iort-0001/acpidump-0002.log | 51 +++++ > fwts-test/iort-0001/iort-0001.log | 119 +++++++++++ > fwts-test/iort-0001/iort-0002.log | 217 +++++++++++++++++++++ > fwts-test/iort-0001/test-0001.sh | 17 ++ > fwts-test/iort-0001/test-0002.sh | 17 ++ > 9 files changed, 481 insertions(+), 1 deletion(-) > create mode 100644 fwts-test/iort-0001/acpidump-0001.log > create mode 100644 fwts-test/iort-0001/acpidump-0002.log > create mode 100644 fwts-test/iort-0001/iort-0001.log > create mode 100644 fwts-test/iort-0001/iort-0002.log > create mode 100755 fwts-test/iort-0001/test-0001.sh > create mode 100755 fwts-test/iort-0001/test-0002.sh > > diff --git a/Makefile.am b/Makefile.am > index 0cf0db5..d8083b4 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -73,6 +73,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ > fwts-test/facs-0001/test-0002.sh \ > fwts-test/hest-0001/test-0001.sh \ > fwts-test/hest-0001/test-0002.sh \ > + fwts-test/iort-0001/test-0001.sh \ > + fwts-test/iort-0001/test-0002.sh \ > fwts-test/klog-0001/test-0001.sh \ > fwts-test/klog-0001/test-0002.sh \ > fwts-test/klog-0001/test-0003.sh \ > diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > index aaf1291..9f26b73 100644 > --- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > +++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log > @@ -19,6 +19,7 @@ ACPI tests: > gtdt GTDT Generic Timer Description Table test. > hest HEST Hardware Error Source Table test. > hpet HPET IA-PC High Precision Event Timer Table tests. > + iort IORT IO Remapping Table test. > lpit LPIT Low Power Idle Table test. > madt MADT Multiple APIC Description Table test. > mcfg MCFG PCI Express* memory mapped config space test. > @@ -74,6 +75,7 @@ Batch tests: > hda_audio HDA Audio Pin Configuration test. > hest HEST Hardware Error Source Table test. > hpet HPET IA-PC High Precision Event Timer Table tests. > + iort IORT IO Remapping Table test. > klog Scan kernel log for errors and warnings. > lpit LPIT Low Power Idle Table test. > madt MADT Multiple APIC Description Table test. > diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > index 43c4064..0d8d6b4 100644 > --- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log > @@ -46,6 +46,8 @@ ACPI tests: > Test HPET base in HPET table. > Test HPET base in DSDT and/or SSDT. > Test HPET configuration. > + iort (1 test): > + IORT IO Remapping Table test. > lpit (1 test): > LPIT Low Power Idle Table test. > madt (1 test): > @@ -351,6 +353,8 @@ Batch tests: > Test HPET base in HPET table. > Test HPET base in DSDT and/or SSDT. > Test HPET configuration. > + iort (1 test): > + IORT IO Remapping Table test. > klog (1 test): > Kernel log error check. > lpit (1 test): > @@ -820,4 +824,4 @@ UEFI tests: > Test UEFI RT service query variable info interface stress test. > Test UEFI RT service get variable interface, invalid parameters. > > -Total of 664 tests > +Total of 666 tests > diff --git a/fwts-test/iort-0001/acpidump-0001.log b/fwts-test/iort-0001/acpidump-0001.log > new file mode 100644 > index 0000000..87e9e14 > --- /dev/null > +++ b/fwts-test/iort-0001/acpidump-0001.log > @@ -0,0 +1,51 @@ > +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 .... > + > +IORT @ 0x00000000 > + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ > + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ > + 0020: 01 00 00 00 04 00 00 00 30 00 00 00 00 00 00 00 ................ > + 0030: 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 0040: 03 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ > + 0050: 01 50 00 00 00 00 00 00 02 00 00 00 24 00 00 00 ................ > + 0060: 00 00 00 00 01 00 00 00 0f 00 00 03 20 54 45 53 .............TES > + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... > + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ > + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ > + 00a0: 02 40 00 00 00 00 00 00 01 00 00 00 20 00 00 00 ................ > + 00b0: 01 00 00 00 0e 00 00 03 01 00 00 00 ff ee bb c0 ................ > + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ > + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 00e0: 03 a4 00 00 00 00 00 00 01 00 00 00 90 00 00 00 ................ > + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ > + 0100: 02 00 00 00 01 00 00 00 3c 00 00 00 04 00 00 00 ................ > + 0110: 50 00 00 00 04 00 00 00 70 00 00 00 f0 00 00 00 ................ > + 0120: 01 00 00 00 f1 00 00 00 01 00 00 00 00 00 00 00 ................ > + 0130: 00 00 80 e0 01 00 00 00 00 00 70 d0 01 00 00 00 ................ > + 0140: 00 00 60 c0 01 00 00 00 00 00 50 b0 01 00 00 00 ................ > + 0150: c0 80 00 f0 01 00 00 00 80 80 00 f0 01 00 00 00 ................ > + 0160: 40 80 00 f0 01 00 00 00 00 80 00 f0 01 00 00 00 ................ > + 0170: 00 00 ff ff 01 00 00 00 20 30 40 50 00 00 00 00 ................ > + 0180: 01 00 00 00 .... > diff --git a/fwts-test/iort-0001/acpidump-0002.log b/fwts-test/iort-0001/acpidump-0002.log > new file mode 100644 > index 0000000..9729b06 > --- /dev/null > +++ b/fwts-test/iort-0001/acpidump-0002.log > @@ -0,0 +1,51 @@ > +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 .... > + > +IORT @ 0x00000000 > + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ > + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ > + 0020: 01 00 00 00 05 00 00 00 30 00 00 00 00 00 00 00 ................ > + 0030: 00 20 00 03 ff ff ff ff 80 00 00 00 e0 00 00 00 ................ > + 0040: 04 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ > + 0050: 01 50 00 02 01 f0 00 00 03 00 00 00 24 00 00 00 ................ > + 0060: ff ff ff ff 04 00 00 00 0f ad de 03 20 54 45 53 .............TES > + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... > + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ > + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ > + 00a0: 02 40 00 50 0f 00 00 00 10 00 00 00 20 00 00 00 ................ > + 00b0: d1 00 00 00 fe 00 80 03 03 00 00 00 ff ee bb c0 ................ > + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ > + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > + 00e0: 03 94 00 a0 00 81 00 00 01 00 00 00 90 00 00 00 ................ > + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ > + 0100: 04 00 00 00 aa 00 00 00 3c 00 00 00 04 00 00 00 ................ > + 0110: 50 00 00 00 05 00 00 00 70 00 00 00 f0 00 00 00 ................ > + 0120: 02 00 00 00 f1 00 00 00 04 00 00 00 00 00 00 00 ................ > + 0130: 00 00 80 e0 08 00 00 00 00 00 70 d0 10 00 00 00 ................ > + 0140: 00 00 60 c0 20 00 00 00 00 00 50 b0 40 00 00 00 ................ > + 0150: c0 80 00 f0 aa 00 00 00 80 80 00 f0 ab 00 00 00 ................ > + 0160: 40 80 00 f0 92 00 00 00 00 80 00 f0 04 00 00 00 ................ > + 0170: 00 00 ff ff ff 00 00 00 20 30 40 50 00 00 00 00 ................ > + 0180: 01 00 00 00 .... > diff --git a/fwts-test/iort-0001/iort-0001.log b/fwts-test/iort-0001/iort-0001.log > new file mode 100644 > index 0000000..e8bda77 > --- /dev/null > +++ b/fwts-test/iort-0001/iort-0001.log > @@ -0,0 +1,119 @@ > +iort iort: IORT IO Remapping Table test. > +iort ---------------------------------------------------------- > +iort Test 1 of 1: IORT IO Remapping Table test. > +iort IORT IO Remapping Table test > +iort Number of IORT Nodes: 0x0004 > +iort IORT Node Array Offset: 0x0030 > +iort Reserved: 0x0000 > +iort > +iort IORT ITS Group Node: > +iort Type: 0x00 > +iort Length: 0x0020 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000000 > +iort Reference to ID Array: 0x00000000 > +iort Number of ITSs: 0x00000003 > +iort GIC ITS Identifier: 0x01020304 > +iort GIC ITS Identifier: 0x05060708 > +iort GIC ITS Identifier: 0x090a0b0c > +iort > +iort IORT Named Component Node: > +iort Type: 0x01 > +iort Length: 0x0050 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000002 > +iort Reference to ID Array: 0x00000024 > +iort Node Flags: 0x00000000 > +iort Cache Coherent Attribute: 0x00000001 > +iort Allocation Hints: 0x0f > +iort Reserved: 0x0000 > +iort Memory Access Flags 0x03 > +iort Device Memory Addr. Size: 0x20 > +iort Device Object Name: TEST > +iort ID Mapping 0 > +iort Input Base: 0x00000001 > +iort ID Count: 0x00000001 > +iort Output Base: 0x00000002 > +iort Output Reference: 0xffffffff > +iort Flags: 0x00000001 > +iort ID Mapping 1 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000002 > +iort Output Base: 0x00000003 > +iort Output Reference: 0x88888888 > +iort Flags: 0x00000001 > +iort > +iort IORT PCI Root Complex Node: > +iort Type: 0x02 > +iort Length: 0x0040 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000020 > +iort Cache Coherent Attribute: 0x00000001 > +iort Allocation Hints: 0x0e > +iort Reserved: 0x0000 > +iort Memory Access Flags 0x0003 > +iort ATS Attribute: 0x00000001 > +iort PCI Segment Number: 0xc0bbeeff > +iort ID Mapping 0 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000003 > +iort Output Base: 0x00000004 > +iort Output Reference: 0x00000005 > +iort Flags: 0x00000001 > +iort > +iort IORT SMMU node: > +iort Type: 0x03 > +iort Length: 0x00a4 > +iort Revision: 0x00 > +iort Reserved: 0x00000000 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000090 > +iort Base Address: 0xf01030c020908000 > +iort Span: 0x0000000020000000 > +iort Model: 0x00000002 > +iort Flags: 0x00000001 > +iort Global Intr. Offset: 0x0000003c > +iort Number of Context Intr.: 0x00000004 > +iort Context Intr. Offset: 0x00000050 > +iort Number of PMU Intr.: 0x00000004 > +iort PMU Intr. Offset: 0x00000070 > +iort Global Interrupt Array: > +iort SMMU_NSgIrpt: 0x000000f0 > +iort SMMU_NSgIrpt Flags: 0x00000001 > +iort SMMU_NSgCfgIrpt: 0x000000f1 > +iort SMMU_NSgCfgIrpt Flags: 0x00000001 > +iort Context Interrupt Array: > +iort GSIV: 0xe0800000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xd0700000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xc0600000 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xb0500000 > +iort Interrupt Flags: 0x00000001 > +iort PMU Interrupt Array: > +iort GSIV: 0xf00080c0 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008080 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008040 > +iort Interrupt Flags: 0x00000001 > +iort GSIV: 0xf0008000 > +iort Interrupt Flags: 0x00000001 > +iort ID Mapping 0 > +iort Input Base: 0xffff0000 > +iort ID Count: 0x00000001 > +iort Output Base: 0x50403020 > +iort Output Reference: 0x00000000 > +iort Flags: 0x00000001 > +iort > +iort PASSED: Test 1, No issues found in IORT. > +iort > +iort ========================================================== > +iort 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 > +iort info only. > +iort ========================================================== > diff --git a/fwts-test/iort-0001/iort-0002.log b/fwts-test/iort-0001/iort-0002.log > new file mode 100644 > index 0000000..a726735 > --- /dev/null > +++ b/fwts-test/iort-0001/iort-0002.log > @@ -0,0 +1,217 @@ > +iort iort: IORT IO Remapping Table test. > +iort ---------------------------------------------------------- > +iort Test 1 of 1: IORT IO Remapping Table test. > +iort IORT IO Remapping Table test > +iort Number of IORT Nodes: 0x0005 > +iort IORT Node Array Offset: 0x0030 > +iort Reserved: 0x0000 > +iort > +iort IORT ITS Group Node: > +iort Type: 0x00 > +iort Length: 0x0020 > +iort Revision: 0x03 > +iort Reserved: 0xffffffff > +iort Number of ID mappings: 0x00000080 > +iort Reference to ID Array: 0x000000e0 > +iort Number of ITSs: 0x00000004 > +iort FAILED [HIGH] IORTItsIdArrayOutsideTable: Test 1, IORT ITS > +iort Identifier Array end is outside the IORT ACPI table. > +iort Either the Number of ID mappings is too large or the IORT > +iort table size or ITS Group Node is too small. > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x03 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x0ffffffff and should be zero. > +iort FAILED [LOW] IORTNodeMappingsCountNonZero: Test 1, IORT > +iort Node Number of ID Mappings field is 0x000000080 and should > +iort be zero for this node type. > +iort FAILED [LOW] IORTNodeRefToIdArrayNonZero: Test 1, IORT > +iort Node Referenced to ID Array field is 0x0000000e0 and > +iort should be zero for this node type. > +iort > +iort IORT Named Component Node: > +iort Type: 0x01 > +iort Length: 0x0050 > +iort Revision: 0x02 > +iort Reserved: 0x0000f001 > +iort Number of ID mappings: 0x00000003 > +iort Reference to ID Array: 0x00000024 > +iort Node Flags: 0xffffffff > +iort Cache Coherent Attribute: 0x00000004 > +iort Allocation Hints: 0x0f > +iort Reserved: 0xdead > +iort Memory Access Flags 0x03 > +iort Device Memory Addr. Size: 0x20 > +iort Device Object Name: TEST > +iort ID Mapping 0 > +iort Input Base: 0x00000001 > +iort ID Count: 0x00000001 > +iort Output Base: 0x00000002 > +iort Output Reference: 0xffffffff > +iort Flags: 0x00000001 > +iort ID Mapping 1 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000002 > +iort Output Base: 0x00000003 > +iort Output Reference: 0x88888888 > +iort Flags: 0x00000001 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x02 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x00000f001 and should be zero. > +iort FAILED [HIGH] IORTNamedComponentNodeFlagsNonZero: Test 1, > +iort IORT Named Component Node Flags is 0xffffffff and is > +iort reserved and should be zero. > +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT > +iort Named Component Node Coherent Attribute is 0x4 and should > +iort be either 0 (device is fully coherent) or 1 (device is not > +iort coherent). > +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT > +iort Named Component Node Node Reserved is 0xdead and is > +iort reserved and should be zero. > +iort FAILED [HIGH] IORTMemAttrInvalid: Test 1, IORT Named > +iort Component Node Memory Attributes are illegal, CCA cannot > +iort be 0 if CPM and DACS are 1. If the device has a coherent > +iort path to memory and natively outputs IWB-OWB-ISH then CCA > +iort must be 1. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 2 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort > +iort IORT PCI Root Complex Node: > +iort Type: 0x02 > +iort Length: 0x0040 > +iort Revision: 0x50 > +iort Reserved: 0x0000000f > +iort Number of ID mappings: 0x00000010 > +iort Reference to ID Array: 0x00000020 > +iort Cache Coherent Attribute: 0x000000d1 > +iort Allocation Hints: 0xfe > +iort Reserved: 0x8000 > +iort Memory Access Flags 0x0003 > +iort ATS Attribute: 0x00000003 > +iort PCI Segment Number: 0xc0bbeeff > +iort ID Mapping 0 > +iort Input Base: 0x00000002 > +iort ID Count: 0x00000003 > +iort Output Base: 0x00000004 > +iort Output Reference: 0x00000005 > +iort Flags: 0x00000001 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0x50 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x00000000f and should be zero. > +iort FAILED [HIGH] IORTCPCIRootComplexAtsAttrInvalid: Test 1, > +iort IORT PCI Root Complex Node ATS Attribute is 0x3 and was > +iort expecting either 0 (root complex supports ATS) or 1 (root > +iort complex does not support ATS). > +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT > +iort PCI Root Complex Node Coherent Attribute is 0xd1 and > +iort should be either 0 (device is fully coherent) or 1 (device > +iort is not coherent). > +iort FAILED [HIGH] IORTAllocHintsReservedNonZero: Test 1, IORT > +iort PCI Root Complex Node Allocation Hints reserved bits [7:4] > +iort are reserved and should be zero. > +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT PCI > +iort Root Complex Node Node Reserved is 0x8000 and is reserved > +iort and should be zero. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 1 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort > +iort IORT SMMU node: > +iort Type: 0x03 > +iort Length: 0x0094 > +iort Revision: 0xa0 > +iort Reserved: 0x00008100 > +iort Number of ID mappings: 0x00000001 > +iort Reference to ID Array: 0x00000090 > +iort Base Address: 0xf01030c020908000 > +iort Span: 0x0000000020000000 > +iort Model: 0x00000004 > +iort Flags: 0x000000aa > +iort Global Intr. Offset: 0x0000003c > +iort Number of Context Intr.: 0x00000004 > +iort Context Intr. Offset: 0x00000050 > +iort Number of PMU Intr.: 0x00000005 > +iort PMU Intr. Offset: 0x00000070 > +iort Global Interrupt Array: > +iort SMMU_NSgIrpt: 0x000000f0 > +iort SMMU_NSgIrpt Flags: 0x00000002 > +iort SMMU_NSgCfgIrpt: 0x000000f1 > +iort SMMU_NSgCfgIrpt Flags: 0x00000004 > +iort Context Interrupt Array: > +iort GSIV: 0xe0800000 > +iort Interrupt Flags: 0x00000008 > +iort GSIV: 0xd0700000 > +iort Interrupt Flags: 0x00000010 > +iort GSIV: 0xc0600000 > +iort Interrupt Flags: 0x00000020 > +iort GSIV: 0xb0500000 > +iort Interrupt Flags: 0x00000040 > +iort PMU Interrupt Array: > +iort GSIV: 0xf00080c0 > +iort Interrupt Flags: 0x000000aa > +iort GSIV: 0xf0008080 > +iort Interrupt Flags: 0x000000ab > +iort GSIV: 0xf0008040 > +iort Interrupt Flags: 0x00000092 > +iort GSIV: 0xf0008000 > +iort Interrupt Flags: 0x00000004 > +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node > +iort Revision field is 0xa0 and should be zero. > +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node > +iort Reserved field is 0x000008100 and should be zero. > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_NsgIrpt Flags field reserved bits [31:1] should > +iort be all zero, got 0x2 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_NsgCfgIrpt Flags field reserved bits [31:1] > +iort should be all zero, got 0x4 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x8 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x10 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x20 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x40 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0xaa > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0xab > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x92 > +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, > +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be > +iort all zero, got 0x4 > +iort FAILED [HIGH] IORTSmmuInterruptsOutsideTable: Test 1, IORT > +iort SMMU Interrupt 4 is outside the IORT ACPI table. Either > +iort the offset is incorrect or the IORT table size is too > +iort small. > +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID > +iort Mapping 0 is outside the IORT ACPI table. Either the > +iort offset is incorrect or the IORT table size or the node is > +iort too small. > +iort FAILED [HIGH] IORTSmmuInvalidModel: Test 1, IORT SMMU > +iort Model is 0x4 and was expecting a model value 0 to 3. > +iort FAILED [HIGH] IORTSmmuReservedFlags: Test 1, IORT SMMU > +iort Reserved Flags is 0xaa and has some reserved bits [31:2] > +iort set when they should be zero. > +iort > +iort FAILED [HIGH] IORTInvalidType: Test 1, IORT Type 0xff is > +iort invalid, aborting check > +iort > +iort ========================================================== > +iort 0 passed, 36 failed, 0 warning, 0 aborted, 0 skipped, 0 > +iort info only. > +iort ========================================================== > diff --git a/fwts-test/iort-0001/test-0001.sh b/fwts-test/iort-0001/test-0001.sh > new file mode 100755 > index 0000000..8c18dc1 > --- /dev/null > +++ b/fwts-test/iort-0001/test-0001.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > +# > +TEST="Test apci table against IORT" > +NAME=test-0001.sh > +TMPLOG=$TMP/iort.log.$$ > + > +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0001.log iort - | cut -c7- | grep "^iort" > $TMPLOG > +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-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/iort-0001/test-0002.sh b/fwts-test/iort-0001/test-0002.sh > new file mode 100755 > index 0000000..dd1fe64 > --- /dev/null > +++ b/fwts-test/iort-0001/test-0002.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > +# > +TEST="Test apci table against invalid IORT" > +NAME=test-0001.sh > +TMPLOG=$TMP/iort.log.$$ > + > +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0002.log iort - | cut -c7- | grep "^iort" > $TMPLOG > +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-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: Alex Hung <alex.hung@canonical.com>
diff --git a/Makefile.am b/Makefile.am index 0cf0db5..d8083b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,6 +73,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/facs-0001/test-0002.sh \ fwts-test/hest-0001/test-0001.sh \ fwts-test/hest-0001/test-0002.sh \ + fwts-test/iort-0001/test-0001.sh \ + fwts-test/iort-0001/test-0002.sh \ fwts-test/klog-0001/test-0001.sh \ fwts-test/klog-0001/test-0002.sh \ fwts-test/klog-0001/test-0003.sh \ diff --git a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log index aaf1291..9f26b73 100644 --- a/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log +++ b/fwts-test/arg-show-tests-0001/arg-show-tests-0001.log @@ -19,6 +19,7 @@ ACPI tests: gtdt GTDT Generic Timer Description Table test. hest HEST Hardware Error Source Table test. hpet HPET IA-PC High Precision Event Timer Table tests. + iort IORT IO Remapping Table test. lpit LPIT Low Power Idle Table test. madt MADT Multiple APIC Description Table test. mcfg MCFG PCI Express* memory mapped config space test. @@ -74,6 +75,7 @@ Batch tests: hda_audio HDA Audio Pin Configuration test. hest HEST Hardware Error Source Table test. hpet HPET IA-PC High Precision Event Timer Table tests. + iort IORT IO Remapping Table test. klog Scan kernel log for errors and warnings. lpit LPIT Low Power Idle Table test. madt MADT Multiple APIC Description Table test. diff --git a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log index 43c4064..0d8d6b4 100644 --- a/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log +++ b/fwts-test/arg-show-tests-full-0001/arg-show-tests-full-0001.log @@ -46,6 +46,8 @@ ACPI tests: Test HPET base in HPET table. Test HPET base in DSDT and/or SSDT. Test HPET configuration. + iort (1 test): + IORT IO Remapping Table test. lpit (1 test): LPIT Low Power Idle Table test. madt (1 test): @@ -351,6 +353,8 @@ Batch tests: Test HPET base in HPET table. Test HPET base in DSDT and/or SSDT. Test HPET configuration. + iort (1 test): + IORT IO Remapping Table test. klog (1 test): Kernel log error check. lpit (1 test): @@ -820,4 +824,4 @@ UEFI tests: Test UEFI RT service query variable info interface stress test. Test UEFI RT service get variable interface, invalid parameters. -Total of 664 tests +Total of 666 tests diff --git a/fwts-test/iort-0001/acpidump-0001.log b/fwts-test/iort-0001/acpidump-0001.log new file mode 100644 index 0000000..87e9e14 --- /dev/null +++ b/fwts-test/iort-0001/acpidump-0001.log @@ -0,0 +1,51 @@ +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 .... + +IORT @ 0x00000000 + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ + 0020: 01 00 00 00 04 00 00 00 30 00 00 00 00 00 00 00 ................ + 0030: 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0040: 03 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ + 0050: 01 50 00 00 00 00 00 00 02 00 00 00 24 00 00 00 ................ + 0060: 00 00 00 00 01 00 00 00 0f 00 00 03 20 54 45 53 .............TES + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ + 00a0: 02 40 00 00 00 00 00 00 01 00 00 00 20 00 00 00 ................ + 00b0: 01 00 00 00 0e 00 00 03 01 00 00 00 ff ee bb c0 ................ + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00e0: 03 a4 00 00 00 00 00 00 01 00 00 00 90 00 00 00 ................ + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ + 0100: 02 00 00 00 01 00 00 00 3c 00 00 00 04 00 00 00 ................ + 0110: 50 00 00 00 04 00 00 00 70 00 00 00 f0 00 00 00 ................ + 0120: 01 00 00 00 f1 00 00 00 01 00 00 00 00 00 00 00 ................ + 0130: 00 00 80 e0 01 00 00 00 00 00 70 d0 01 00 00 00 ................ + 0140: 00 00 60 c0 01 00 00 00 00 00 50 b0 01 00 00 00 ................ + 0150: c0 80 00 f0 01 00 00 00 80 80 00 f0 01 00 00 00 ................ + 0160: 40 80 00 f0 01 00 00 00 00 80 00 f0 01 00 00 00 ................ + 0170: 00 00 ff ff 01 00 00 00 20 30 40 50 00 00 00 00 ................ + 0180: 01 00 00 00 .... diff --git a/fwts-test/iort-0001/acpidump-0002.log b/fwts-test/iort-0001/acpidump-0002.log new file mode 100644 index 0000000..9729b06 --- /dev/null +++ b/fwts-test/iort-0001/acpidump-0002.log @@ -0,0 +1,51 @@ +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 .... + +IORT @ 0x00000000 + 0000: 49 4f 52 54 84 01 00 00 01 06 50 54 4c 20 20 20 IORT............ + 0010: 57 48 45 41 50 54 4c 20 00 00 04 06 50 54 4c 20 ................ + 0020: 01 00 00 00 05 00 00 00 30 00 00 00 00 00 00 00 ................ + 0030: 00 20 00 03 ff ff ff ff 80 00 00 00 e0 00 00 00 ................ + 0040: 04 00 00 00 04 03 02 01 08 07 06 05 0c 0b 0a 09 ................ + 0050: 01 50 00 02 01 f0 00 00 03 00 00 00 24 00 00 00 ................ + 0060: ff ff ff ff 04 00 00 00 0f ad de 03 20 54 45 53 .............TES + 0070: 54 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 T............... + 0080: ff ff ff ff 01 00 00 00 02 00 00 00 02 00 00 00 ................ + 0090: 03 00 00 00 88 88 88 88 01 00 00 00 00 00 00 00 ................ + 00a0: 02 40 00 50 0f 00 00 00 10 00 00 00 20 00 00 00 ................ + 00b0: d1 00 00 00 fe 00 80 03 03 00 00 00 ff ee bb c0 ................ + 00c0: 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 ................ + 00d0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00e0: 03 94 00 a0 00 81 00 00 01 00 00 00 90 00 00 00 ................ + 00f0: 00 80 90 20 c0 30 10 f0 00 00 00 20 00 00 00 00 ................ + 0100: 04 00 00 00 aa 00 00 00 3c 00 00 00 04 00 00 00 ................ + 0110: 50 00 00 00 05 00 00 00 70 00 00 00 f0 00 00 00 ................ + 0120: 02 00 00 00 f1 00 00 00 04 00 00 00 00 00 00 00 ................ + 0130: 00 00 80 e0 08 00 00 00 00 00 70 d0 10 00 00 00 ................ + 0140: 00 00 60 c0 20 00 00 00 00 00 50 b0 40 00 00 00 ................ + 0150: c0 80 00 f0 aa 00 00 00 80 80 00 f0 ab 00 00 00 ................ + 0160: 40 80 00 f0 92 00 00 00 00 80 00 f0 04 00 00 00 ................ + 0170: 00 00 ff ff ff 00 00 00 20 30 40 50 00 00 00 00 ................ + 0180: 01 00 00 00 .... diff --git a/fwts-test/iort-0001/iort-0001.log b/fwts-test/iort-0001/iort-0001.log new file mode 100644 index 0000000..e8bda77 --- /dev/null +++ b/fwts-test/iort-0001/iort-0001.log @@ -0,0 +1,119 @@ +iort iort: IORT IO Remapping Table test. +iort ---------------------------------------------------------- +iort Test 1 of 1: IORT IO Remapping Table test. +iort IORT IO Remapping Table test +iort Number of IORT Nodes: 0x0004 +iort IORT Node Array Offset: 0x0030 +iort Reserved: 0x0000 +iort +iort IORT ITS Group Node: +iort Type: 0x00 +iort Length: 0x0020 +iort Revision: 0x00 +iort Reserved: 0x00000000 +iort Number of ID mappings: 0x00000000 +iort Reference to ID Array: 0x00000000 +iort Number of ITSs: 0x00000003 +iort GIC ITS Identifier: 0x01020304 +iort GIC ITS Identifier: 0x05060708 +iort GIC ITS Identifier: 0x090a0b0c +iort +iort IORT Named Component Node: +iort Type: 0x01 +iort Length: 0x0050 +iort Revision: 0x00 +iort Reserved: 0x00000000 +iort Number of ID mappings: 0x00000002 +iort Reference to ID Array: 0x00000024 +iort Node Flags: 0x00000000 +iort Cache Coherent Attribute: 0x00000001 +iort Allocation Hints: 0x0f +iort Reserved: 0x0000 +iort Memory Access Flags 0x03 +iort Device Memory Addr. Size: 0x20 +iort Device Object Name: TEST +iort ID Mapping 0 +iort Input Base: 0x00000001 +iort ID Count: 0x00000001 +iort Output Base: 0x00000002 +iort Output Reference: 0xffffffff +iort Flags: 0x00000001 +iort ID Mapping 1 +iort Input Base: 0x00000002 +iort ID Count: 0x00000002 +iort Output Base: 0x00000003 +iort Output Reference: 0x88888888 +iort Flags: 0x00000001 +iort +iort IORT PCI Root Complex Node: +iort Type: 0x02 +iort Length: 0x0040 +iort Revision: 0x00 +iort Reserved: 0x00000000 +iort Number of ID mappings: 0x00000001 +iort Reference to ID Array: 0x00000020 +iort Cache Coherent Attribute: 0x00000001 +iort Allocation Hints: 0x0e +iort Reserved: 0x0000 +iort Memory Access Flags 0x0003 +iort ATS Attribute: 0x00000001 +iort PCI Segment Number: 0xc0bbeeff +iort ID Mapping 0 +iort Input Base: 0x00000002 +iort ID Count: 0x00000003 +iort Output Base: 0x00000004 +iort Output Reference: 0x00000005 +iort Flags: 0x00000001 +iort +iort IORT SMMU node: +iort Type: 0x03 +iort Length: 0x00a4 +iort Revision: 0x00 +iort Reserved: 0x00000000 +iort Number of ID mappings: 0x00000001 +iort Reference to ID Array: 0x00000090 +iort Base Address: 0xf01030c020908000 +iort Span: 0x0000000020000000 +iort Model: 0x00000002 +iort Flags: 0x00000001 +iort Global Intr. Offset: 0x0000003c +iort Number of Context Intr.: 0x00000004 +iort Context Intr. Offset: 0x00000050 +iort Number of PMU Intr.: 0x00000004 +iort PMU Intr. Offset: 0x00000070 +iort Global Interrupt Array: +iort SMMU_NSgIrpt: 0x000000f0 +iort SMMU_NSgIrpt Flags: 0x00000001 +iort SMMU_NSgCfgIrpt: 0x000000f1 +iort SMMU_NSgCfgIrpt Flags: 0x00000001 +iort Context Interrupt Array: +iort GSIV: 0xe0800000 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xd0700000 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xc0600000 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xb0500000 +iort Interrupt Flags: 0x00000001 +iort PMU Interrupt Array: +iort GSIV: 0xf00080c0 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xf0008080 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xf0008040 +iort Interrupt Flags: 0x00000001 +iort GSIV: 0xf0008000 +iort Interrupt Flags: 0x00000001 +iort ID Mapping 0 +iort Input Base: 0xffff0000 +iort ID Count: 0x00000001 +iort Output Base: 0x50403020 +iort Output Reference: 0x00000000 +iort Flags: 0x00000001 +iort +iort PASSED: Test 1, No issues found in IORT. +iort +iort ========================================================== +iort 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +iort info only. +iort ========================================================== diff --git a/fwts-test/iort-0001/iort-0002.log b/fwts-test/iort-0001/iort-0002.log new file mode 100644 index 0000000..a726735 --- /dev/null +++ b/fwts-test/iort-0001/iort-0002.log @@ -0,0 +1,217 @@ +iort iort: IORT IO Remapping Table test. +iort ---------------------------------------------------------- +iort Test 1 of 1: IORT IO Remapping Table test. +iort IORT IO Remapping Table test +iort Number of IORT Nodes: 0x0005 +iort IORT Node Array Offset: 0x0030 +iort Reserved: 0x0000 +iort +iort IORT ITS Group Node: +iort Type: 0x00 +iort Length: 0x0020 +iort Revision: 0x03 +iort Reserved: 0xffffffff +iort Number of ID mappings: 0x00000080 +iort Reference to ID Array: 0x000000e0 +iort Number of ITSs: 0x00000004 +iort FAILED [HIGH] IORTItsIdArrayOutsideTable: Test 1, IORT ITS +iort Identifier Array end is outside the IORT ACPI table. +iort Either the Number of ID mappings is too large or the IORT +iort table size or ITS Group Node is too small. +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node +iort Revision field is 0x03 and should be zero. +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node +iort Reserved field is 0x0ffffffff and should be zero. +iort FAILED [LOW] IORTNodeMappingsCountNonZero: Test 1, IORT +iort Node Number of ID Mappings field is 0x000000080 and should +iort be zero for this node type. +iort FAILED [LOW] IORTNodeRefToIdArrayNonZero: Test 1, IORT +iort Node Referenced to ID Array field is 0x0000000e0 and +iort should be zero for this node type. +iort +iort IORT Named Component Node: +iort Type: 0x01 +iort Length: 0x0050 +iort Revision: 0x02 +iort Reserved: 0x0000f001 +iort Number of ID mappings: 0x00000003 +iort Reference to ID Array: 0x00000024 +iort Node Flags: 0xffffffff +iort Cache Coherent Attribute: 0x00000004 +iort Allocation Hints: 0x0f +iort Reserved: 0xdead +iort Memory Access Flags 0x03 +iort Device Memory Addr. Size: 0x20 +iort Device Object Name: TEST +iort ID Mapping 0 +iort Input Base: 0x00000001 +iort ID Count: 0x00000001 +iort Output Base: 0x00000002 +iort Output Reference: 0xffffffff +iort Flags: 0x00000001 +iort ID Mapping 1 +iort Input Base: 0x00000002 +iort ID Count: 0x00000002 +iort Output Base: 0x00000003 +iort Output Reference: 0x88888888 +iort Flags: 0x00000001 +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node +iort Revision field is 0x02 and should be zero. +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node +iort Reserved field is 0x00000f001 and should be zero. +iort FAILED [HIGH] IORTNamedComponentNodeFlagsNonZero: Test 1, +iort IORT Named Component Node Flags is 0xffffffff and is +iort reserved and should be zero. +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT +iort Named Component Node Coherent Attribute is 0x4 and should +iort be either 0 (device is fully coherent) or 1 (device is not +iort coherent). +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT +iort Named Component Node Node Reserved is 0xdead and is +iort reserved and should be zero. +iort FAILED [HIGH] IORTMemAttrInvalid: Test 1, IORT Named +iort Component Node Memory Attributes are illegal, CCA cannot +iort be 0 if CPM and DACS are 1. If the device has a coherent +iort path to memory and natively outputs IWB-OWB-ISH then CCA +iort must be 1. +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID +iort Mapping 2 is outside the IORT ACPI table. Either the +iort offset is incorrect or the IORT table size or the node is +iort too small. +iort +iort IORT PCI Root Complex Node: +iort Type: 0x02 +iort Length: 0x0040 +iort Revision: 0x50 +iort Reserved: 0x0000000f +iort Number of ID mappings: 0x00000010 +iort Reference to ID Array: 0x00000020 +iort Cache Coherent Attribute: 0x000000d1 +iort Allocation Hints: 0xfe +iort Reserved: 0x8000 +iort Memory Access Flags 0x0003 +iort ATS Attribute: 0x00000003 +iort PCI Segment Number: 0xc0bbeeff +iort ID Mapping 0 +iort Input Base: 0x00000002 +iort ID Count: 0x00000003 +iort Output Base: 0x00000004 +iort Output Reference: 0x00000005 +iort Flags: 0x00000001 +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node +iort Revision field is 0x50 and should be zero. +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node +iort Reserved field is 0x00000000f and should be zero. +iort FAILED [HIGH] IORTCPCIRootComplexAtsAttrInvalid: Test 1, +iort IORT PCI Root Complex Node ATS Attribute is 0x3 and was +iort expecting either 0 (root complex supports ATS) or 1 (root +iort complex does not support ATS). +iort FAILED [HIGH] IORTCacheCoherentAttrInvalid: Test 1, IORT +iort PCI Root Complex Node Coherent Attribute is 0xd1 and +iort should be either 0 (device is fully coherent) or 1 (device +iort is not coherent). +iort FAILED [HIGH] IORTAllocHintsReservedNonZero: Test 1, IORT +iort PCI Root Complex Node Allocation Hints reserved bits [7:4] +iort are reserved and should be zero. +iort FAILED [MEDIUM] IORTNodeReservedNonZero: Test 1, IORT PCI +iort Root Complex Node Node Reserved is 0x8000 and is reserved +iort and should be zero. +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID +iort Mapping 1 is outside the IORT ACPI table. Either the +iort offset is incorrect or the IORT table size or the node is +iort too small. +iort +iort IORT SMMU node: +iort Type: 0x03 +iort Length: 0x0094 +iort Revision: 0xa0 +iort Reserved: 0x00008100 +iort Number of ID mappings: 0x00000001 +iort Reference to ID Array: 0x00000090 +iort Base Address: 0xf01030c020908000 +iort Span: 0x0000000020000000 +iort Model: 0x00000004 +iort Flags: 0x000000aa +iort Global Intr. Offset: 0x0000003c +iort Number of Context Intr.: 0x00000004 +iort Context Intr. Offset: 0x00000050 +iort Number of PMU Intr.: 0x00000005 +iort PMU Intr. Offset: 0x00000070 +iort Global Interrupt Array: +iort SMMU_NSgIrpt: 0x000000f0 +iort SMMU_NSgIrpt Flags: 0x00000002 +iort SMMU_NSgCfgIrpt: 0x000000f1 +iort SMMU_NSgCfgIrpt Flags: 0x00000004 +iort Context Interrupt Array: +iort GSIV: 0xe0800000 +iort Interrupt Flags: 0x00000008 +iort GSIV: 0xd0700000 +iort Interrupt Flags: 0x00000010 +iort GSIV: 0xc0600000 +iort Interrupt Flags: 0x00000020 +iort GSIV: 0xb0500000 +iort Interrupt Flags: 0x00000040 +iort PMU Interrupt Array: +iort GSIV: 0xf00080c0 +iort Interrupt Flags: 0x000000aa +iort GSIV: 0xf0008080 +iort Interrupt Flags: 0x000000ab +iort GSIV: 0xf0008040 +iort Interrupt Flags: 0x00000092 +iort GSIV: 0xf0008000 +iort Interrupt Flags: 0x00000004 +iort FAILED [LOW] IORTNodeRevisionNonZero: Test 1, IORT Node +iort Revision field is 0xa0 and should be zero. +iort FAILED [LOW] IORTNodeReservedNonZero: Test 1, IORT Node +iort Reserved field is 0x000008100 and should be zero. +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_NsgIrpt Flags field reserved bits [31:1] should +iort be all zero, got 0x2 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_NsgCfgIrpt Flags field reserved bits [31:1] +iort should be all zero, got 0x4 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x8 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x10 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x20 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x40 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0xaa +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0xab +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x92 +iort FAILED [MEDIUM] IORTSMMUIntrFlagsReservedNonZero: Test 1, +iort IORT SMMU_GSV Flags field reserved bits [31:1] should be +iort all zero, got 0x4 +iort FAILED [HIGH] IORTSmmuInterruptsOutsideTable: Test 1, IORT +iort SMMU Interrupt 4 is outside the IORT ACPI table. Either +iort the offset is incorrect or the IORT table size is too +iort small. +iort FAILED [HIGH] IORTIdMappingOutsideTable: Test 1, IORT ID +iort Mapping 0 is outside the IORT ACPI table. Either the +iort offset is incorrect or the IORT table size or the node is +iort too small. +iort FAILED [HIGH] IORTSmmuInvalidModel: Test 1, IORT SMMU +iort Model is 0x4 and was expecting a model value 0 to 3. +iort FAILED [HIGH] IORTSmmuReservedFlags: Test 1, IORT SMMU +iort Reserved Flags is 0xaa and has some reserved bits [31:2] +iort set when they should be zero. +iort +iort FAILED [HIGH] IORTInvalidType: Test 1, IORT Type 0xff is +iort invalid, aborting check +iort +iort ========================================================== +iort 0 passed, 36 failed, 0 warning, 0 aborted, 0 skipped, 0 +iort info only. +iort ========================================================== diff --git a/fwts-test/iort-0001/test-0001.sh b/fwts-test/iort-0001/test-0001.sh new file mode 100755 index 0000000..8c18dc1 --- /dev/null +++ b/fwts-test/iort-0001/test-0001.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test apci table against IORT" +NAME=test-0001.sh +TMPLOG=$TMP/iort.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0001.log iort - | cut -c7- | grep "^iort" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-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/iort-0001/test-0002.sh b/fwts-test/iort-0001/test-0002.sh new file mode 100755 index 0000000..dd1fe64 --- /dev/null +++ b/fwts-test/iort-0001/test-0002.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +TEST="Test apci table against invalid IORT" +NAME=test-0001.sh +TMPLOG=$TMP/iort.log.$$ + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/iort-0001/acpidump-0002.log iort - | cut -c7- | grep "^iort" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/iort-0001/iort-0002.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret