From 5fbb5a914c3cd6f3226d68a4089acb68350548c8 Mon Sep 17 00:00:00 2001 From: Aaron <105021049+apop5@users.noreply.github.com> Date: Fri, 5 Apr 2024 11:51:07 -0700 Subject: [PATCH] When recovering Pei buffer from hob list, need to fix internal pointers to log and next available log space. --- .../Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c index 24be231015..38823c4830 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c @@ -484,6 +484,9 @@ AdvancedLoggerGetLoggerInfo ( (PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices))->PlatformBlob = PA_FROM_PTR (LoggerInfo); LogPtr->LogBuffer = PA_FROM_PTR (LoggerInfo); + LoggerInfo->LogCurrent = PA_FROM_PTR (LoggerInfo + 1) + LoggerInfo->LogCurrent - LoggerInfo->LogBuffer; + LoggerInfo->LogBuffer = PA_FROM_PTR (LoggerInfo + 1); + // return the pointer return LoggerInfo; }