X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EdkModulePkg%2FLibrary%2FPeiPerformanceLib%2FPeiPerformanceLib.c;h=dcb360c5e70379b0b22fc4d813bdc9e4136065bd;hb=6ffd3b0cd256d10b669776b56241d47839be208f;hp=b97849fa35dd2a603a1c06fd3c54b403274cf7bc;hpb=a3420902ba177d263a59083afb46e68fd0f0602d;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++;