* [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
@ 2018-07-19 6:44 Dandan Bi
2018-07-19 6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
2018-07-25 14:07 ` [patch 1/2] MdeModulePkg/DxeLoadFunc: " Gao, Liming
0 siblings, 2 replies; 5+ messages in thread
From: Dandan Bi @ 2018-07-19 6:44 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Star Zeng
Add an example case for the usage of
PERF_EVENT_SIGNAL_BEGIN/PERF_EVENT_SIGNAL_END
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 ++-
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 1 +
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
index 6f8e13d213..9ea88a399b 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -1,10 +1,10 @@
/** @file
Master header file for DxeIpl PEIM. All source files in this module should
include this file for common definitions.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -46,10 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PcdLib.h>
#include <Library/S3Lib.h>
#include <Library/RecoveryLib.h>
#include <Library/DebugAgentLib.h>
#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/PerformanceLib.h>
#define STACK_SIZE 0x20000
#define BSP_STORE_SIZE 0x4000
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index 7deeb8f270..302934283a 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -77,10 +77,11 @@
BaseLib
PeimEntryPoint
DebugLib
DebugAgentLib
PeiServicesTablePointerLib
+ PerformanceLib
[LibraryClasses.ARM, LibraryClasses.AARCH64]
ArmMmuLib
[Ppis]
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
index d5aa0474b0..8a939b6c24 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
@@ -318,11 +318,13 @@ HandOffToDxeCore (
PageTables = CreateIdentityMappingPageTables (BaseOfStack, STACK_SIZE);
//
// End of PEI phase signal
//
+ PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
+ PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
ASSERT_EFI_ERROR (Status);
AsmWriteCr3 (PageTables);
//
@@ -435,11 +437,13 @@ HandOffToDxeCore (
}
//
// End of PEI phase signal
//
+ PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
+ PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
ASSERT_EFI_ERROR (Status);
if (BuildPageTablesIa32Pae) {
AsmWriteCr3 (PageTables);
//
--
2.14.3.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [patch 2/2] SecurityPkg/Tcg: Add use case for new Perf macro
2018-07-19 6:44 [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro Dandan Bi
@ 2018-07-19 6:44 ` Dandan Bi
2018-07-24 5:09 ` Zhang, Chao B
2018-07-25 14:07 ` Gao, Liming
2018-07-25 14:07 ` [patch 1/2] MdeModulePkg/DxeLoadFunc: " Gao, Liming
1 sibling, 2 replies; 5+ messages in thread
From: Dandan Bi @ 2018-07-19 6:44 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Chao Zhang
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>
---
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++
SecurityPkg/Tcg/TcgPei/TcgPei.c | 5 +++++
SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 +
3 files changed, 10 insertions(+)
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 74cdd1fa88..09ef0c70a5 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -159,10 +159,12 @@ EndofPeiSignalNotifyCallBack (
{
MEASURED_HOB_DATA *MeasuredHobData;
MeasuredHobData = NULL;
+ PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
+
//
// Create a Guid hob to save all measured Fv
//
MeasuredHobData = BuildGuidHob(
&gMeasuredFvHobGuid,
@@ -184,10 +186,12 @@ EndofPeiSignalNotifyCallBack (
// Save measured child Fv info
//
CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
}
+ PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
+
return EFI_SUCCESS;
}
/**
Make sure that the current PCR allocations, the TPM supported PCRs,
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c
index 1ed11a1b29..d07047580c 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.c
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c
@@ -39,10 +39,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/Tpm12DeviceLib.h>
#include <Library/Tpm12CommandLib.h>
#include <Library/BaseCryptLib.h>
+#include <Library/PerformanceLib.h>
BOOLEAN mImageInMemory = FALSE;
EFI_PEI_PPI_DESCRIPTOR mTpmInitializedPpiList = {
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
@@ -168,10 +169,12 @@ EndofPeiSignalNotifyCallBack (
{
MEASURED_HOB_DATA *MeasuredHobData;
MeasuredHobData = NULL;
+ PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
+
//
// Create a Guid hob to save all measured Fv
//
MeasuredHobData = BuildGuidHob(
&gMeasuredFvHobGuid,
@@ -193,10 +196,12 @@ EndofPeiSignalNotifyCallBack (
// Save measured child Fv info
//
CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
}
+ PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
+
return EFI_SUCCESS;
}
/**
Single function calculates SHA1 digest value for all raw data. It
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
index 0252511391..4c8a055c6c 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
@@ -54,10 +54,11 @@
BaseLib
PcdLib
MemoryAllocationLib
ReportStatusCodeLib
Tpm12CommandLib
+ PerformanceLib
[Guids]
gTcgEventEntryHobGuid ## PRODUCES ## HOB
gTpmErrorHobGuid ## SOMETIMES_PRODUCES ## HOB
gMeasuredFvHobGuid ## PRODUCES ## HOB
--
2.14.3.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch 2/2] SecurityPkg/Tcg: Add use case for new Perf macro
2018-07-19 6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
@ 2018-07-24 5:09 ` Zhang, Chao B
2018-07-25 14:07 ` Gao, Liming
1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Chao B @ 2018-07-24 5:09 UTC (permalink / raw)
To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Gao, Liming
Reviewed-by: Chao Zhang<chao.b.zhang@intel.com>
-----Original Message-----
From: Bi, Dandan
Sent: Thursday, July 19, 2018 2:44 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
Subject: [patch 2/2] SecurityPkg/Tcg: Add use case for new Perf macro
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>
---
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++
SecurityPkg/Tcg/TcgPei/TcgPei.c | 5 +++++
SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 +
3 files changed, 10 insertions(+)
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 74cdd1fa88..09ef0c70a5 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -159,10 +159,12 @@ EndofPeiSignalNotifyCallBack ( {
MEASURED_HOB_DATA *MeasuredHobData;
MeasuredHobData = NULL;
+ PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
+
//
// Create a Guid hob to save all measured Fv
//
MeasuredHobData = BuildGuidHob(
&gMeasuredFvHobGuid, @@ -184,10 +186,12 @@ EndofPeiSignalNotifyCallBack (
// Save measured child Fv info
//
CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
}
+ PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
+
return EFI_SUCCESS;
}
/**
Make sure that the current PCR allocations, the TPM supported PCRs, diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c index 1ed11a1b29..d07047580c 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.c
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c
@@ -39,10 +39,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h> #include <Library/ReportStatusCodeLib.h> #include <Library/Tpm12DeviceLib.h> #include <Library/Tpm12CommandLib.h> #include <Library/BaseCryptLib.h>
+#include <Library/PerformanceLib.h>
BOOLEAN mImageInMemory = FALSE;
EFI_PEI_PPI_DESCRIPTOR mTpmInitializedPpiList = {
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
@@ -168,10 +169,12 @@ EndofPeiSignalNotifyCallBack ( {
MEASURED_HOB_DATA *MeasuredHobData;
MeasuredHobData = NULL;
+ PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
+
//
// Create a Guid hob to save all measured Fv
//
MeasuredHobData = BuildGuidHob(
&gMeasuredFvHobGuid, @@ -193,10 +196,12 @@ EndofPeiSignalNotifyCallBack (
// Save measured child Fv info
//
CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
}
+ PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
+
return EFI_SUCCESS;
}
/**
Single function calculates SHA1 digest value for all raw data. It diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
index 0252511391..4c8a055c6c 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
@@ -54,10 +54,11 @@
BaseLib
PcdLib
MemoryAllocationLib
ReportStatusCodeLib
Tpm12CommandLib
+ PerformanceLib
[Guids]
gTcgEventEntryHobGuid ## PRODUCES ## HOB
gTpmErrorHobGuid ## SOMETIMES_PRODUCES ## HOB
gMeasuredFvHobGuid ## PRODUCES ## HOB
--
2.14.3.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
2018-07-19 6:44 [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro Dandan Bi
2018-07-19 6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
@ 2018-07-25 14:07 ` Gao, Liming
1 sibling, 0 replies; 5+ messages in thread
From: Gao, Liming @ 2018-07-25 14:07 UTC (permalink / raw)
To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Zeng, Star
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dandan Bi
> Sent: Thursday, July 19, 2018 2:44 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
>
> Add an example case for the usage of
> PERF_EVENT_SIGNAL_BEGIN/PERF_EVENT_SIGNAL_END
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
> MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 ++-
> MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 1 +
> MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++++
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> index 6f8e13d213..9ea88a399b 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> @@ -1,10 +1,10 @@
> /** @file
> Master header file for DxeIpl PEIM. All source files in this module should
> include this file for common definitions.
>
> -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD License
> which accompanies this distribution. The full text of the license may be found at
> http://opensource.org/licenses/bsd-license.php
>
> @@ -46,10 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> #include <Library/PcdLib.h>
> #include <Library/S3Lib.h>
> #include <Library/RecoveryLib.h>
> #include <Library/DebugAgentLib.h>
> #include <Library/PeiServicesTablePointerLib.h>
> +#include <Library/PerformanceLib.h>
>
> #define STACK_SIZE 0x20000
> #define BSP_STORE_SIZE 0x4000
>
>
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> index 7deeb8f270..302934283a 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> @@ -77,10 +77,11 @@
> BaseLib
> PeimEntryPoint
> DebugLib
> DebugAgentLib
> PeiServicesTablePointerLib
> + PerformanceLib
>
> [LibraryClasses.ARM, LibraryClasses.AARCH64]
> ArmMmuLib
>
> [Ppis]
> diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> index d5aa0474b0..8a939b6c24 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> @@ -318,11 +318,13 @@ HandOffToDxeCore (
> PageTables = CreateIdentityMappingPageTables (BaseOfStack, STACK_SIZE);
>
> //
> // End of PEI phase signal
> //
> + PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
> Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
> + PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
> ASSERT_EFI_ERROR (Status);
>
> AsmWriteCr3 (PageTables);
>
> //
> @@ -435,11 +437,13 @@ HandOffToDxeCore (
> }
>
> //
> // End of PEI phase signal
> //
> + PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
> Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
> + PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
> ASSERT_EFI_ERROR (Status);
>
> if (BuildPageTablesIa32Pae) {
> AsmWriteCr3 (PageTables);
> //
> --
> 2.14.3.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 2/2] SecurityPkg/Tcg: Add use case for new Perf macro
2018-07-19 6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
2018-07-24 5:09 ` Zhang, Chao B
@ 2018-07-25 14:07 ` Gao, Liming
1 sibling, 0 replies; 5+ messages in thread
From: Gao, Liming @ 2018-07-25 14:07 UTC (permalink / raw)
To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Zhang, Chao B
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Bi, Dandan
> Sent: Thursday, July 19, 2018 2:44 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
> Subject: [patch 2/2] SecurityPkg/Tcg: Add use case for new Perf macro
>
> 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>
> ---
> SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++
> SecurityPkg/Tcg/TcgPei/TcgPei.c | 5 +++++
> SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 +
> 3 files changed, 10 insertions(+)
>
> diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> index 74cdd1fa88..09ef0c70a5 100644
> --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> @@ -159,10 +159,12 @@ EndofPeiSignalNotifyCallBack (
> {
> MEASURED_HOB_DATA *MeasuredHobData;
>
> MeasuredHobData = NULL;
>
> + PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
> +
> //
> // Create a Guid hob to save all measured Fv
> //
> MeasuredHobData = BuildGuidHob(
> &gMeasuredFvHobGuid,
> @@ -184,10 +186,12 @@ EndofPeiSignalNotifyCallBack (
> // Save measured child Fv info
> //
> CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo,
> sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
> }
>
> + PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
> +
> return EFI_SUCCESS;
> }
>
> /**
> Make sure that the current PCR allocations, the TPM supported PCRs,
> diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c
> index 1ed11a1b29..d07047580c 100644
> --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c
> +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c
> @@ -39,10 +39,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> #include <Library/MemoryAllocationLib.h>
> #include <Library/ReportStatusCodeLib.h>
> #include <Library/Tpm12DeviceLib.h>
> #include <Library/Tpm12CommandLib.h>
> #include <Library/BaseCryptLib.h>
> +#include <Library/PerformanceLib.h>
>
> BOOLEAN mImageInMemory = FALSE;
>
> EFI_PEI_PPI_DESCRIPTOR mTpmInitializedPpiList = {
> EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> @@ -168,10 +169,12 @@ EndofPeiSignalNotifyCallBack (
> {
> MEASURED_HOB_DATA *MeasuredHobData;
>
> MeasuredHobData = NULL;
>
> + PERF_CALLBACK_BEGIN (&gEfiEndOfPeiSignalPpiGuid);
> +
> //
> // Create a Guid hob to save all measured Fv
> //
> MeasuredHobData = BuildGuidHob(
> &gMeasuredFvHobGuid,
> @@ -193,10 +196,12 @@ EndofPeiSignalNotifyCallBack (
> // Save measured child Fv info
> //
> CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo,
> sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
> }
>
> + PERF_CALLBACK_END (&gEfiEndOfPeiSignalPpiGuid);
> +
> return EFI_SUCCESS;
> }
>
> /**
> Single function calculates SHA1 digest value for all raw data. It
> diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
> index 0252511391..4c8a055c6c 100644
> --- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf
> +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
> @@ -54,10 +54,11 @@
> BaseLib
> PcdLib
> MemoryAllocationLib
> ReportStatusCodeLib
> Tpm12CommandLib
> + PerformanceLib
>
> [Guids]
> gTcgEventEntryHobGuid ## PRODUCES ## HOB
> gTpmErrorHobGuid ## SOMETIMES_PRODUCES ## HOB
> gMeasuredFvHobGuid ## PRODUCES ## HOB
> --
> 2.14.3.windows.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-25 14:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 6:44 [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro Dandan Bi
2018-07-19 6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
2018-07-24 5:09 ` Zhang, Chao B
2018-07-25 14:07 ` Gao, Liming
2018-07-25 14:07 ` [patch 1/2] MdeModulePkg/DxeLoadFunc: " Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox