OvmfPkg/XenHypercallLib: Enable it in PEIM
Allow to use Xen hypercalls earlier, during the PEIM stage, but XenHypercallLibInit() must be called once the XenInfo HOB is created with the HyperPage setup. Change the return value of XenHypercallLibInit so failure can be detected when the call shouldn't fail, but still have the constructor always succeed. 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-17-anthony.perard@citrix.com>
This commit is contained in:
committed by
Laszlo Ersek
parent
2a4a6242b7
commit
68f4599dfc
@@ -59,13 +59,7 @@ XenHypercallLibInit (
|
||||
|
||||
GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);
|
||||
if (GuidHob == NULL) {
|
||||
//
|
||||
// We don't fail library construction, since that has catastrophic
|
||||
// consequences for client modules (whereas those modules may easily be
|
||||
// running on a non-Xen platform). Instead, XenHypercallIsAvailable() above
|
||||
// will return FALSE.
|
||||
//
|
||||
return RETURN_SUCCESS;
|
||||
return RETURN_NOT_FOUND;
|
||||
}
|
||||
XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob);
|
||||
HyperPage = XenInfo->HyperPages;
|
||||
|
Reference in New Issue
Block a user