diff options
author | zhenhuay <zhenhua.yang@intel.com> | 2022-11-21 17:34:56 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-11-29 04:23:39 +0000 |
commit | c8c978d32882413eeaf2b9917409af83af68cb5d (patch) | |
tree | 8bb4ce8ec63470551ad6ca81ecf8c1e08dfdcfe3 /ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c | |
parent | ae3bc559f98e68983df0a4b223dad7afeb6eee2c (diff) | |
download | edk2-c8c978d32882413eeaf2b9917409af83af68cb5d.tar.gz edk2-c8c978d32882413eeaf2b9917409af83af68cb5d.tar.bz2 edk2-c8c978d32882413eeaf2b9917409af83af68cb5d.zip |
ShellPkg/DpDynamicCommand: Add ResetEnd support in DP command
DP command should be able to parse the FPDT ACPI table and dump
the ResetEnd which was logged at the beginning of the firmware
image execution. So that DP can calculate SEC phase time duration
start from the beginning of firmware image execution.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: zhenhuay <zhenhua.yang@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Diffstat (limited to 'ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c')
-rw-r--r-- | ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c index 1799ab176a..512a146da6 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c @@ -57,6 +57,7 @@ UINT8 *mBootPerformanceTable; UINTN mBootPerformanceTableSize;
BOOLEAN mPeiPhase = FALSE;
BOOLEAN mDxePhase = FALSE;
+UINT64 mResetEnd = 0;
PERF_SUMMARY_DATA SummaryData = { 0 }; ///< Create the SummaryData structure and init. to ZERO.
MEASUREMENT_RECORD *mMeasurementList = NULL;
@@ -542,6 +543,8 @@ BuildMeasurementList ( {
EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER *RecordHeader;
UINT8 *PerformanceTablePtr;
+ UINT8 *BasicBootTablePtr;
+ UINT64 ResetEnd;
UINT16 StartProgressId;
UINTN TableLength;
UINT8 *StartRecordEvent;
@@ -552,6 +555,17 @@ BuildMeasurementList ( return EFI_OUT_OF_RESOURCES;
}
+ //
+ // Update the ResetEnd which was logged at the beginning of firmware image execution
+ //
+ TableLength = sizeof (EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER);
+ BasicBootTablePtr = (mBootPerformanceTable + TableLength);
+ ResetEnd = ((EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD *)BasicBootTablePtr)->ResetEnd;
+
+ if (ResetEnd > 0) {
+ mResetEnd = ResetEnd;
+ }
+
TableLength = sizeof (BOOT_PERFORMANCE_TABLE);
PerformanceTablePtr = (mBootPerformanceTable + TableLength);
|