iPXE
Data Structures | Macros | Functions | Variables
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)
 
struct xen_hypercall __attribute__ ((packed))
 
static __attribute__ ((always_inline)) unsigned long xen_hypercall_1(struct xen_hypervisor *xen
 Issue hypercall with one argument. More...
 
__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. More...
 
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 20 of file xen.h.

◆ XEN_REG2

#define XEN_REG2   "ecx"

Definition at line 21 of file xen.h.

◆ XEN_REG3

#define XEN_REG3   "edx"

Definition at line 22 of file xen.h.

◆ XEN_REG4

#define XEN_REG4   "esi"

Definition at line 23 of file xen.h.

◆ XEN_REG5

#define XEN_REG5   "edi"

Definition at line 24 of file xen.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__() [1/2]

struct xen_hypercall __attribute__ ( (packed)  )

◆ __attribute__() [2/2]

static __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

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

Variable Documentation

◆ code

uint8_t code[32]

Code generated by hypervisor.

Definition at line 12 of file xen.h.

◆ hypercall

static unsigned int hypercall

Definition at line 42 of file xen.h.

Referenced by hv_map_hypercall(), and hv_unmap_hypercall().

◆ arg1

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

Definition at line 43 of file xen.h.

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

◆ retval

return retval

◆ arg2

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

Definition at line 66 of file xen.h.

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

◆ arg3

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

Definition at line 90 of file xen.h.

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

◆ arg4

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

Definition at line 118 of file xen.h.

Referenced by 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
static unsigned int unsigned long arg1
Definition: xen.h:43
#define XEN_REG1
Definition: xen.h:20

Definition at line 148 of file xen.h.

Referenced by b44_phy_write().