TianoCore EDK2 master
Loading...
Searching...
No Matches
X86XenHypercall.c File Reference
#include <PiDxe.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/CpuLib.h>

Go to the source code of this file.

Functions

INTN EFIAPI __XenVmmcall2 (IN INTN HypercallNum, IN OUT INTN Arg1, IN OUT INTN Arg2)
 
INTN EFIAPI __XenVmcall2 (IN INTN HypercallNum, IN OUT INTN Arg1, IN OUT INTN Arg2)
 
BOOLEAN EFIAPI XenHypercallIsAvailable (VOID)
 
STATIC UINT32 XenCpuidLeaf (VOID)
 
RETURN_STATUS EFIAPI XenHypercallLibInit (VOID)
 
INTN EFIAPI XenHypercall2 (IN UINTN HypercallID, IN OUT INTN Arg1, IN OUT INTN Arg2)
 

Detailed Description

Xen Hypercall Library implementation for Intel architecture

Copyright (c) 2014, Linaro Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file X86XenHypercall.c.

Function Documentation

◆ XenCpuidLeaf()

STATIC UINT32 XenCpuidLeaf ( VOID  )

Definition at line 57 of file X86XenHypercall.c.

◆ XenHypercall2()

INTN EFIAPI XenHypercall2 ( IN UINTN  HypercallID,
IN OUT INTN  Arg1,
IN OUT INTN  Arg2 
)

This function will put the two arguments in the right place (registers) and invoke the hypercall identified by HypercallID.

Parameters
HypercallIDThe symbolic ID of the hypercall to be invoked
Arg1First argument.
Arg2Second argument.
Returns
Return 0 if success otherwise it return an errno.

Definition at line 141 of file X86XenHypercall.c.

◆ XenHypercallIsAvailable()

BOOLEAN EFIAPI XenHypercallIsAvailable ( VOID  )

Check if the Xen Hypercall library is able to make calls to the Xen hypervisor.

Client code should call further functions in this library only if, and after, this function returns TRUE.

Return values
TRUEHypercalls are available.
FALSEHypercalls are not available.

Definition at line 48 of file X86XenHypercall.c.

◆ XenHypercallLibInit()

RETURN_STATUS EFIAPI XenHypercallLibInit ( VOID  )

Library constructor: Check for Xen leaf in CPUID

Definition at line 87 of file X86XenHypercall.c.