summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiPlatformDxe/Xen.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2019-08-13 12:30:59 +0100
committerLaszlo Ersek <lersek@redhat.com>2019-08-21 18:03:49 +0200
commit2a4a6242b71721024971df56d4f28e0aa63dd4d8 (patch)
tree4e1df10bd670d5e79fd349cc620fb729566f0e44 /OvmfPkg/AcpiPlatformDxe/Xen.c
parent3afa2ed53fe0878ae205d62bba962a0463d41260 (diff)
downloadedk2-2a4a6242b71721024971df56d4f28e0aa63dd4d8.tar.gz
edk2-2a4a6242b71721024971df56d4f28e0aa63dd4d8.tar.bz2
edk2-2a4a6242b71721024971df56d4f28e0aa63dd4d8.zip
OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it exist
If the firmware have been started via the Xen PVH entry point, a RSDP pointer would have been provided. Use it. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-16-anthony.perard@citrix.com>
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe/Xen.c')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/Xen.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c
index 82794b933e..f80dfe1a57 100644
--- a/OvmfPkg/AcpiPlatformDxe/Xen.c
+++ b/OvmfPkg/AcpiPlatformDxe/Xen.c
@@ -36,10 +36,27 @@ GetXenAcpiRsdp (
EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *RsdpStructurePtr;
UINT8 *XenAcpiPtr;
UINT8 Sum;
+ EFI_XEN_INFO *XenInfo;
//
// Detect the RSDP structure
//
+
+ //
+ // First look for PVH one
+ //
+ XenInfo = XenGetInfoHOB ();
+ ASSERT (XenInfo != NULL);
+ if (XenInfo->RsdpPvh != NULL) {
+ DEBUG ((DEBUG_INFO, "%a: Use ACPI RSDP table at 0x%p\n",
+ gEfiCallerBaseName, XenInfo->RsdpPvh));
+ *RsdpPtr = XenInfo->RsdpPvh;
+ return EFI_SUCCESS;
+ }
+
+ //
+ // Otherwise, look for the HVM one
+ //
for (XenAcpiPtr = (UINT8*)(UINTN) XEN_ACPI_PHYSICAL_ADDRESS;
XenAcpiPtr < (UINT8*)(UINTN) XEN_BIOS_PHYSICAL_END;
XenAcpiPtr += 0x10) {