summaryrefslogtreecommitdiff
path: root/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c')
-rw-r--r--Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c
index 07ec3d1972..f9df81e836 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c
@@ -53,6 +53,11 @@ TestPointCheckPciBusMaster (
VOID
);
+EFI_STATUS
+TestPointVtdEngine (
+ VOID
+ );
+
GLOBAL_REMOVE_IF_UNREFERENCED ADAPTER_INFO_PLATFORM_TEST_POINT_STRUCT mTestPointStruct = {
PLATFORM_TEST_POINT_VERSION,
PLATFORM_TEST_POINT_ROLE_PLATFORM_IBV,
@@ -234,6 +239,43 @@ TestPointMemoryDiscoveredFvInfoFunctional (
EFI_STATUS
EFIAPI
+TestPointMemoryDiscoveredDmaProtectionEnabled (
+ VOID
+ )
+{
+ EFI_STATUS Status;
+ BOOLEAN Result;
+ UINT8 *FeatureImplemented;
+
+ FeatureImplemented = GetFeatureImplemented ();
+
+ if ((FeatureImplemented[1] & TEST_POINT_BYTE1_MEMORY_DISCOVERED_DMA_PROTECTION_ENABLED) == 0) {
+ return EFI_SUCCESS;
+ }
+
+ DEBUG ((DEBUG_INFO, "======== TestPointMemoryDiscoveredDmaProtectionEnabled - Enter\n"));
+
+ Result = TRUE;
+ Status = TestPointVtdEngine ();
+ if (EFI_ERROR(Status)) {
+ Result = FALSE;
+ }
+
+ if (Result) {
+ TestPointLibSetFeaturesVerified (
+ PLATFORM_TEST_POINT_ROLE_PLATFORM_IBV,
+ NULL,
+ 1,
+ TEST_POINT_BYTE1_MEMORY_DISCOVERED_DMA_PROTECTION_ENABLED
+ );
+ }
+
+ DEBUG ((DEBUG_INFO, "======== TestPointMemoryDiscoveredDmaProtectionEnabled - Exit\n"));
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
TestPointEndOfPeiSystemResourceFunctional (
VOID
)