mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
ArmPkg: Refactored SVC handling.
This commit is contained in:
parent
2ca7937d11
commit
6a09c07791
@ -89,7 +89,7 @@
|
|||||||
UINT64 FPSR; 0x310 // Floating Point Status Register
|
UINT64 FPSR; 0x310 // Floating Point Status Register
|
||||||
UINT64 ESR; 0x318 // Exception syndrome register
|
UINT64 ESR; 0x318 // Exception syndrome register
|
||||||
UINT64 FAR; 0x320 // Fault Address Register
|
UINT64 FAR; 0x320 // Fault Address Register
|
||||||
UINT64 Padding;0x328 // Required for stack alignment
|
UINT64 Type; 0x328 // Exception Type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GCC_ASM_EXPORT(ExceptionHandlersEnd)
|
GCC_ASM_EXPORT(ExceptionHandlersEnd)
|
||||||
@ -246,7 +246,7 @@ ASM_PFX(CommonExceptionEntry):
|
|||||||
// Save the SYS regs
|
// Save the SYS regs
|
||||||
stp x2, x3, [x28, #-SYS_CONTEXT_SIZE]!
|
stp x2, x3, [x28, #-SYS_CONTEXT_SIZE]!
|
||||||
stp x4, x5, [x28, #0x10]
|
stp x4, x5, [x28, #0x10]
|
||||||
str x6, [x28, #0x20]
|
stp x6, x0, [x28, #0x20]
|
||||||
|
|
||||||
// Push FP regs to Stack.
|
// Push FP regs to Stack.
|
||||||
stp q0, q1, [x28, #-FP_CONTEXT_SIZE]!
|
stp q0, q1, [x28, #-FP_CONTEXT_SIZE]!
|
||||||
@ -336,12 +336,9 @@ NoTTBR0Switch2:
|
|||||||
ldp x24, x25, [sp, #0xc0]
|
ldp x24, x25, [sp, #0xc0]
|
||||||
ldp x26, x27, [sp, #0xd0]
|
ldp x26, x27, [sp, #0xd0]
|
||||||
// Preserve return value for SVC.
|
// Preserve return value for SVC.
|
||||||
ldr x1, [x28, #(FP_CONTEXT_SIZE + 0x18)] // Exception syndrome register
|
ldr x1, [x28, #(FP_CONTEXT_SIZE + 0x28)] // Exception type
|
||||||
lsr x1, x1, #26
|
cmp x1, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
|
||||||
and x1, x1, #0x3F
|
|
||||||
cmp x1, #0x15
|
|
||||||
b.eq is_SVC
|
b.eq is_SVC
|
||||||
|
|
||||||
ldp x0, x1, [sp], #0xe0
|
ldp x0, x1, [sp], #0xe0
|
||||||
b continue
|
b continue
|
||||||
is_SVC:
|
is_SVC:
|
||||||
|
@ -155,9 +155,6 @@ CommonCExceptionHandler (
|
|||||||
if ((UINTN)ExceptionType <= gMaxExceptionNumber) {
|
if ((UINTN)ExceptionType <= gMaxExceptionNumber) {
|
||||||
if (gExceptionHandlers[ExceptionType]) {
|
if (gExceptionHandlers[ExceptionType]) {
|
||||||
gExceptionHandlers[ExceptionType](ExceptionType, SystemContext);
|
gExceptionHandlers[ExceptionType](ExceptionType, SystemContext);
|
||||||
#if defined (MDE_CPU_AARCH64)
|
|
||||||
SystemContext.SystemContextAArch64->ESR = 0;
|
|
||||||
#endif
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user