OvmfPkg: Install ACPI tables for Cloud Hypervisor

Adding support for retrieving the Cloud Hypervisor ACPI tables as a
fallback mechanism if tables are not found 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:
Sebastien Boeuf
2021-12-10 22:41:58 +08:00
committed by mergify[bot]
parent 66bce05f6d
commit 7594c5bfe2
5 changed files with 141 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
#include "AcpiPlatform.h"
/**
@@ -27,7 +29,14 @@ InstallAcpiTables (
)
{
EFI_STATUS Status;
UINT16 HostBridgeDevId;
HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
Status = InstallCloudHvTables (AcpiTable);
} else {
Status = InstallQemuFwCfgTables (AcpiTable);
}
Status = InstallQemuFwCfgTables (AcpiTable);
return Status;
}