From c8c978d32882413eeaf2b9917409af83af68cb5d Mon Sep 17 00:00:00 2001 From: zhenhuay Date: Mon, 21 Nov 2022 17:34:56 +0800 Subject: 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 Cc: Zhichao Gao Cc: Star Zeng Signed-off-by: zhenhuay Reviewed-by: Zhichao Gao --- ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ShellPkg/DynamicCommand/DpDynamicCommand/DpTrace.c') 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) { -- cgit v1.2.3