OvmfPkg: Retrieve SMBIOS from Cloud Hypervisor
Add a fallback on the SMBIOS code to find the SMBIOS table for Cloud Hypervisor if it couldn't be found for Qemu through fw_cfg. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Rob Bradford <robert.bradford@intel.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
2ccefa32a6
commit
d8ef774346
@@ -5,6 +5,7 @@
|
||||
**/
|
||||
|
||||
#include <Library/MemoryAllocationLib.h> // FreePool()
|
||||
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
|
||||
|
||||
#include "SmbiosPlatformDxe.h"
|
||||
|
||||
@@ -27,15 +28,24 @@ SmbiosTablePublishEntry (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT8 *SmbiosTables;
|
||||
UINT16 HostBridgeDevId;
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
//
|
||||
// Add QEMU SMBIOS data if found
|
||||
// Add SMBIOS data if found
|
||||
//
|
||||
SmbiosTables = GetQemuSmbiosTables ();
|
||||
if (SmbiosTables != NULL) {
|
||||
Status = InstallAllStructures (SmbiosTables);
|
||||
FreePool (SmbiosTables);
|
||||
HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
|
||||
if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
|
||||
SmbiosTables = GetCloudHvSmbiosTables ();
|
||||
if (SmbiosTables != NULL) {
|
||||
Status = InstallAllStructures (SmbiosTables);
|
||||
}
|
||||
} else {
|
||||
SmbiosTables = GetQemuSmbiosTables ();
|
||||
if (SmbiosTables != NULL) {
|
||||
Status = InstallAllStructures (SmbiosTables);
|
||||
FreePool (SmbiosTables);
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
Reference in New Issue
Block a user