TianoCore EDK2 master
Loading...
Searching...
No Matches
XenHypercallLib.h File Reference

Go to the source code of this file.

Functions

RETURN_STATUS EFIAPI XenHypercallLibInit (VOID)
 
BOOLEAN EFIAPI XenHypercallIsAvailable (VOID)
 
INTN EFIAPI XenHypercall2 (IN UINTN HypercallID, IN OUT INTN Arg1, IN OUT INTN Arg2)
 
UINT64 EFIAPI XenHypercallHvmGetParam (UINT32 Index)
 
INTN EFIAPI XenHypercallMemoryOp (IN UINTN Operation, IN OUT VOID *Arguments)
 
INTN EFIAPI XenHypercallEventChannelOp (IN INTN Operation, IN OUT VOID *Arguments)
 
INTN EFIAPI XenHypercallSchedOp (IN INTN Operation, IN OUT VOID *Arguments)
 

Detailed Description

Functions declarations to make Xen hypercalls.

Copyright (C) 2014, Citrix Ltd.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file XenHypercallLib.h.

Function Documentation

◆ 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.

◆ XenHypercallEventChannelOp()

INTN EFIAPI XenHypercallEventChannelOp ( IN INTN  Operation,
IN OUT VOID *  Arguments 
)

Do an operation on the event channels.

Parameters
OperationThe operation number, e.g. EVTCHNOP_send.
ArgumentsThe argument associated to the operation.
Returns
Return the return value from the hypercall, 0 in case of success otherwise, an error code.

Definition at line 79 of file XenHypercall.c.

◆ XenHypercallHvmGetParam()

UINT64 EFIAPI XenHypercallHvmGetParam ( UINT32  Index)

Return the value of the HVM parameter Index.

Parameters
IndexThe parameter to get, e.g. HVM_PARAM_STORE_EVTCHN.
Returns
The value of the asked parameter or 0 in case of error.

◆ 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 24 of file ArmXenHypercall.c.

◆ XenHypercallLibInit()

RETURN_STATUS EFIAPI XenHypercallLibInit ( VOID  )

To call when the gEfiXenInfoGuid HOB became available after the library init function has already been executed.

This allow to make hypercall in the PEIM stage.

Library constructor: Check for Xen leaf in CPUID

Definition at line 33 of file ArmXenHypercall.c.

◆ XenHypercallMemoryOp()

INTN EFIAPI XenHypercallMemoryOp ( IN UINTN  Operation,
IN OUT VOID *  Arguments 
)

Hypercall to do different operation on the memory.

Parameters
OperationThe operation number, e.g. XENMEM_add_to_physmap.
ArgumentsThe arguments associated to the operation.
Returns
Return the return value from the hypercall, 0 in case of success otherwise, an error code.

Definition at line 65 of file XenHypercall.c.

◆ XenHypercallSchedOp()

INTN EFIAPI XenHypercallSchedOp ( IN INTN  Operation,
IN OUT VOID *  Arguments 
)

Definition at line 93 of file XenHypercall.c.