aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/public/arch-ia64.h
blob: ec005549594087edfd1d2c64fbe263f7dd774801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/******************************************************************************
 * arch-ia64/hypervisor-if.h
 * 
 * Guest OS interface to IA64 Xen.
 */

#ifndef __HYPERVISOR_IF_IA64_H__
#define __HYPERVISOR_IF_IA64_H__

// "packed" generates awful code
#define PACKED

/* Pointers are naturally 64 bits in this architecture; no padding needed. */
#define _MEMORY_PADDING(_X)
#define MEMORY_PADDING 

#ifndef __ASSEMBLY__

/* NB. Both the following are 64 bits each. */
typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */

typedef struct
{
} PACKED cpu_user_regs;

/*
 * NB. This may become a 64-bit count with no shift. If this happens then the 
 * structure size will still be 8 bytes, so no other alignments will change.
 */
typedef struct {
    u32  tsc_bits;      /* 0: 32 bits read from the CPU's TSC. */
    u32  tsc_bitshift;  /* 4: 'tsc_bits' uses N:N+31 of TSC.   */
} PACKED tsc_timestamp_t; /* 8 bytes */

#include <asm/tlb.h>	/* TR_ENTRY */

typedef struct {
	unsigned long ipsr;
	unsigned long iip;
	unsigned long ifs;
	unsigned long precover_ifs;
	unsigned long isr;
	unsigned long ifa;
	unsigned long iipa;
	unsigned long iim;
	unsigned long unat;  // not sure if this is needed until NaT arch is done
	unsigned long tpr;
	unsigned long iha;
	unsigned long itir;
	unsigned long itv;
	unsigned long pmv;
	unsigned long cmcv;
	unsigned long pta;
	int interrupt_collection_enabled; // virtual psr.ic
	int interrupt_delivery_enabled; // virtual psr.i
	int pending_interruption;
	int incomplete_regframe;	// see SDM vol2 6.8
	unsigned long delivery_mask[4];
	int metaphysical_mode;	// 1 = use metaphys mapping, 0 = use virtual
	int banknum;	// 0 or 1, which virtual register bank is active
	unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
	unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
	unsigned long rrs[8];	// region registers
	unsigned long krs[8];	// kernel registers
	unsigned long pkrs[8];	// protection key registers
	unsigned long tmp[8];	// temp registers (e.g. for hyperprivops)
//} PACKED arch_shared_info_t;
} arch_vcpu_info_t;		// DON'T PACK 

typedef struct {
} arch_shared_info_t;		// DON'T PACK 

/*
 * The following is all CPU context. Note that the i387_ctxt block is filled 
 * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
 */
typedef struct vcpu_guest_context {
    //unsigned long flags;
} PACKED vcpu_guest_context_t;

#endif /* !__ASSEMBLY__ */

#define	XEN_HYPER_RFI			1
#define	XEN_HYPER_RSM_DT		2
#define	XEN_HYPER_SSM_DT		3
#define	XEN_HYPER_COVER			4
#define	XEN_HYPER_ITC_D			5
#define	XEN_HYPER_ITC_I			6
#define	XEN_HYPER_SSM_I			7

#endif /* __HYPERVISOR_IF_IA64_H__ */