X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EdkModulePkg%2FLibrary%2FPeiPerformanceLib%2FPeiPerformanceLib.c;h=dcb360c5e70379b0b22fc4d813bdc9e4136065bd;hb=94e17f11903941b62092a839ea2abbfcbc50353a;hp=b97849fa35dd2a603a1c06fd3c54b403274cf7bc;hpb=4ba61e5e2a1b3cec7faaad36c252738f6f57f8a6;p=mirror_edk2.git diff --git a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c index b97849fa35..dcb360c5e7 100644 --- a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c +++ b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c @@ -57,7 +57,7 @@ InternalGetPerformanceHobLog ( // PEI Performance HOB was not found, then build one. // PeiPerformanceLogSize = sizeof (PEI_PERFORMANCE_LOG_HEADER) + - sizeof (PEI_PERFORMANCE_LOG_ENTRY) * MAX_PEI_PERFORMANCE_LOG_ENTRIES; + sizeof (PEI_PERFORMANCE_LOG_ENTRY) * PcdGet8 (PcdMaxPeiPerformanceLogEntries); PeiPerformanceLog = BuildGuidHob (&gPeiPerformanceHobGuid, PeiPerformanceLogSize); PeiPerformanceLog = ZeroMem (PeiPerformanceLog, PeiPerformanceLogSize); } @@ -152,7 +152,7 @@ StartPerformanceMeasurement ( PeiPerformanceLog = InternalGetPerformanceHobLog (); - if (PeiPerformanceLog->NumberOfEntries >= MAX_PEI_PERFORMANCE_LOG_ENTRIES) { + if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) { return RETURN_OUT_OF_RESOURCES; } Index = PeiPerformanceLog->NumberOfEntries++;