iPXE
Data Structures | Macros | Typedefs | Functions
xen-x86_64.h File Reference

Go to the source code of this file.

Data Structures

struct  iret_context
 
struct  cpu_user_regs
 
struct  arch_vcpu_info
 

Macros

#define FLAT_RING3_CS32   0xe023 /* GDT index 260 */
 
#define FLAT_RING3_CS64   0xe033 /* GDT index 262 */
 
#define FLAT_RING3_DS32   0xe02b /* GDT index 261 */
 
#define FLAT_RING3_DS64   0x0000 /* NULL selector */
 
#define FLAT_RING3_SS32   0xe02b /* GDT index 261 */
 
#define FLAT_RING3_SS64   0xe02b /* GDT index 261 */
 
#define FLAT_KERNEL_DS64   FLAT_RING3_DS64
 
#define FLAT_KERNEL_DS32   FLAT_RING3_DS32
 
#define FLAT_KERNEL_DS   FLAT_KERNEL_DS64
 
#define FLAT_KERNEL_CS64   FLAT_RING3_CS64
 
#define FLAT_KERNEL_CS32   FLAT_RING3_CS32
 
#define FLAT_KERNEL_CS   FLAT_KERNEL_CS64
 
#define FLAT_KERNEL_SS64   FLAT_RING3_SS64
 
#define FLAT_KERNEL_SS32   FLAT_RING3_SS32
 
#define FLAT_KERNEL_SS   FLAT_KERNEL_SS64
 
#define FLAT_USER_DS64   FLAT_RING3_DS64
 
#define FLAT_USER_DS32   FLAT_RING3_DS32
 
#define FLAT_USER_DS   FLAT_USER_DS64
 
#define FLAT_USER_CS64   FLAT_RING3_CS64
 
#define FLAT_USER_CS32   FLAT_RING3_CS32
 
#define FLAT_USER_CS   FLAT_USER_CS64
 
#define FLAT_USER_SS64   FLAT_RING3_SS64
 
#define FLAT_USER_SS32   FLAT_RING3_SS32
 
#define FLAT_USER_SS   FLAT_USER_SS64
 
#define __HYPERVISOR_VIRT_START   0xFFFF800000000000
 
#define __HYPERVISOR_VIRT_END   0xFFFF880000000000
 
#define __MACH2PHYS_VIRT_START   0xFFFF800000000000
 
#define __MACH2PHYS_VIRT_END   0xFFFF804000000000
 
#define HYPERVISOR_VIRT_START   xen_mk_ulong(__HYPERVISOR_VIRT_START)
 
#define HYPERVISOR_VIRT_END   xen_mk_ulong(__HYPERVISOR_VIRT_END)
 
#define MACH2PHYS_VIRT_START   xen_mk_ulong(__MACH2PHYS_VIRT_START)
 
#define MACH2PHYS_VIRT_END   xen_mk_ulong(__MACH2PHYS_VIRT_END)
 
#define MACH2PHYS_NR_ENTRIES   ((MACH2PHYS_VIRT_END-MACH2PHYS_VIRT_START)>>3)
 
#define machine_to_phys_mapping   ((unsigned long *)HYPERVISOR_VIRT_START)
 
#define SEGBASE_FS   0
 
#define SEGBASE_GS_USER   1
 
#define SEGBASE_GS_KERNEL   2
 
#define SEGBASE_GS_USER_SEL   3 /* Set user %gs specified in base[15:0] */
 
#define _VGCF_in_syscall   8
 
#define VGCF_in_syscall   (1<<_VGCF_in_syscall)
 
#define VGCF_IN_SYSCALL   VGCF_in_syscall
 
#define __DECL_REG(name)   uint64_t r ## name
 
#define __DECL_REG_LOHI(name)   __DECL_REG(name ## x)
 
#define __DECL_REG_LO8   __DECL_REG
 
#define __DECL_REG_LO16   __DECL_REG
 
#define __DECL_REG_HI(num)   uint64_t r ## num
 
#define xen_pfn_to_cr3(pfn)   ((unsigned long)(pfn) << 12)
 
#define xen_cr3_to_pfn(cr3)   ((unsigned long)(cr3) >> 12)
 

Typedefs

typedef struct cpu_user_regs cpu_user_regs_t
 
typedef struct arch_vcpu_info arch_vcpu_info_t
 
typedef unsigned long xen_callback_t
 

