Skip to content

[exceptions] add SP_EL0 reg saving and loading #3

Description

@ZackyGameDev

right now whenever an exception occurs, it goes to exceptions.s and all the registers relevant are saved to memory on stack. then that memory is read by the rust exception_handler_el1 as a "ExceptionContext" struct object.

However currently one register which is not saved is SP_EL0 register.

i wish for the exceptions.s to also save the SP_EL0 register. and for rust to be able to correctly read it into the ExceptionContext struct.

This will involve adding a new member in the ExceptionContext struct called "sp_el0: u64" and the SAVE_REG and LOAD_REG macros should properly deal with it. while properly handling all the alignments and such.

basically exception context saving and loading should also include sp_el0 register.

right now process scheduling needs to save and load sp_el0 register separately. so if this feature is implemented, sp_el0 saving and loading could occur through the ExceptionContext saving and loading itself. making it more streamlined.

Metadata

Metadata

Assignees

Labels

assemblyNeed to write asm directly in `*.s` files or `asm!` macrosenhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions