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 261 */
 
#define FLAT_RING3_DS32   0xe02b /* GDT index 262 */
 
#define FLAT_RING3_DS64   0x0000 /* NULL selector */
 
#define FLAT_RING3_SS32   0xe02b /* GDT index 262 */
 
#define FLAT_RING3_SS64   0xe02b /* GDT index 262 */
 
#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   mk_unsigned_long(__HYPERVISOR_VIRT_START)
 
#define HYPERVISOR_VIRT_END   mk_unsigned_long(__HYPERVISOR_VIRT_END)
 
#define MACH2PHYS_VIRT_START   mk_unsigned_long(__MACH2PHYS_VIRT_START)
 
#define MACH2PHYS_VIRT_END   mk_unsigned_long(__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 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 48 of file xen-x86_64.h.

◆ FLAT_RING3_CS64

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

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

◆ FLAT_RING3_DS32

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

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

◆ FLAT_RING3_DS64

#define FLAT_RING3_DS64   0x0000 /* NULL selector */

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

◆ FLAT_RING3_SS32

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

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

◆ FLAT_RING3_SS64

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

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

◆ FLAT_KERNEL_DS64

#define FLAT_KERNEL_DS64   FLAT_RING3_DS64

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

◆ FLAT_KERNEL_DS32

#define FLAT_KERNEL_DS32   FLAT_RING3_DS32

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

◆ FLAT_KERNEL_DS

#define FLAT_KERNEL_DS   FLAT_KERNEL_DS64

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

◆ FLAT_KERNEL_CS64

#define FLAT_KERNEL_CS64   FLAT_RING3_CS64

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

◆ FLAT_KERNEL_CS32

#define FLAT_KERNEL_CS32   FLAT_RING3_CS32

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

◆ FLAT_KERNEL_CS

#define FLAT_KERNEL_CS   FLAT_KERNEL_CS64

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

◆ FLAT_KERNEL_SS64

#define FLAT_KERNEL_SS64   FLAT_RING3_SS64

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

◆ FLAT_KERNEL_SS32

#define FLAT_KERNEL_SS32   FLAT_RING3_SS32

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

◆ FLAT_KERNEL_SS

#define FLAT_KERNEL_SS   FLAT_KERNEL_SS64

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

◆ FLAT_USER_DS64

#define FLAT_USER_DS64   FLAT_RING3_DS64

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

◆ FLAT_USER_DS32

#define FLAT_USER_DS32   FLAT_RING3_DS32

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

◆ FLAT_USER_DS

#define FLAT_USER_DS   FLAT_USER_DS64

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

◆ FLAT_USER_CS64

#define FLAT_USER_CS64   FLAT_RING3_CS64

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

◆ FLAT_USER_CS32

#define FLAT_USER_CS32   FLAT_RING3_CS32

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

◆ FLAT_USER_CS

#define FLAT_USER_CS   FLAT_USER_CS64

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

◆ FLAT_USER_SS64

#define FLAT_USER_SS64   FLAT_RING3_SS64

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

◆ FLAT_USER_SS32

#define FLAT_USER_SS32   FLAT_RING3_SS32

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

◆ FLAT_USER_SS

#define FLAT_USER_SS   FLAT_USER_SS64

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

◆ __HYPERVISOR_VIRT_START

#define __HYPERVISOR_VIRT_START   0xFFFF800000000000

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

◆ __HYPERVISOR_VIRT_END

#define __HYPERVISOR_VIRT_END   0xFFFF880000000000

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

◆ __MACH2PHYS_VIRT_START

#define __MACH2PHYS_VIRT_START   0xFFFF800000000000

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

◆ __MACH2PHYS_VIRT_END

#define __MACH2PHYS_VIRT_END   0xFFFF804000000000

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

◆ HYPERVISOR_VIRT_START

#define HYPERVISOR_VIRT_START   mk_unsigned_long(__HYPERVISOR_VIRT_START)

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

◆ HYPERVISOR_VIRT_END

#define HYPERVISOR_VIRT_END   mk_unsigned_long(__HYPERVISOR_VIRT_END)

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

◆ MACH2PHYS_VIRT_START

#define MACH2PHYS_VIRT_START   mk_unsigned_long(__MACH2PHYS_VIRT_START)

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

◆ MACH2PHYS_VIRT_END

#define MACH2PHYS_VIRT_END   mk_unsigned_long(__MACH2PHYS_VIRT_END)

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

◆ MACH2PHYS_NR_ENTRIES

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

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

◆ machine_to_phys_mapping

#define machine_to_phys_mapping   ((unsigned long *)HYPERVISOR_VIRT_START)

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

◆ SEGBASE_FS

#define SEGBASE_FS   0

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

◆ SEGBASE_GS_USER

#define SEGBASE_GS_USER   1

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

◆ SEGBASE_GS_KERNEL

#define SEGBASE_GS_KERNEL   2

Definition at line 99 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 100 of file xen-x86_64.h.

◆ _VGCF_in_syscall

#define _VGCF_in_syscall   8

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

◆ VGCF_in_syscall

#define VGCF_in_syscall   (1<<_VGCF_in_syscall)

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

◆ VGCF_IN_SYSCALL

#define VGCF_IN_SYSCALL   VGCF_in_syscall

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

◆ __DECL_REG

#define __DECL_REG (   name)    uint64_t r ## name

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

◆ xen_pfn_to_cr3

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

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

◆ xen_cr3_to_pfn

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

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

Typedef Documentation

◆ cpu_user_regs_t

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

◆ arch_vcpu_info_t

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

◆ xen_callback_t

typedef unsigned long xen_callback_t

Definition at line 190 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  )