Functions

 FILE_LICENCE (MIT)
 
 DEFINE_XEN_GUEST_HANDLE (cpu_user_regs_t)
 

Macro Definition Documentation

◆ FLAT_RING3_CS32

#define FLAT_RING3_CS32   0xe023 /* GDT index 260 */

Definition at line 31 of file xen-x86_64.h.

◆ FLAT_RING3_CS64

#define FLAT_RING3_CS64   0xe033 /* GDT index 262 */

Definition at line 32 of file xen-x86_64.h.

◆ FLAT_RING3_DS32

#define FLAT_RING3_DS32   0xe02b /* GDT index 261 */

Definition at line 33 of file xen-x86_64.h.

◆ FLAT_RING3_DS64

#define FLAT_RING3_DS64   0x0000 /* NULL selector */

Definition at line 34 of file xen-x86_64.h.

◆ FLAT_RING3_SS32

#define FLAT_RING3_SS32   0xe02b /* GDT index 261 */

Definition at line 35 of file xen-x86_64.h.

◆ FLAT_RING3_SS64

#define FLAT_RING3_SS64   0xe02b /* GDT index 261 */

Definition at line 36 of file xen-x86_64.h.

◆ FLAT_KERNEL_DS64

#define FLAT_KERNEL_DS64   FLAT_RING3_DS64

Definition at line 38 of file xen-x86_64.h.

◆ FLAT_KERNEL_DS32

#define FLAT_KERNEL_DS32   FLAT_RING3_DS32

Definition at line 39 of file xen-x86_64.h.

◆ FLAT_KERNEL_DS

#define FLAT_KERNEL_DS   FLAT_KERNEL_DS64

Definition at line 40 of file xen-x86_64.h.

◆ FLAT_KERNEL_CS64

#define FLAT_KERNEL_CS64   FLAT_RING3_CS64

Definition at line 41 of file xen-x86_64.h.

◆ FLAT_KERNEL_CS32

#define FLAT_KERNEL_CS32   FLAT_RING3_CS32

Definition at line 42 of file xen-x86_64.h.

◆ FLAT_KERNEL_CS

#define FLAT_KERNEL_CS   FLAT_KERNEL_CS64

Definition at line 43 of file xen-x86_64.h.

◆ FLAT_KERNEL_SS64

#define FLAT_KERNEL_SS64   FLAT_RING3_SS64

Definition at line 44 of file xen-x86_64.h.

◆ FLAT_KERNEL_SS32

#define FLAT_KERNEL_SS32   FLAT_RING3_SS32

Definition at line 45 of file xen-x86_64.h.

◆ FLAT_KERNEL_SS

#define FLAT_KERNEL_SS   FLAT_KERNEL_SS64

Definition at line 46 of file xen-x86_64.h.

◆ FLAT_USER_DS64

#define FLAT_USER_DS64   FLAT_RING3_DS64

Definition at line 48 of file xen-x86_64.h.

◆ FLAT_USER_DS32

#define FLAT_USER_DS32   FLAT_RING3_DS32

Definition at line 49 of file xen-x86_64.h.

◆ FLAT_USER_DS

#define FLAT_USER_DS   FLAT_USER_DS64

Definition at line 50 of file xen-x86_64.h.

◆ FLAT_USER_CS64

#define FLAT_USER_CS64   FLAT_RING3_CS64

Definition at line 51 of file xen-x86_64.h.

◆ FLAT_USER_CS32

#define FLAT_USER_CS32   FLAT_RING3_CS32

Definition at line 52 of file xen-x86_64.h.

◆ FLAT_USER_CS

#define FLAT_USER_CS   FLAT_USER_CS64

Definition at line 53 of file xen-x86_64.h.

◆ FLAT_USER_SS64

#define FLAT_USER_SS64   FLAT_RING3_SS64

Definition at line 54 of file xen-x86_64.h.

◆ FLAT_USER_SS32

#define FLAT_USER_SS32   FLAT_RING3_SS32

Definition at line 55 of file xen-x86_64.h.

◆ FLAT_USER_SS

#define FLAT_USER_SS   FLAT_USER_SS64

Definition at line 56 of file xen-x86_64.h.

◆ __HYPERVISOR_VIRT_START

#define __HYPERVISOR_VIRT_START   0xFFFF800000000000

Definition at line 58 of file xen-x86_64.h.

◆ __HYPERVISOR_VIRT_END

#define __HYPERVISOR_VIRT_END   0xFFFF880000000000

