]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg/Tcg: Add use case for new Perf macro
authorDandan Bi <dandan.bi@intel.com>
Tue, 17 Jul 2018 05:09:02 +0000 (13:09 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 26 Jul 2018 05:37:59 +0000 (13:37 +0800)
Add an example case for the usage of
PERF_CALLBACK_BEGIN/PERF_CALLBACK_END

Cc: Liming Gao <liming.gao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Chao Zhang<chao.b.zhang@intel.com>
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
SecurityPkg/Tcg/TcgPei/TcgPei.c
SecurityPkg/Tcg/TcgPei/TcgPei.inf

index 74cdd1fa88f0a182d1ca4964b41f882a99e5b4a3..09ef0c70a50b8b2b06471212947376df3e85d635 100644 (file)
@@ -161,6 +161,8 @@ EndofPeiSignalNotifyCallBack (
 \r
   MeasuredHobData = NULL;\r
 \r
+  PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);\r
+\r
   //\r
   // Create a Guid hob to save all measured Fv\r
   //\r
@@ -186,6 +188,8 @@ EndofPeiSignalNotifyCallBack (
     CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));\r
   }\r
 \r
+  PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 1ed11a1b2964bd50357d0cf7065e32fcdae73452..d07047580c5b2d9eb0cd4a7bf7cfa8237b120f52 100644 (file)
@@ -41,6 +41,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/Tpm12DeviceLib.h>\r
 #include <Library/Tpm12CommandLib.h>\r
 #include <Library/BaseCryptLib.h>\r
+#include <Library/PerformanceLib.h>\r
 \r
 BOOLEAN                 mImageInMemory  = FALSE;\r
 \r
@@ -170,6 +171,8 @@ EndofPeiSignalNotifyCallBack (
 \r
   MeasuredHobData = NULL;\r
 \r
+  PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);\r
+\r
   //\r
   // Create a Guid hob to save all measured Fv\r
   //\r
@@ -195,6 +198,8 @@ EndofPeiSignalNotifyCallBack (
     CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));\r
   }\r
 \r
+  PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 0252511391bc1ad3cb8ea5926ca621dde5a5d9a9..4c8a055c6ca54e1cbc378aacb4073e68c565980b 100644 (file)
@@ -56,6 +56,7 @@
   MemoryAllocationLib\r
   ReportStatusCodeLib\r
   Tpm12CommandLib\r
+  PerformanceLib\r
 \r
 [Guids]\r
   gTcgEventEntryHobGuid                                               ## PRODUCES               ## HOB\r