This source file includes following definitions.
- set_prefix
- store_prefix
1
2
3
4
5
6
7
8
9 #ifndef _ASM_S390_LOWCORE_H
10 #define _ASM_S390_LOWCORE_H
11
12 #include <linux/types.h>
13 #include <asm/ptrace.h>
14 #include <asm/cpu.h>
15 #include <asm/types.h>
16
17 #define LC_ORDER 1
18 #define LC_PAGES 2
19
20 struct lowcore {
21 __u8 pad_0x0000[0x0014-0x0000];
22 __u32 ipl_parmblock_ptr;
23 __u8 pad_0x0018[0x0080-0x0018];
24 __u32 ext_params;
25 __u16 ext_cpu_addr;
26 __u16 ext_int_code;
27 __u16 svc_ilc;
28 __u16 svc_code;
29 __u16 pgm_ilc;
30 __u16 pgm_code;
31 __u32 data_exc_code;
32 __u16 mon_class_num;
33 __u8 per_code;
34 __u8 per_atmid;
35 __u64 per_address;
36 __u8 exc_access_id;
37 __u8 per_access_id;
38 __u8 op_access_id;
39 __u8 ar_mode_id;
40 __u8 pad_0x00a4[0x00a8-0x00a4];
41 __u64 trans_exc_code;
42 __u64 monitor_code;
43 __u16 subchannel_id;
44 __u16 subchannel_nr;
45 __u32 io_int_parm;
46 __u32 io_int_word;
47 __u8 pad_0x00c4[0x00c8-0x00c4];
48 __u32 stfl_fac_list;
49 __u8 pad_0x00cc[0x00e8-0x00cc];
50 __u64 mcck_interruption_code;
51 __u8 pad_0x00f0[0x00f4-0x00f0];
52 __u32 external_damage_code;
53 __u64 failing_storage_address;
54 __u8 pad_0x0100[0x0110-0x0100];
55 __u64 breaking_event_addr;
56 __u8 pad_0x0118[0x0120-0x0118];
57 psw_t restart_old_psw;
58 psw_t external_old_psw;
59 psw_t svc_old_psw;
60 psw_t program_old_psw;
61 psw_t mcck_old_psw;
62 psw_t io_old_psw;
63 __u8 pad_0x0180[0x01a0-0x0180];
64 psw_t restart_psw;
65 psw_t external_new_psw;
66 psw_t svc_new_psw;
67 psw_t program_new_psw;
68 psw_t mcck_new_psw;
69 psw_t io_new_psw;
70
71
72 __u64 save_area_sync[8];
73 __u64 save_area_async[8];
74 __u64 save_area_restart[1];
75
76
77 __u64 cpu_flags;
78
79
80 psw_t return_psw;
81 psw_t return_mcck_psw;
82
83
84 __u64 sync_enter_timer;
85 __u64 async_enter_timer;
86 __u64 mcck_enter_timer;
87 __u64 exit_timer;
88 __u64 user_timer;
89 __u64 guest_timer;
90 __u64 system_timer;
91 __u64 hardirq_timer;
92 __u64 softirq_timer;
93 __u64 steal_timer;
94 __u64 avg_steal_timer;
95 __u64 last_update_timer;
96 __u64 last_update_clock;
97 __u64 int_clock;
98 __u64 mcck_clock;
99 __u64 clock_comparator;
100 __u64 boot_clock[2];
101
102
103 __u64 current_task;
104 __u64 kernel_stack;
105
106
107 __u64 async_stack;
108 __u64 nodat_stack;
109 __u64 restart_stack;
110
111
112 __u64 restart_fn;
113 __u64 restart_data;
114 __u64 restart_source;
115
116
117 __u64 kernel_asce;
118 __u64 user_asce;
119 __u64 vdso_asce;
120
121
122
123
124
125
126 __u32 lpp;
127 __u32 current_pid;
128
129
130 __u32 cpu_nr;
131 __u32 softirq_pending;
132 __s32 preempt_count;
133 __u32 spinlock_lockval;
134 __u32 spinlock_index;
135 __u32 fpu_flags;
136 __u64 percpu_offset;
137 __u64 vdso_per_cpu_data;
138 __u64 machine_flags;
139 __u64 gmap;
140 __u8 pad_0x03d8[0x0400-0x03d8];
141
142
143 __u16 br_r1_trampoline;
144 __u32 return_lpswe;
145 __u32 return_mcck_lpswe;
146 __u8 pad_0x040a[0x0e00-0x040a];
147
148
149
150
151
152
153 __u64 ipib;
154 __u32 ipib_checksum;
155 __u64 vmcore_info;
156 __u8 pad_0x0e14[0x0e18-0x0e14];
157 __u64 os_info;
158 __u8 pad_0x0e20[0x0f00-0x0e20];
159
160
161 __u64 stfle_fac_list[16];
162 __u64 alt_stfle_fac_list[16];
163 __u8 pad_0x1000[0x11b0-0x1000];
164
165
166 __u64 mcesad;
167
168
169 __u64 ext_params2;
170 __u8 pad_0x11c0[0x1200-0x11C0];
171
172
173 __u64 floating_pt_save_area[16];
174 __u64 gpregs_save_area[16];
175 psw_t psw_save_area;
176 __u8 pad_0x1310[0x1318-0x1310];
177 __u32 prefixreg_save_area;
178 __u32 fpt_creg_save_area;
179 __u8 pad_0x1320[0x1324-0x1320];
180 __u32 tod_progreg_save_area;
181 __u32 cpu_timer_save_area[2];
182 __u32 clock_comp_save_area[2];
183 __u8 pad_0x1338[0x1340-0x1338];
184 __u32 access_regs_save_area[16];
185 __u64 cregs_save_area[16];
186 __u8 pad_0x1400[0x1800-0x1400];
187
188
189 __u8 pgm_tdb[256];
190 __u8 pad_0x1900[0x2000-0x1900];
191 } __packed __aligned(8192);
192
193 #define S390_lowcore (*((struct lowcore *) 0))
194
195 extern struct lowcore *lowcore_ptr[];
196
197 static inline void set_prefix(__u32 address)
198 {
199 asm volatile("spx %0" : : "Q" (address) : "memory");
200 }
201
202 static inline __u32 store_prefix(void)
203 {
204 __u32 address;
205
206 asm volatile("stpx %0" : "=Q" (address));
207 return address;
208 }
209
210 #endif