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 75
75
.endm
76
76
77
77
/*------------------------------------------------------------------------*/
78
- .macro EXCEPTION_PROLOGUE
78
+ .macro EXCEPTION_PROLOGUE_KEEP_AE
79
79
80
80
; Before jumping to Exception Vector , hardware micro - ops did following :
81
81
; 1. SP auto- switched to kernel mode stack
104
104
; OUTPUT : r10 has ECR expected by EV_Trap
105
105
.endm
106
106
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
+
107
117
/*------------------------------------------------------------------------
108
118
* This macro saves the registers manually which would normally be autosaved
109
119
* by hardware on taken interrupts. It is used by
Original file line number Diff line number Diff line change 140
140
*
141
141
* After this it is safe to call the "C" handlers
142
142
*-------------------------------------------------------------*/
143
- .macro EXCEPTION_PROLOGUE
143
+ .macro EXCEPTION_PROLOGUE_KEEP_AE
144
144
145
145
/* Need at least 1 reg to code the early exception prologue */
146
146
PROLOG_FREEUP_REG r9 , @ex_saved_reg1
179
179
; OUTPUT : r10 has ECR expected by EV_Trap
180
180
.endm
181
181
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
+
182
192
/*--------------------------------------------------------------
183
193
* Restore all registers used by system call or Exceptions
184
194
* 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)
125
125
126
126
EXCEPTION_PROLOGUE
127
127
128
- lr r0 , [ efa ]
129
- mov r1 , sp
130
-
131
- FAKE_RET_FROM_EXCPN
132
-
133
128
bl do_memory_error
134
129
b ret_from_exception
135
130
END(mem_service)
@@ -138,11 +133,6 @@ ENTRY(EV_Misaligned)
138
133
139
134
EXCEPTION_PROLOGUE
140
135
141
- lr r0 , [ efa ] ; Faulting Data address
142
- mov r1 , sp
143
-
144
- FAKE_RET_FROM_EXCPN
145
-
146
136
SAVE_CALLEE_SAVED_USER
147
137
mov r2 , sp ; callee_regs
148
138
@@ -163,11 +153,6 @@ ENTRY(EV_TLBProtV)
163
153
164
154
EXCEPTION_PROLOGUE
165
155
166
- lr r0 , [ efa ] ; Faulting Data address
167
- mov r1 , sp ; pt_regs
168
-
169
- FAKE_RET_FROM_EXCPN
170
-
171
156
mov blink , ret_from_exception
172
157
b do_page_fault
173
158
Original file line number Diff line number Diff line change @@ -256,16 +256,6 @@ ENTRY(EV_TLBProtV)
256
256
257
257
EXCEPTION_PROLOGUE ; ECR returned in r10
258
258
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
-
269
259
;------ (5) Type of Protection Violation? ----------
270
260
;
271
261
; ProtV Hardware Exception is triggered for Access Faults of 2 types
@@ -301,9 +291,6 @@ END(EV_TLBProtV)
301
291
ENTRY(call_do_page_fault)
302
292
303
293
EXCEPTION_PROLOGUE
304
- lr r0 , [ efa ] ; Faulting Data address
305
- mov r1 , sp
306
- FAKE_RET_FROM_EXCPN
307
294
308
295
mov blink , ret_from_exception
309
296
b do_page_fault
Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ ENTRY(instr_service)
80
80
81
81
EXCEPTION_PROLOGUE
82
82
83
- lr r0 , [ efa ]
84
- mov r1 , sp
85
-
86
- FAKE_RET_FROM_EXCPN
87
-
88
83
bl do_insterror_or_kprobe
89
84
b ret_from_exception
90
85
END(instr_service)
@@ -95,7 +90,7 @@ END(instr_service)
95
90
96
91
ENTRY(EV_MachineCheck)
97
92
98
- EXCEPTION_PROLOGUE ; ECR returned in r10
93
+ EXCEPTION_PROLOGUE_KEEP_AE ; ECR returned in r10
99
94
100
95
lr r0 , [ efa ]
101
96
mov r1 , sp
@@ -128,11 +123,6 @@ ENTRY(EV_PrivilegeV)
128
123
129
124
EXCEPTION_PROLOGUE
130
125
131
- lr r0 , [ efa ]
132
- mov r1 , sp
133
-
134
- FAKE_RET_FROM_EXCPN
135
-
136
126
bl do_privilege_fault
137
127
b ret_from_exception
138
128
END(EV_PrivilegeV)
@@ -144,11 +134,6 @@ ENTRY(EV_Extension)
144
134
145
135
EXCEPTION_PROLOGUE
146
136
147
- lr r0 , [ efa ]
148
- mov r1 , sp
149
-
150
- FAKE_RET_FROM_EXCPN
151
-
152
137
bl do_extension_fault
153
138
b ret_from_exception
154
139
END(EV_Extension)
@@ -229,7 +214,7 @@ trap_with_param:
229
214
230
215
ENTRY(EV_Trap)
231
216
232
- EXCEPTION_PROLOGUE
217
+ EXCEPTION_PROLOGUE_KEEP_AE
233
218
234
219
lr r12 , [ efa ]
235
220
You can’t perform that action at this time.
0 commit comments