Skip to content

Commit

Permalink
Merge pull request #235 from rahulsangwn/master
Browse files Browse the repository at this point in the history
typo fix in lesson02 - rpi-os file
  • Loading branch information
s-matyukevich authored Apr 16, 2021
2 parents 811deae + 8e1b8db commit 31fc148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/lesson02/rpi-os.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ In ARM architecture there is no way how a program can increase its own exception
1. An exception handler is executed and does whatever job it needs to do.
1. Exception handler calls `eret` instruction. This instruction restores processor state from `SPSR_ELn` and resumes execution starting from the address, stored in the `ELR_ELn` register.

In practice the process is a little more complicated because exception handler also needs to store the state of all general purpose registers and restore it back afterwards, but we will discuss this process in details in the next lesson. For now, we need just to understand the process in general and remember the meaning of the `ELR_ELm` and `SPSR_ELn` registers.
In practice the process is a little more complicated because exception handler also needs to store the state of all general purpose registers and restore it back afterwards, but we will discuss this process in details in the next lesson. For now, we need just to understand the process in general and remember the meaning of the `ELR_ELn` and `SPSR_ELn` registers.

An important thing to know is that exception handler is not obliged to return to the same location from which the exception originates. Both `ELR_ELm` and `SPSR_ELn` are writable and exception handler can modify them if it wants to. We are going to use this technique to our advantage when we try to switch from EL3 to EL1 in our code.
An important thing to know is that exception handler is not obliged to return to the same location from which the exception originates. Both `ELR_ELn` and `SPSR_ELn` are writable and exception handler can modify them if it wants to. We are going to use this technique to our advantage when we try to switch from EL3 to EL1 in our code.

### Switching to EL1

Expand Down

0 comments on commit 31fc148

Please sign in to comment.