diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c index 5bfe435327..f6d9a9038e 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c @@ -17,6 +17,7 @@ // // The Library classes this module consumes // +#include #include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -534,6 +536,24 @@ MaxCpuCountInitialization ( )); } +/** + * @brief Builds PlatformInfo Hob + */ +STATIC +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. @@ -551,6 +571,7 @@ InitializePlatform ( ) { DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n")); + BuildPlatformInfoHob (); // // Initialize Local APIC Timer hardware and disable Local APIC Timer diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf index 739d63098b..07570d4e30 100644 --- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf @@ -44,6 +44,7 @@ [Guids] gEfiMemoryTypeInformationGuid + gUefiOvmfPkgPlatformInfoGuid [LibraryClasses] BaseLib