Skip to content

Commit

Permalink
Fixing a build error
Browse files Browse the repository at this point in the history
  • Loading branch information
kuqin12 committed Apr 15, 2024
1 parent 16d1205 commit 434b9ac
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
#include <AdvancedLoggerInternalProtocol.h>
#include <Library/AdvancedLoggerAccessLib.h>

VOID
EFIAPI
InternalPrintMessage (
IN CONST CHAR8 *Format,
...
);

/**
Including the PeiMain.h from PeiCore in order to access the Platform Blob data member.
Expand Down Expand Up @@ -214,13 +207,11 @@ InstallPermanentMemoryBuffer (
//
// Must be PeiCore allocated small memory buffer
//

Status = PeiServicesAllocatePages (
EfiReservedMemoryType,
FixedPcdGet32 (PcdAdvancedLoggerPages),
&NewLogBuffer
);

if (!EFI_ERROR (Status)) {
NewLoggerInfo = ALI_FROM_PA (NewLogBuffer);
CopyMem ((VOID *)NewLoggerInfo, (VOID *)LoggerInfo, sizeof (ADVANCED_LOGGER_INFO));
Expand Down Expand Up @@ -452,19 +443,20 @@ AdvancedLoggerGetLoggerInfo (
VOID
)
{
UINTN BufferSize;
EFI_HOB_GUID_TYPE *GuidHob;
EFI_HOB_GUID_TYPE *GuidHobInterim;
EFI_HOB_GUID_TYPE *GuidHobInterimBuf;
PEI_CORE_INSTANCE *PeiCoreInstance;
ADVANCED_LOGGER_INFO *LoggerInfo;
ADVANCED_LOGGER_INFO *LoggerInfoSec;
ADVANCED_LOGGER_PTR *LogPtr;
EFI_PHYSICAL_ADDRESS NewLoggerInfo;
UINTN Pages;
CONST EFI_PEI_SERVICES **PeiServices;
EFI_STATUS Status;
EFI_MEMORY_TYPE Type;
UINTN BufferSize;
EFI_HOB_GUID_TYPE *GuidHob;
EFI_HOB_GUID_TYPE *GuidHobInterim;
EFI_HOB_GUID_TYPE *GuidHobInterimBuf;
PEI_CORE_INSTANCE *PeiCoreInstance;
ADVANCED_LOGGER_INFO *LoggerInfo;
ADVANCED_LOGGER_INFO *LoggerInfoSec;
ADVANCED_LOGGER_PTR *LogPtr;
EFI_PHYSICAL_ADDRESS NewLoggerInfo;
UINTN Pages;
CONST EFI_PEI_SERVICES **PeiServices;
EFI_STATUS Status;
EFI_MEMORY_TYPE Type;
ADVANCED_LOGGER_MESSAGE_ENTRY_V2 *LogEntry;

// Try to do the minimum work at the start of this function as this
// is called quite often.
Expand Down Expand Up @@ -614,7 +606,7 @@ AdvancedLoggerGetLoggerInfo (
// If we have an interim buffer, copy it to the new buffer
//
LoggerInfo = (ADVANCED_LOGGER_INFO *)GET_GUID_HOB_DATA (GuidHobInterimBuf);
ADVANCED_LOGGER_MESSAGE_ENTRY_V2 *LogEntry = (ADVANCED_LOGGER_MESSAGE_ENTRY_V2 *)LoggerInfo->LogBuffer;
LogEntry = (ADVANCED_LOGGER_MESSAGE_ENTRY_V2 *)(UINTN)LoggerInfo->LogBuffer;
AdvancedLoggerMemoryLoggerWrite (LogEntry->DebugLevel, LogEntry->MessageText, LogEntry->MessageLen);
GuidHobInterimBuf = GetNextGuidHob (&gAdvancedLoggerInterimHobGuid, GuidHobInterimBuf);
}
Expand Down

0 comments on commit 434b9ac

Please sign in to comment.