From ea447321ec2c4dbeb8bdb28dbc5b8e967ba3e719 Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Tue, 7 May 2024 08:42:29 -0700 Subject: [PATCH] Fix wrong mMaxAddress calculation --- .../Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c | 2 +- .../AdvancedLoggerWrapper/AdvancedLoggerWrapperTestApp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c index 12ab33b19c..bce40dc971 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/DxeCore/AdvancedLoggerLib.c @@ -392,7 +392,7 @@ DxeCoreAdvancedLoggerLibConstructor ( LoggerInfo->HdwPortInitialized = TRUE; } - mMaxAddress = TOTAL_LOG_SIZE_WITH_ALI (LoggerInfo); + mMaxAddress = LOG_MAX_ADDRESS (LoggerInfo); mBufferSize = LoggerInfo->LogBufferSize; } else { DEBUG ((DEBUG_ERROR, "%a: Error allocating Advanced Logger Buffer\n", __FUNCTION__)); diff --git a/AdvLoggerPkg/UnitTests/AdvancedLoggerWrapper/AdvancedLoggerWrapperTestApp.c b/AdvLoggerPkg/UnitTests/AdvancedLoggerWrapper/AdvancedLoggerWrapperTestApp.c index 84a45ae230..e1df8bb947 100644 --- a/AdvLoggerPkg/UnitTests/AdvancedLoggerWrapper/AdvancedLoggerWrapperTestApp.c +++ b/AdvLoggerPkg/UnitTests/AdvancedLoggerWrapper/AdvancedLoggerWrapperTestApp.c @@ -179,7 +179,7 @@ InitializeInMemoryLog ( if (!EFI_ERROR (Status)) { mLoggerInfo = LOGGER_INFO_FROM_PROTOCOL (LoggerProtocol); if (mLoggerInfo != NULL) { - mMaxAddress = TOTAL_LOG_SIZE_WITH_ALI (mLoggerInfo); + mMaxAddress = LOG_MAX_ADDRESS (mLoggerInfo); mBufferSize = mLoggerInfo->LogBufferSize; }