Skip to content

Commit

Permalink
Added code to update Guid Hob pointer as well
Browse files Browse the repository at this point in the history
  • Loading branch information
apop5 committed Dec 16, 2023
1 parent a9f36f0 commit 006597e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,19 @@ AdvancedLoggerGetLoggerInfo (
if (GuidHob != NULL) {
EFI_PEI_HOB_POINTERS Hob;
Hob.Raw = GetHobList ();
LogPtr = (ADVANCED_LOGGER_PTR *)GET_GUID_HOB_DATA (GuidHob);

while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) {
// Go through Allocation Hobs, attempting to find an allocation that matches
// the expected Advanced Logger Signature
LoggerInfo = ALI_FROM_PA (Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress);
if (LoggerInfo->Signature == ADVANCED_LOGGER_SIGNATURE) {
// Update the PlatformBlob pointer to point to the allocation that was relocated to
// real memory
// Update the PlatformBlob pointer to point to the relocated buffer
(PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices))->PlatformBlob = PA_FROM_PTR (LoggerInfo);

// Update the GuidHob pointer to the relocated memory buffer
LogPtr->LogBuffer = PA_FROM_PTR (LoggerInfo);

// return the pointer
return LoggerInfo;
}
Expand Down

0 comments on commit 006597e

Please sign in to comment.