summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/XenPlatformPei/Platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/XenPlatformPei/Platform.c')
-rw-r--r--OvmfPkg/XenPlatformPei/Platform.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Platform.c
index 2d97a41ca7..6c1886c158 100644
--- a/OvmfPkg/XenPlatformPei/Platform.c
+++ b/OvmfPkg/XenPlatformPei/Platform.c
@@ -17,6 +17,7 @@
//
// The Library classes this module consumes
//
+#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
@@ -409,6 +410,20 @@ DebugDumpCmos (
}
}
+EFI_HOB_PLATFORM_INFO *
+BuildPlatformInfoHob (
+ VOID
+ )
+{
+ EFI_HOB_PLATFORM_INFO PlatformInfoHob;
+ EFI_HOB_GUID_TYPE *GuidHob;
+
+ ZeroMem (&PlatformInfoHob, sizeof PlatformInfoHob);
+ BuildGuidDataHob (&gUefiOvmfPkgPlatformInfoGuid, &PlatformInfoHob, sizeof (EFI_HOB_PLATFORM_INFO));
+ GuidHob = GetFirstGuidHob (&gUefiOvmfPkgPlatformInfoGuid);
+ return (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob);
+}
+
/**
Perform Platform PEI initialization.
@@ -429,6 +444,11 @@ InitializeXenPlatform (
DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
+ //
+ // Platform Info HOB used by QemuFw libraries
+ //
+ BuildPlatformInfoHob ();
+
DebugDumpCmos ();
if (!XenDetect ()) {