[edk2-devel] [PATCH] Silicon/Intel: Dump DMAR SATC Table
Sheng Wei
w.sheng at intel.com
Tue Dec 22 07:07:38 UTC 2020
SoC Integrated Address Translation Cache (SATC) reporting structure is one
of the Remapping Structure, which is imported since Intel(R) Virtualization
Technology for Directed I/O (VT-D) Architecture Specification v3.2.
IntelVtdDxe driver will dump the DMAR SATC struct.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3115
Signed-off-by: Sheng Wei <w.sheng at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty at intel.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Jenny Huang <jenny.huang at intel.com>
Cc: Kowalewski Robert <robert.kowalewski at intel.com>
Cc: Feng Roger <roger.feng at intel.com>
Reviewed-by: Jenny Huang <jenny.huang at intel.com>
---
.../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 67 ++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
index 52bc1890..2d9b4374 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
@@ -122,6 +122,70 @@ DumpDmarDeviceScopeEntry (
return;
}
+/**
+ Dump DMAR SATC table.
+
+ @param[in] Satc DMAR SATC table
+**/
+VOID
+DumpDmarSatc (
+ IN EFI_ACPI_DMAR_SATC_HEADER *Satc
+ )
+{
+ EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *DmarDeviceScopeEntry;
+ INTN SatcLen;
+
+ if (Satc == NULL) {
+ return;
+ }
+
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ " * ACPI Soc Integrated Address Translation Cache reporting Structure *\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ (sizeof(UINTN) == sizeof(UINT64)) ?
+ " SATC address ........................................... 0x%016lx\n" :
+ " SATC address ........................................... 0x%08x\n",
+ Satc
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Type ................................................. 0x%04x\n",
+ Satc->Header.Type
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Length ............................................... 0x%04x\n",
+ Satc->Header.Length
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Flags ................................................ 0x%02x\n",
+ Satc->Flags
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Segment Number ....................................... 0x%04x\n",
+ Satc->SegmentNumber
+ ));
+
+ SatcLen = Satc->Header.Length - sizeof(EFI_ACPI_DMAR_SATC_HEADER);
+ DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)(Satc + 1);
+ while (SatcLen > 0) {
+ DumpDmarDeviceScopeEntry (DmarDeviceScopeEntry);
+ SatcLen -= DmarDeviceScopeEntry->Length;
+ DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)((UINTN)DmarDeviceScopeEntry + DmarDeviceScopeEntry->Length);
+ }
+
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n\n"
+ ));
+
+ return;
+}
+
/**
Dump DMAR ANDD table.
@@ -516,6 +580,9 @@ DumpAcpiDMAR (
case EFI_ACPI_DMAR_TYPE_ANDD:
DumpDmarAndd ((EFI_ACPI_DMAR_ANDD_HEADER *)DmarHeader);
break;
+ case EFI_ACPI_DMAR_TYPE_SATC:
+ DumpDmarSatc ((EFI_ACPI_DMAR_SATC_HEADER *)DmarHeader);
+ break;
default:
break;
}
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69373): https://edk2.groups.io/g/devel/message/69373
Mute This Topic: https://groups.io/mt/79144566/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list