diff options
author | Jiewen Yao <jiewen.yao@intel.com> | 2017-11-06 15:07:51 +0800 |
---|---|---|
committer | Jiewen Yao <jiewen.yao@intel.com> | 2017-11-13 14:06:28 +0800 |
commit | 8dffd33247d6dac1c4a5732d320c4ff4bc22beaf (patch) | |
tree | afd477b94ce4275fd731b628f3afbc89506451c4 /Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c | |
parent | b170dcb967250308cda829d1047aef8a37089cd4 (diff) | |
download | edk2-platforms-8dffd33247d6dac1c4a5732d320c4ff4bc22beaf.tar.xz |
Add DMA protection check test point.
Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Brett Wang <brett.wang@intel.com>
Cc: Daocheng Bu <daocheng.bu@intel.com>
Cc: Isaac W Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
Diffstat (limited to 'Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c')
-rw-r--r-- | Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.c | 42 |
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
)
|