From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.8451.1608620865104881781 for ; Mon, 21 Dec 2020 23:07:45 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: w.sheng@intel.com) IronPort-SDR: 3c7Uu7GQES4TZp7XNIvoLhZTC160MZpZxpUhNK+7LEnStdsDW0STNZR+tws+C+r21qn8RAMn/v 0JWeVYOag0jA== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="175977755" X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="175977755" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 23:07:43 -0800 IronPort-SDR: ygYpcCIa7nb5JWLUpSaQzh47oCoAncqBT44z6ejw68/0fiKuGZ5lUbw0J15SCQtkcLcleroja5 k4WWgVa9Avdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="416347157" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga001.jf.intel.com with ESMTP; 21 Dec 2020 23:07:41 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Kowalewski Robert , Feng Roger Subject: [PATCH] Silicon/Intel: Dump DMAR SATC Table Date: Tue, 22 Dec 2020 15:07:38 +0800 Message-Id: <20201222070738.17948-1-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 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 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jiewen Yao Cc: Jenny Huang Cc: Kowalewski Robert Cc: Feng Roger Reviewed-by: Jenny Huang --- .../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