summaryrefslogtreecommitdiffstats
path: root/ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c
diff options
context:
space:
mode:
authorzhenhuay <zhenhua.yang@intel.com>2022-11-21 17:34:56 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-11-29 04:23:39 +0000
commitc8c978d32882413eeaf2b9917409af83af68cb5d (patch)
tree8bb4ce8ec63470551ad6ca81ecf8c1e08dfdcfe3 /ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c
parentae3bc559f98e68983df0a4b223dad7afeb6eee2c (diff)
downloadedk2-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/DpTrace.c')
-rw-r--r--ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c b/ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c
index 0abb8797ec..9c0a9a06a1 100644
--- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c
+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c
@@ -548,6 +548,15 @@ ProcessPhases (
Total = 0;
+ // print Reset End if it's valid
+ //
+ if (SecTime > mResetEnd) {
+ SecTime = SecTime - mResetEnd; // Calculate sec time duration start from the beginning of firmware image execution
+ ElapsedTime = DurationInMicroSeconds (mResetEnd); // Calculate elapsed time in microseconds
+ Total += DivU64x32 (ElapsedTime, 1000); // Accumulate time in milliseconds
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_RESET_END), mDpHiiHandle, ElapsedTime);
+ }
+
// print SEC phase duration time
//
if (SecTime > 0) {