OvmfPkg/PlatformDxe: register log buffer as efi config table
If a memory debug log buffer is present, register the buffer location as config table so the OS can find and show it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
7f756db37a
commit
5090c39a59
@@ -13,6 +13,8 @@
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/HiiLib.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/MemDebugLogLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/PrintLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
@@ -943,6 +945,28 @@ GopInstalled (
|
||||
mGopTracker = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
If a memory debug log buffer is present, register the buffer location as
|
||||
config table so the OS can find and show it.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
MemDebugLogInstallTable (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_HOB_GUID_TYPE *GuidHob;
|
||||
MEM_DEBUG_LOG_HOB_DATA *HobData;
|
||||
VOID *LogBuffer;
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gMemDebugLogHobGuid);
|
||||
if (GuidHob != NULL) {
|
||||
HobData = (MEM_DEBUG_LOG_HOB_DATA *)GET_GUID_HOB_DATA (GuidHob);
|
||||
LogBuffer = (VOID *)(UINTN)HobData->MemDebugLogBufAddr;
|
||||
gBS->InstallConfigurationTable (&gMemDebugLogHobGuid, LogBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Entry point for this driver.
|
||||
|
||||
@@ -1030,6 +1054,8 @@ PlatformInit (
|
||||
Status = gBS->SignalEvent (mGopEvent);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
MemDebugLogInstallTable ();
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
CloseGopEvent:
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
DebugLib
|
||||
DevicePathLib
|
||||
HiiLib
|
||||
HobLib
|
||||
MemoryAllocationLib
|
||||
PrintLib
|
||||
UefiBootServicesTableLib
|
||||
@@ -59,6 +60,7 @@
|
||||
[Guids]
|
||||
gEfiIfrTianoGuid
|
||||
gOvmfPlatformConfigGuid
|
||||
gMemDebugLogHobGuid
|
||||
|
||||
[Depex]
|
||||
gEfiHiiConfigRoutingProtocolGuid AND
|
||||
|
||||
Reference in New Issue
Block a user