Definition at line 59 of file xen-x86_64.h.

◆ __MACH2PHYS_VIRT_START

#define __MACH2PHYS_VIRT_START   0xFFFF800000000000

Definition at line 60 of file xen-x86_64.h.

◆ __MACH2PHYS_VIRT_END

#define __MACH2PHYS_VIRT_END   0xFFFF804000000000

Definition at line 61 of file xen-x86_64.h.

◆ HYPERVISOR_VIRT_START

#define HYPERVISOR_VIRT_START   xen_mk_ulong(__HYPERVISOR_VIRT_START)

Definition at line 64 of file xen-x86_64.h.

◆ HYPERVISOR_VIRT_END

#define HYPERVISOR_VIRT_END   xen_mk_ulong(__HYPERVISOR_VIRT_END)

Definition at line 65 of file xen-x86_64.h.

◆ MACH2PHYS_VIRT_START

#define MACH2PHYS_VIRT_START   xen_mk_ulong(__MACH2PHYS_VIRT_START)

Definition at line 68 of file xen-x86_64.h.

◆ MACH2PHYS_VIRT_END

#define MACH2PHYS_VIRT_END   xen_mk_ulong(__MACH2PHYS_VIRT_END)

Definition at line 69 of file xen-x86_64.h.

◆ MACH2PHYS_NR_ENTRIES

#define MACH2PHYS_NR_ENTRIES   ((MACH2PHYS_VIRT_END-MACH2PHYS_VIRT_START)>>3)

Definition at line 70 of file xen-x86_64.h.

◆ machine_to_phys_mapping

#define machine_to_phys_mapping   ((unsigned long *)HYPERVISOR_VIRT_START)

Definition at line 72 of file xen-x86_64.h.

◆ SEGBASE_FS

#define SEGBASE_FS   0

Definition at line 80 of file xen-x86_64.h.

◆ SEGBASE_GS_USER

#define SEGBASE_GS_USER   1

Definition at line 81 of file xen-x86_64.h.

◆ SEGBASE_GS_KERNEL

#define SEGBASE_GS_KERNEL   2

Definition at line 82 of file xen-x86_64.h.

◆ SEGBASE_GS_USER_SEL

#define SEGBASE_GS_USER_SEL   3 /* Set user %gs specified in base[15:0] */

Definition at line 83 of file xen-x86_64.h.

◆ _VGCF_in_syscall

#define _VGCF_in_syscall   8

Definition at line 106 of file xen-x86_64.h.

◆ VGCF_in_syscall

#define VGCF_in_syscall   (1<<_VGCF_in_syscall)

Definition at line 107 of file xen-x86_64.h.

◆ VGCF_IN_SYSCALL

#define VGCF_IN_SYSCALL   VGCF_in_syscall

Definition at line 108 of file xen-x86_64.h.

◆ __DECL_REG

#define __DECL_REG (   name)    uint64_t r ## name

Definition at line 154 of file xen-x86_64.h.

◆ __DECL_REG_LOHI

#define __DECL_REG_LOHI (   name)    __DECL_REG(name ## x)

Definition at line 158 of file xen-x86_64.h.

◆ __DECL_REG_LO8

#define __DECL_REG_LO8   __DECL_REG

Definition at line 159 of file xen-x86_64.h.

◆ __DECL_REG_LO16

#define __DECL_REG_LO16   __DECL_REG

Definition at line 160 of file xen-x86_64.h.

◆ __DECL_REG_HI

#define __DECL_REG_HI (   num)    uint64_t r ## num

Definition at line 161 of file xen-x86_64.h.

◆ xen_pfn_to_cr3

#define xen_pfn_to_cr3 (   pfn)    ((unsigned long)(pfn) << 12)

Definition at line 203 of file xen-x86_64.h.

◆ xen_cr3_to_pfn

#define xen_cr3_to_pfn (   cr3)    ((unsigned long)(cr3) >> 12)

Definition at line 204 of file xen-x86_64.h.

Typedef Documentation

◆ cpu_user_regs_t

Definition at line 194 of file xen-x86_64.h.

◆ arch_vcpu_info_t

Definition at line 210 of file xen-x86_64.h.

◆ xen_callback_t

typedef unsigned long xen_callback_t

Definition at line 212 of file xen-x86_64.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( MIT  )

◆ DEFINE_XEN_GUEST_HANDLE()

DEFINE_XEN_GUEST_HANDLE ( cpu_user_regs_t  )