Skip to content

Commit

Permalink
OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it exist
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
anthonyper-ctx authored and lersek committed Aug 21, 2019
1 parent 3afa2ed commit 2a4a624
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions OvmfPkg/AcpiPlatformDxe/Xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2a4a624

Please sign in to comment.