From c35b46f62267c1d279450922a3c424eb00cac4c7 Mon Sep 17 00:00:00 2001 From: Aaron <105021049+apop5@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:52:10 -0700 Subject: [PATCH] =?UTF-8?q?When=20recovering=20Pei=20buffer=20from=20hob?= =?UTF-8?q?=20list,=20need=20to=20fix=20internal=20pointe=E2=80=A6=20(#457?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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; }