From: "Sheng Wei" <w.sheng@intel.com>
To: devel@edk2.groups.io
Cc: Ray Ni <ray.ni@intel.com>,
Rangasai V Chaganty <rangasai.v.chaganty@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Jenny Huang <jenny.huang@intel.com>,
Kowalewski Robert <robert.kowalewski@intel.com>,
Feng Roger <roger.feng@intel.com>
Subject: [PATCH] Silicon/Intel: Dump DMAR SATC Table
Date: Tue, 22 Dec 2020 15:07:38 +0800 [thread overview]
Message-ID: <20201222070738.17948-1-w.sheng@intel.com> (raw)
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@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Kowalewski Robert <robert.kowalewski@intel.com>
Cc: Feng Roger <roger.feng@intel.com>
Reviewed-by: Jenny Huang <jenny.huang@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
reply other threads:[~2020-12-22 7:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201222070738.17948-1-w.sheng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox