OvmfPkg: Handle Cloud Hypervisor host bridge
Handle things differently when the detected host bridge matches the Cloud Hypervisor PCI host bridge identifier. 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
e81a81e584
commit
9afcd48a94
@@ -16,6 +16,7 @@
|
||||
#include <OvmfPlatforms.h> // PIIX4_PMBA_VALUE
|
||||
|
||||
STATIC UINT16 mAcpiPmBaseAddress;
|
||||
STATIC UINT16 mAcpiHwReducedSleepCtl;
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -34,6 +35,9 @@ DxeResetInit (
|
||||
case INTEL_Q35_MCH_DEVICE_ID:
|
||||
mAcpiPmBaseAddress = ICH9_PMBASE_VALUE;
|
||||
break;
|
||||
case CLOUDHV_DEVICE_ID:
|
||||
mAcpiHwReducedSleepCtl = CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS;
|
||||
break;
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
CpuDeadLoop ();
|
||||
@@ -56,7 +60,12 @@ ResetShutdown (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
IoBitFieldWrite16 (mAcpiPmBaseAddress + 4, 10, 13, 0);
|
||||
IoOr16 (mAcpiPmBaseAddress + 4, BIT13);
|
||||
if (mAcpiHwReducedSleepCtl) {
|
||||
IoWrite8 (mAcpiHwReducedSleepCtl, 5 << 2 | 1 << 5);
|
||||
} else {
|
||||
IoBitFieldWrite16 (mAcpiPmBaseAddress + 4, 10, 13, 0);
|
||||
IoOr16 (mAcpiPmBaseAddress + 4, BIT13);
|
||||
}
|
||||
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user