mirror of https://github.com/acidanthera/audk.git
OvmfPkg/XenPlatformPei: Remove Hypercall Page
XenHypercallLib now makes direct hypercalls, so HyperPages is unnecessary and can be removed. Change the XenPvhDetected() ASSERT to use the Xen version. That has never been 0, AFAIK. Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
This commit is contained in:
parent
0e6f6c715c
commit
043eab84e5
|
@ -13,10 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
{ 0xd3b46f3b, 0xd441, 0x1244, {0x9a, 0x12, 0x0, 0x12, 0x27, 0x3f, 0xc1, 0x4d } }
|
||||
|
||||
typedef struct {
|
||||
///
|
||||
/// Beginning of the hypercall page.
|
||||
///
|
||||
VOID *HyperPages;
|
||||
///
|
||||
/// Hypervisor major version.
|
||||
///
|
||||
|
|
|
@ -128,9 +128,6 @@ EFI_STATUS
|
|||
XenConnect (
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 TransferReg;
|
||||
UINT32 TransferPages;
|
||||
UINT32 XenVersion;
|
||||
EFI_XEN_OVMF_INFO *Info;
|
||||
CHAR8 Sig[sizeof (Info->Signature) + 1];
|
||||
|
@ -139,24 +136,6 @@ XenConnect (
|
|||
|
||||
ASSERT (mXenLeaf != 0);
|
||||
|
||||
//
|
||||
// Prepare HyperPages to be able to make hypercalls
|
||||
//
|
||||
|
||||
AsmCpuid (mXenLeaf + 2, &TransferPages, &TransferReg, NULL, NULL);
|
||||
mXenInfo.HyperPages = AllocatePages (TransferPages);
|
||||
if (!mXenInfo.HyperPages) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
for (Index = 0; Index < TransferPages; Index++) {
|
||||
AsmWriteMsr64 (
|
||||
TransferReg,
|
||||
(UINTN)mXenInfo.HyperPages +
|
||||
(Index << EFI_PAGE_SHIFT) + Index
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Find out the Xen version
|
||||
//
|
||||
|
@ -283,7 +262,7 @@ XenPvhDetected (
|
|||
//
|
||||
// This function should only be used after XenConnect
|
||||
//
|
||||
ASSERT (mXenInfo.HyperPages != NULL);
|
||||
ASSERT (mXenInfo.VersionMajor);
|
||||
|
||||
return mXenHvmloaderInfo == NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue