Go to the documentation of this file.
15 #ifndef _ASM_IA64_MCA_ASM_H
16 #define _ASM_IA64_MCA_ASM_H
18 #include <asm/percpu.h>
34 #define INST_VA_TO_PA(addr) \
35 dep addr = 0, addr, 61, 3
42 #define DATA_VA_TO_PA(addr) \
50 #define DATA_PA_TO_VA(addr,temp) \
52 dep addr = temp, addr, 61, 3
54 #define GET_THIS_PADDR(reg, var) \
55 mov reg = IA64_KR(PER_CPU_DATA);; \
56 addl reg = THIS_CPU(var), reg
82 #define PHYSICAL_MODE_ENTER(temp1, temp2, start_addr, old_psr) \
85 dep old_psr = 0, old_psr, 32, 32; \
90 mov temp2 = ar.bspstore; \
92 DATA_VA_TO_PA(temp2); \
94 mov temp1 = ar.rnat; \
96 mov ar.bspstore = temp2; \
98 mov ar.rnat = temp1; \
103 dep temp2 = 0, temp2, PSR_IC, 2; \
108 dep temp1 = 0, temp1, 32, 32; \
110 dep temp1 = 0, temp1, PSR_IT, 1; \
112 dep temp1 = 0, temp1, PSR_DT, 1; \
114 dep temp1 = 0, temp1, PSR_RT, 1; \
116 dep temp1 = 0, temp1, PSR_I, 1; \
118 dep temp1 = 0, temp1, PSR_IC, 1; \
120 dep temp1 = -1, temp1, PSR_MC, 1; \
122 mov cr.ipsr = temp1; \
124 LOAD_PHYSICAL(p0, temp2, start_addr); \
126 mov cr.iip = temp2; \
162 #define VIRTUAL_MODE_ENTER(temp1, temp2, start_addr, old_psr) \
165 mov old_psr = temp2; \
167 dep temp2 = 0, temp2, PSR_IC, 2; \
174 mov temp2 = ar.bspstore; \
176 DATA_PA_TO_VA(temp2,temp1); \
178 mov temp1 = ar.rnat; \
180 mov ar.bspstore = temp2; \
182 mov ar.rnat = temp1; \
184 mov temp1 = old_psr; \
188 dep temp1 = temp2, temp1, PSR_IC, 1; \
190 dep temp1 = temp2, temp1, PSR_IT, 1; \
192 dep temp1 = temp2, temp1, PSR_DT, 1; \
194 dep temp1 = temp2, temp1, PSR_RT, 1; \
196 dep temp1 = temp2, temp1, PSR_BN, 1; \
199 mov cr.ipsr = temp1; \
200 movl temp2 = start_addr; \
202 mov cr.iip = temp2; \
205 DATA_PA_TO_VA(sp, temp1); \
238 #define ALIGN16(x) ((x)&~15)
239 #define MCA_PT_REGS_OFFSET ALIGN16(KERNEL_STACK_SIZE-IA64_PT_REGS_SIZE)
240 #define MCA_SWITCH_STACK_OFFSET ALIGN16(MCA_PT_REGS_OFFSET-IA64_SWITCH_STACK_SIZE)
241 #define MCA_SOS_OFFSET ALIGN16(MCA_SWITCH_STACK_OFFSET-IA64_SAL_OS_STATE_SIZE)
242 #define MCA_SP_OFFSET ALIGN16(MCA_SOS_OFFSET-16)