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>,
Jenny Huang <jenny.huang@intel.com>,
Robert Kowalewski <robert.kowalewski@intel.com>
Subject: [PATCH] IntelSiliconPkg/VTd: Add DMAR SIDP Table dumpping
Date: Wed, 17 Aug 2022 14:20:06 +0800 [thread overview]
Message-ID: <20220817062006.1617-1-w.sheng@intel.com> (raw)
VT-d spec 4.0 has added a new structure called SIDP which is more
generic to describe special properties of integrated devices.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Signed-off-by: Sheng Wei <w.sheng@intel.com>
---
.../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
index 75fbd53ed..42e1b1449 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
@@ -93,6 +93,10 @@ DumpDmarDeviceScopeEntry (
" Length ............................................. 0x%02x\n",
DmarDeviceScopeEntry->Length
));
+ DEBUG ((DEBUG_INFO,
+ " Flags .............................................. 0x%02x\n",
+ DmarDeviceScopeEntry->Flags
+ ));
DEBUG ((DEBUG_INFO,
" Enumeration ID ..................................... 0x%02x\n",
DmarDeviceScopeEntry->EnumerationId
@@ -122,6 +126,66 @@ DumpDmarDeviceScopeEntry (
return;
}
+/**
+ Dump DMAR SIDP table.
+
+ @param[in] Sidp DMAR SIDP table
+**/
+VOID
+DumpDmarSidp (
+ IN EFI_ACPI_DMAR_SIDP_HEADER *Sidp
+ )
+{
+ EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *DmarDeviceScopeEntry;
+ INTN SidpLen;
+
+ if (Sidp == NULL) {
+ return;
+ }
+
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ " * SoC Integrated Device Property Reporting Structure *\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n"
+ ));
+ DEBUG ((DEBUG_INFO,
+ (sizeof(UINTN) == sizeof(UINT64)) ?
+ " SIDP address ........................................... 0x%016lx\n" :
+ " SIDP address ........................................... 0x%08x\n",
+ Sidp
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Type ................................................. 0x%04x\n",
+ Sidp->Header.Type
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Length ............................................... 0x%04x\n",
+ Sidp->Header.Length
+ ));
+ DEBUG ((DEBUG_INFO,
+ " Segment Number ....................................... 0x%04x\n",
+ Sidp->SegmentNumber
+ ));
+
+ SidpLen = Sidp->Header.Length - sizeof(EFI_ACPI_DMAR_SIDP_HEADER);
+ DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)(Sidp + 1);
+ while (SidpLen > 0) {
+ DumpDmarDeviceScopeEntry (DmarDeviceScopeEntry);
+ SidpLen -= DmarDeviceScopeEntry->Length;
+ DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)((UINTN)DmarDeviceScopeEntry + DmarDeviceScopeEntry->Length);
+ }
+
+ DEBUG ((DEBUG_INFO,
+ " ***************************************************************************\n\n"
+ ));
+
+ return;
+}
+
/**
Dump DMAR SATC table.
@@ -472,6 +536,10 @@ DumpDmarDrhd (
" Flags ................................................ 0x%02x\n",
Drhd->Flags
));
+ DEBUG ((DEBUG_INFO,
+ " Size ................................................. 0x%02x\n",
+ Drhd->Size
+ ));
DEBUG ((DEBUG_INFO,
" INCLUDE_PCI_ALL .................................... 0x%02x\n",
Drhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL
@@ -583,7 +651,11 @@ DumpAcpiDMAR (
case EFI_ACPI_DMAR_TYPE_SATC:
DumpDmarSatc ((EFI_ACPI_DMAR_SATC_HEADER *)DmarHeader);
break;
+ case EFI_ACPI_DMAR_TYPE_SIDP:
+ DumpDmarSidp ((EFI_ACPI_DMAR_SIDP_HEADER *)DmarHeader);
+ break;
default:
+ DEBUG ((DEBUG_INFO, "Unknown DMAR Table Type : %d\n", DmarHeader->Type));
break;
}
DmarLen -= DmarHeader->Length;
--
2.26.2.windows.1
next reply other threads:[~2022-08-17 6:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 6:20 Sheng Wei [this message]
2022-08-18 5:17 ` [PATCH] IntelSiliconPkg/VTd: Add DMAR SIDP Table dumpping Robert Kowalewski
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=20220817062006.1617-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