~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/asm-ia64/xenprocessor.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _ASM_IA64_XENPROCESSOR_H
 
2
#define _ASM_IA64_XENPROCESSOR_H
 
3
/*
 
4
 * xen specific processor definition
 
5
 *
 
6
 * Copyright (C) 2005 Hewlett-Packard Co.
 
7
 *      Dan Magenheimer (dan.magenheimer@hp.com)
 
8
 *
 
9
 * Copyright (C) 2005 Intel Co.
 
10
 *      Kun Tian (Kevin Tian) <kevin.tian@intel.com>
 
11
 *
 
12
 */
 
13
 
 
14
 
 
15
#define ia64_is_local_fpu_owner(t) 0
 
16
 
 
17
/* like above but expressed as bitfields for more efficient access: */
 
18
struct ia64_psr {
 
19
        __u64 reserved0 : 1;
 
20
        __u64 be : 1;
 
21
        __u64 up : 1;
 
22
        __u64 ac : 1;
 
23
        __u64 mfl : 1;
 
24
        __u64 mfh : 1;
 
25
        __u64 reserved1 : 7;
 
26
        __u64 ic : 1;
 
27
        __u64 i : 1;
 
28
        __u64 pk : 1;
 
29
        __u64 reserved2 : 1;
 
30
        __u64 dt : 1;
 
31
        __u64 dfl : 1;
 
32
        __u64 dfh : 1;
 
33
        __u64 sp : 1;
 
34
        __u64 pp : 1;
 
35
        __u64 di : 1;
 
36
        __u64 si : 1;
 
37
        __u64 db : 1;
 
38
        __u64 lp : 1;
 
39
        __u64 tb : 1;
 
40
        __u64 rt : 1;
 
41
        __u64 reserved3 : 4;
 
42
        __u64 cpl : 2;
 
43
        __u64 is : 1;
 
44
        __u64 mc : 1;
 
45
        __u64 it : 1;
 
46
        __u64 id : 1;
 
47
        __u64 da : 1;
 
48
        __u64 dd : 1;
 
49
        __u64 ss : 1;
 
50
        __u64 ri : 2;
 
51
        __u64 ed : 1;
 
52
        __u64 bn : 1;
 
53
        __u64 ia : 1;
 
54
        __u64 vm : 1;
 
55
        __u64 reserved5 : 17;
 
56
};
 
57
 
 
58
/* vmx like above but expressed as bitfields for more efficient access: */
 
59
typedef  union{
 
60
    __u64 val;
 
61
    struct{
 
62
        __u64 reserved0 : 1;
 
63
        __u64 be : 1;
 
64
        __u64 up : 1;
 
65
        __u64 ac : 1;
 
66
        __u64 mfl : 1;
 
67
        __u64 mfh : 1;
 
68
        __u64 reserved1 : 7;
 
69
        __u64 ic : 1;
 
70
        __u64 i : 1;
 
71
        __u64 pk : 1;
 
72
        __u64 reserved2 : 1;
 
73
        __u64 dt : 1;
 
74
        __u64 dfl : 1;
 
75
        __u64 dfh : 1;
 
76
        __u64 sp : 1;
 
77
        __u64 pp : 1;
 
78
        __u64 di : 1;
 
79
        __u64 si : 1;
 
80
        __u64 db : 1;
 
81
        __u64 lp : 1;
 
82
        __u64 tb : 1;
 
83
        __u64 rt : 1;
 
84
        __u64 reserved3 : 4;
 
85
        __u64 cpl : 2;
 
86
        __u64 is : 1;
 
87
        __u64 mc : 1;
 
88
        __u64 it : 1;
 
89
        __u64 id : 1;
 
90
        __u64 da : 1;
 
91
        __u64 dd : 1;
 
92
        __u64 ss : 1;
 
93
        __u64 ri : 2;
 
94
        __u64 ed : 1;
 
95
        __u64 bn : 1;
 
96
        __u64 reserved4 : 19;
 
97
    };
 
98
}   IA64_PSR;
 
99
 
 
100
typedef union {
 
101
    __u64 val;
 
102
    struct {
 
103
        __u64 code : 16;
 
104
        __u64 vector : 8;
 
105
        __u64 reserved1 : 8;
 
106
        __u64 x : 1;
 
107
        __u64 w : 1;
 
108
        __u64 r : 1;
 
109
        __u64 na : 1;
 
110
        __u64 sp : 1;
 
111
        __u64 rs : 1;
 
112
        __u64 ir : 1;
 
113
        __u64 ni : 1;
 
114
        __u64 so : 1;
 
115
        __u64 ei : 2;
 
116
        __u64 ed : 1;
 
117
        __u64 reserved2 : 20;
 
118
    };
 
119
}   ISR;
 
