iPXE
xen.h File Reference

Xen interface. More...

Go to the source code of this file.

Data Structures

struct  xen_hypercall
 A hypercall entry point. More...

Macros

#define XEN_REG1   "ebx"
#define XEN_REG2   "ecx"
#define XEN_REG3   "edx"
#define XEN_REG4   "esi"
#define XEN_REG5   "edi"

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
struct xen_hypercall __attribute__ ((packed))
static __attribute__ ((always_inline)) unsigned long xen_hypercall_1(struct xen_hypervisor *xen
 Issue hypercall with one argument.
__asm__ __volatile__ ("call *%2" :"=a"(retval), "+r"(reg1) :"r"(&xen->hypercall[hypercall]) :XEN_REG2, XEN_REG3, XEN_REG4, XEN_REG5, "memory")
register unsigned long reg2 asm (XEN_REG2) = arg2
register unsigned long reg3 asm (XEN_REG3) = arg3
register unsigned long reg4 asm (XEN_REG4) = arg4
register unsigned long reg5 asm (XEN_REG5)

Variables

uint8_t code [32]
 Code generated by hypervisor.
static unsigned int hypercall
static unsigned int unsigned long arg1
unsigned long retval
static unsigned int unsigned long unsigned long arg2
static unsigned int unsigned long unsigned long unsigned long arg3
static unsigned int unsigned long unsigned long unsigned long unsigned long arg4
static unsigned int unsigned long unsigned long unsigned long unsigned long unsigned long arg5

Detailed Description

Xen interface.

Definition in file xen.h.

Macro Definition Documentation

◆ XEN_REG1

#define XEN_REG1   "ebx"

Definition at line 21 of file xen.h.

◆ XEN_REG2

#define XEN_REG2   "ecx"

Definition at line 22 of file xen.h.

Referenced by __volatile__(), and asm().

◆ XEN_REG3

#define XEN_REG3   "edx"

Definition at line 23 of file xen.h.

Referenced by __volatile__(), asm(), and asm().

◆ XEN_REG4

#define XEN_REG4   "esi"

Definition at line 24 of file xen.h.

Referenced by __volatile__(), asm(), asm(), and asm().

◆ XEN_REG5

#define XEN_REG5   "edi"

Definition at line 25 of file xen.h.

Referenced by __volatile__(), asm(), asm(), asm(), and asm().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ __attribute__()

__attribute__ ( (always_inline) )
inlinestatic

Issue hypercall with one argument.

Issue hypercall with five arguments.

Issue hypercall with four arguments.

Issue hypercall with three arguments.

Issue hypercall with two arguments.

Parameters
xenXen hypervisor
hypercallHypercall number
arg1First argument
Return values
retvalReturn value
Parameters
xenXen hypervisor
hypercallHypercall number
arg1First argument
arg2Second argument
Return values
retvalReturn value
Parameters
xenXen hypervisor
hypercallHypercall number
arg1First argument
arg2Second argument
arg3Third argument
Return values
retvalReturn value
Parameters
xenXen hypervisor
hypercallHypercall number
arg1First argument
arg2Second argument
arg3Third argument
arg4Fourth argument
Return values
retvalReturn value
Parameters
xenXen hypervisor
hypercallHypercall number
arg1First argument
arg2Second argument
arg3Third argument
arg4Fourth argument
arg5Fifth argument
Return values
retvalReturn value

◆ __volatile__()

__asm__ __volatile__ ( )

◆ asm() [1/4]

register unsigned long reg2 asm ( XEN_REG2 ) = arg2

References __asm__(), arg2, hypercall, retval, XEN_REG2, XEN_REG3, XEN_REG4, and XEN_REG5.

Referenced by asm().

◆ asm() [2/4]

register unsigned long reg3 asm ( XEN_REG3 ) = arg3

◆ asm() [3/4]

register unsigned long reg4 asm ( XEN_REG4 ) = arg4

◆ asm() [4/4]

register unsigned long reg5 asm ( XEN_REG5 )

References __asm__(), arg5, hypercall, retval, and XEN_REG5.

Variable Documentation

◆ code

uint8_t code[32]

Code generated by hypervisor.

Definition at line 1 of file xen.h.

◆ hypercall

unsigned int hypercall

Definition at line 43 of file xen.h.

Referenced by __volatile__(), __volatile__(), asm(), asm(), asm(), asm(), hv_map_hypercall(), and hv_unmap_hypercall().

◆ arg1

unsigned int unsigned long arg1
Initial value:
{
register unsigned long reg1 asm ( XEN_REG1 ) = arg1
static unsigned int unsigned long arg1
Definition xen.h:44
#define XEN_REG1
Definition xen.h:21

Definition at line 44 of file xen.h.

Referenced by b44_phy_read(), b44_phy_write(), and phantom_issue_cmd().

◆ retval

◆ arg2

unsigned int unsigned long unsigned long arg2
Initial value:
{
register unsigned long reg1 asm ( XEN_REG1 ) = arg1

Definition at line 67 of file xen.h.

Referenced by asm(), b44_phy_read(), b44_phy_write(), and phantom_issue_cmd().

◆ arg3

unsigned int unsigned long unsigned long unsigned long arg3
Initial value:
{
register unsigned long reg1 asm ( XEN_REG1 ) = arg1

Definition at line 91 of file xen.h.

Referenced by asm(), b44_phy_read(), b44_phy_write(), and phantom_issue_cmd().

◆ arg4

unsigned int unsigned long unsigned long unsigned long unsigned long arg4
Initial value:
{
register unsigned long reg1 asm ( XEN_REG1 ) = arg1

Definition at line 119 of file xen.h.

Referenced by asm(), b44_phy_read(), and b44_phy_write().

◆ arg5

unsigned int unsigned long unsigned long unsigned long unsigned long unsigned long arg5
Initial value:
{
register unsigned long reg1 asm ( XEN_REG1 ) = arg1

Definition at line 149 of file xen.h.

Referenced by asm(), and b44_phy_write().