From 80b619d5c456c286e58b122690ff254aeca7f12c Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Tue, 13 Aug 2019 12:31:01 +0100 Subject: OvmfPkg/XenPlatformPei: Reinit XenHypercallLib The XenPlatformPei needs to make hypercalls, but the XenHypercallLib was initialised before the HyperPage was ready. Now that XenPlatformPei has initialised the HyperPage, reinitialise the XenHypercallLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek Message-Id: <20190813113119.14804-18-anthony.perard@citrix.com> --- OvmfPkg/XenPlatformPei/Xen.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OvmfPkg/XenPlatformPei/Xen.c') diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index b366139a0a..c67f4c9697 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "Platform.h" #include "Xen.h" @@ -88,6 +89,7 @@ XenConnect ( EFI_XEN_OVMF_INFO *Info; CHAR8 Sig[sizeof (Info->Signature) + 1]; UINT32 *PVHResetVectorData; + RETURN_STATUS Status; AsmCpuid (XenLeaf + 2, &TransferPages, &TransferReg, NULL, NULL); mXenInfo.HyperPages = AllocatePages (TransferPages); @@ -152,6 +154,13 @@ XenConnect ( sizeof(mXenInfo) ); + // + // Initialize the XenHypercall library, now that the XenInfo HOB is + // available + // + Status = XenHypercallLibInit (); + ASSERT_RETURN_ERROR (Status); + return EFI_SUCCESS; } -- cgit v1.2.3