120
 
 
121
 
 
122
typedef union {
 
123
    __u64 val;
 
124
    struct {
 
125
        __u64 ve : 1;
 
126
        __u64 reserved0 : 1;
 
127
        __u64 size : 6;
 
128
        __u64 vf : 1;
 
129
        __u64 reserved1 : 6;
 
130
        __u64 base : 49;
 
131
    };
 
132
}   PTA;
 
133
 
 
134
typedef union {
 
135
    __u64 val;
 
136
    struct {
 
137
        __u64  rv  : 16;
 
138
        __u64  eid : 8;
 
139
        __u64  id  : 8;
 
140
        __u64  ig  : 32;
 
141
    };
 
142
} LID;
 
143
 
 
144
typedef union{
 
145
    __u64 val;
 
146
    struct {
 
147
        __u64 rv  : 3;
 
148
        __u64 ir  : 1;
 
149
        __u64 eid : 8;
 
150
        __u64 id  : 8;
 
151
        __u64 ib_base : 44;
 
152
    };
 
153
} ipi_a_t;
 
154
 
 
155
typedef union{
 
156
    __u64 val;
 
157
    struct {
 
158
        __u64 vector : 8;
 
159
        __u64 dm  : 3;
 
160
        __u64 ig  : 53;
 
161
    };
 
162
} ipi_d_t;
 
163
 
 
164
typedef union {
 
165
    __u64 val;
 
166
    struct {
 
167
        __u64 ig0 : 4;
 
168
        __u64 mic : 4;
 
169
        __u64 rsv : 8;
 
170
        __u64 mmi : 1;
 
171
        __u64 ig1 : 47;
 
172
    };
 
173
} tpr_t;
 
174
 
 
175
/* indirect register type */
 
176
enum {
 
177
    IA64_CPUID,     /*  cpuid */
 
178
    IA64_DBR,       /*  dbr */
 
179
    IA64_IBR,       /*  ibr */
 
180
    IA64_PKR,       /*  pkr */
 
181
    IA64_PMC,       /*  pmc */
 
182
    IA64_PMD,       /*  pmd */
 
183
    IA64_RR         /*  rr */
 
184
};
 
185
 
 
186
/* instruction type */
 
187
enum {
 
188
    IA64_INST_TPA=1,
 
189
    IA64_INST_TAK
 
190
};
 
191
 
 
192
/* Generate Mask
 
193
 * Parameter:
 
194
 *  bit -- starting bit
 
195
 *  len -- how many bits
 
196
 */
 
197
#define MASK(bit,len)                   \
 
198
({                              \
 
199
        __u64    ret;                    \
 
200
                                \
 
201
        __asm __volatile("dep %0=-1, r0, %1, %2"    \
 
202
                : "=r" (ret):                   \
 
203
          "M" (bit),                    \
 
204
          "M" (len) );                  \
 
205
        ret;                            \
 
206
})
 
207
 
 
208
typedef union {
 
209
        struct {
 
210
                __u64 kr0;
 
211
                __u64 kr1;
 
212
                __u64 kr2;
 
213
                __u64 kr3;
 
214
                __u64 kr4;
 
215
                __u64 kr5;
 
216
                __u64 kr6;
 
217
                __u64 kr7;
 
218
        };
 
219
        __u64 _kr[8];
 
220
} cpu_kr_ia64_t;
 
221
 
 
222
DECLARE_PER_CPU(cpu_kr_ia64_t, cpu_kr);
 
223
 
 
224
typedef union {
 
225
    struct {
 
226
        u64 rv3  :  2; // 0-1
 
227
        u64 ps   :  6; // 2-7
 
228
        u64 key  : 24; // 8-31
 
229
        u64 rv4  : 32; // 32-63
 
230
    };
 
231
    struct {
 
232
        u64 __rv3  : 32; // 0-31
 
233
        // next extension to rv4
 
234
        u64 rid  : 24;  // 32-55
 
235
        u64 __rv4  : 8; // 56-63
 
236
    };
 
237
    u64 itir;
 
238
} ia64_itir_t;
 
239
 
 
240
typedef union {
 
241
        u64 val;
 
242
        struct {
 
243
                u64 v  : 1;
 
244
                u64 wd : 1;
 
245
                u64 rd : 1;
 
246
                u64 xd : 1;
 
247
                u64 reserved1 : 4;
 
248
                u64 key : 24;
 
249
                u64 reserved2 : 32;
 
250
        };
 
251
} ia64_pkr_t;
 
252
 
 
253
#endif // _ASM_IA64_XENPROCESSOR_H