File tree Expand file tree Collapse file tree 5 files changed +24
-47
lines changed Expand file tree Collapse file tree 5 files changed +24
-47
lines changed Original file line number Diff line number Diff line change 7575.endm
7676
7777/*------------------------------------------------------------------------*/
78- .macro EXCEPTION_PROLOGUE
78+ .macro EXCEPTION_PROLOGUE_KEEP_AE
7979
8080 ; Before jumping to Exception Vector , hardware micro - ops did following :
8181 ; 1. SP auto- switched to kernel mode stack
104104 ; OUTPUT : r10 has ECR expected by EV_Trap
105105.endm
106106
107+ .macro EXCEPTION_PROLOGUE
108+
109+ EXCEPTION_PROLOGUE_KEEP_AE ; return ECR in r10
110+
111+ lr r0 , [efa ]
112+ mov r1 , sp
113+
114+ FAKE_RET_FROM_EXCPN ; clobbers r9
115+ .endm
116+
107117/*------------------------------------------------------------------------
108118 * This macro saves the registers manually which would normally be autosaved
109119 * by hardware on taken interrupts. It is used by
Original file line number Diff line number Diff line change 140140 *
141141 * After this it is safe to call the "C" handlers
142142 *-------------------------------------------------------------*/
143- .macro EXCEPTION_PROLOGUE
143+ .macro EXCEPTION_PROLOGUE_KEEP_AE
144144
145145 /* Need at least 1 reg to code the early exception prologue */
146146 PROLOG_FREEUP_REG r9 , @ex_saved_reg1
179179 ; OUTPUT : r10 has ECR expected by EV_Trap
180180.endm
181181
182+ .macro EXCEPTION_PROLOGUE
183+
184+ EXCEPTION_PROLOGUE_KEEP_AE ; return ECR in r10
185+
186+ lr r0 , [efa ]
187+ mov r1 , sp
188+
189+ FAKE_RET_FROM_EXCPN ; clobbers r9
190+ .endm
191+
182192/*--------------------------------------------------------------
183193 * Restore all registers used by system call or Exceptions
184194 * SP should always be pointing to the next free stack element
Original file line number Diff line number Diff line change @@ -125,11 +125,6 @@ ENTRY(mem_service)
125125
126126 EXCEPTION_PROLOGUE
127127
128- lr r0 , [ efa ]
129- mov r1 , sp
130-
131- FAKE_RET_FROM_EXCPN
132-
133128 bl do_memory_error
134129 b ret_from_exception
135130END(mem_service)
@@ -138,11 +133,6 @@ ENTRY(EV_Misaligned)
138133
139134 EXCEPTION_PROLOGUE
140135
141- lr r0 , [ efa ] ; Faulting Data address
142- mov r1 , sp
143-
144- FAKE_RET_FROM_EXCPN
145-
146136 SAVE_CALLEE_SAVED_USER
147137 mov r2 , sp ; callee_regs
148138
@@ -163,11 +153,6 @@ ENTRY(EV_TLBProtV)
163153
164154 EXCEPTION_PROLOGUE
165155
166- lr r0 , [ efa ] ; Faulting Data address
167- mov r1 , sp ; pt_regs
168-
169- FAKE_RET_FROM_EXCPN
170-
171156 mov blink , ret_from_exception
172157 b do_page_fault
173158
Original file line number Diff line number Diff line change @@ -256,16 +256,6 @@ ENTRY(EV_TLBProtV)
256256
257257 EXCEPTION_PROLOGUE ; ECR returned in r10
258258
259- lr r0 , [ efa ] ; Faulting Data address (not part of pt_regs saved above)
260-
261- ; Exception auto-disables further Intr/exceptions.
262- ; Re-enable them by pretending to return from exception
263- ; (so rest of handler executes in pure K mode)
264-
265- FAKE_RET_FROM_EXCPN
266-
267- mov r1 , sp ; Handle to pt_regs
268-
269259 ;------ (5) Type of Protection Violation? ----------
270260 ;
271261 ; ProtV Hardware Exception is triggered for Access Faults of 2 types
@@ -301,9 +291,6 @@ END(EV_TLBProtV)
301291ENTRY(call_do_page_fault)
302292
303293 EXCEPTION_PROLOGUE
304- lr r0 , [ efa ] ; Faulting Data address
305- mov r1 , sp
306- FAKE_RET_FROM_EXCPN
307294
308295 mov blink , ret_from_exception
309296 b do_page_fault
Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ ENTRY(instr_service)
8080
8181 EXCEPTION_PROLOGUE
8282
83- lr r0 , [ efa ]
84- mov r1 , sp
85-
86- FAKE_RET_FROM_EXCPN
87-
8883 bl do_insterror_or_kprobe
8984 b ret_from_exception
9085END(instr_service)
@@ -95,7 +90,7 @@ END(instr_service)
9590
9691ENTRY(EV_MachineCheck)
9792
98- EXCEPTION_PROLOGUE ; ECR returned in r10
93+ EXCEPTION_PROLOGUE_KEEP_AE ; ECR returned in r10
9994
10095 lr r0 , [ efa ]
10196 mov r1 , sp
@@ -125,11 +120,6 @@ ENTRY(EV_PrivilegeV)
125120
126121 EXCEPTION_PROLOGUE
127122
128- lr r0 , [ efa ]
129- mov r1 , sp
130-
131- FAKE_RET_FROM_EXCPN
132-
133123 bl do_privilege_fault
134124 b ret_from_exception
135125END(EV_PrivilegeV)
@@ -141,11 +131,6 @@ ENTRY(EV_Extension)
141131
142132 EXCEPTION_PROLOGUE
143133
144- lr r0 , [ efa ]
145- mov r1 , sp
146-
147- FAKE_RET_FROM_EXCPN
148-
149134 bl do_extension_fault
150135 b ret_from_exception
151136END(EV_Extension)
@@ -225,7 +210,7 @@ trap_with_param:
225210
226211ENTRY(EV_Trap)
227212
228- EXCEPTION_PROLOGUE
213+ EXCEPTION_PROLOGUE_KEEP_AE
229214
230215 lr r12 , [ efa ]
231216
You can’t perform that action at this time.
0 commit comments