14static INTN mUseVmmCall = -1;
15static BOOLEAN mHypercallAvail;
52 return mHypercallAvail;
65 for (XenLeaf = 0x40000000; XenLeaf < 0x40010000; XenLeaf += 0x100) {
69 (UINT32 *)&Signature[0],
70 (UINT32 *)&Signature[4],
71 (UINT32 *)&Signature[8]
74 if (!
AsciiStrCmp ((CHAR8 *)Signature,
"XenVMMXenVMM")) {
94 XenLeaf = XenCpuidLeaf ();
108 DEBUG ((DEBUG_INFO,
"Detected CPU \"%12a\"\n", sig));
114 }
else if ((
AsciiStrCmp (
"GenuineIntel", sig) == 0) ||
120 DEBUG ((DEBUG_ERROR,
"Unsupported CPU vendor\n"));
124 mHypercallAvail =
TRUE;
148 return __XenVmmcall2 (HypercallID, Arg1, Arg2);
150 return __XenVmcall2 (HypercallID, Arg1, Arg2);
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
#define DEBUG(Expression)
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
RETURN_STATUS EFIAPI XenHypercallLibInit(VOID)
BOOLEAN EFIAPI XenHypercallIsAvailable(VOID)
INTN EFIAPI XenHypercall2(IN UINTN HypercallID, IN OUT INTN Arg1, IN OUT INTN Arg2)