mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
Kernel/aarch64: Handle exceptions from lower exception level (EL)
When we execute in userspace, the exception level is EL0, so to handle exceptions, such as interrupts, and syscalls, we need to add handlers to vector_table.S. For now we only support running userspace applications in AArch64 mode, so this commit only adds the handlers for that mode.
This commit is contained in:
parent
7be7324287
commit
c7802cef25
|
@ -128,10 +128,10 @@ vector_table_el1:
|
|||
table_entry system_error_current_elsp_elx
|
||||
|
||||
// Exceptions from Lower EL, where causing application is in AArch64 mode
|
||||
unimplemented_entry
|
||||
unimplemented_entry
|
||||
unimplemented_entry
|
||||
unimplemented_entry
|
||||
table_entry synchronous_lower_el
|
||||
table_entry irq_lower_el
|
||||
table_entry fiq_lower_el
|
||||
table_entry system_error_lower_el
|
||||
|
||||
// Exceptions from Lower EL, where causing application is in AArch32 mode
|
||||
unimplemented_entry
|
||||
|
@ -187,6 +187,30 @@ system_error_current_elsp_el0:
|
|||
restore_previous_context
|
||||
eret
|
||||
|
||||
synchronous_lower_el:
|
||||
save_current_context
|
||||
bl exception_common
|
||||
restore_previous_context
|
||||
eret
|
||||
|
||||
irq_lower_el:
|
||||
save_current_context
|
||||
bl handle_interrupt
|
||||
restore_previous_context
|
||||
eret
|
||||
|
||||
fiq_lower_el:
|
||||
save_current_context
|
||||
bl exception_common
|
||||
restore_previous_context
|
||||
eret
|
||||
|
||||
system_error_lower_el:
|
||||
save_current_context
|
||||
bl exception_common
|
||||
restore_previous_context
|
||||
eret
|
||||
|
||||
.global restore_context_and_eret
|
||||
restore_context_and_eret:
|
||||
restore_previous_context
|
||||
|
|
Loading…
Reference in a new issue