X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FDynamicCommand%2FDpDynamicCommand%2FDp.c;fp=ShellPkg%2FDynamicCommand%2FDpDynamicCommand%2FDp.c;h=512a146da6dd2de9f2abaa082718199aa03ad0ad;hp=1799ab176a16904e354a773eed8fae66555147fd;hb=c8c978d32882413eeaf2b9917409af83af68cb5d;hpb=ae3bc559f98e68983df0a4b223dad7afeb6eee2c 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);