From 70c3ff616a3cc4d634611d6b377c73eb15d299a1 Mon Sep 17 00:00:00 2001 From: Aaron <105021049+apop5@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:52:21 -0800 Subject: [PATCH] Fixed logic related to DxeCore only advanced logger incorrectly creating mMaxAddress (off by 0x50 for ADVANCED_LOGGER_INFO structure --- .../Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c index 8e40c314ab..f4fd4c762c 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c @@ -365,7 +365,7 @@ DxeCoreAdvancedLoggerLibConstructor ( LoggerInfo->LogBufferSize = EFI_PAGES_TO_SIZE (FixedPcdGet32 (PcdAdvancedLoggerPages)) - sizeof (ADVANCED_LOGGER_INFO); LoggerInfo->LogCurrent = LoggerInfo->LogBuffer; LoggerInfo->HwPrintLevel = FixedPcdGet32 (PcdAdvancedLoggerHdwPortDebugPrintErrorLevel); - mMaxAddress = PA_FROM_PTR (LoggerInfo) + LoggerInfo->LogBufferSize; + mMaxAddress = LoggerInfo->LogBuffer + LoggerInfo->LogBufferSize; mBufferSize = LoggerInfo->LogBufferSize; } else { DEBUG ((DEBUG_ERROR, "%a: Error allocating Advanced Logger Buffer\n", __FUNCTION__));