Skip to content

Commit

Permalink
arm64: Require that system registers at all visible ELs be initialized
Browse files Browse the repository at this point in the history
Currently we require that software at a higher exception level initialise
all registers at the exception level the kernel will be entered prior to
starting the kernel in order to ensure that there is nothing uninitialised
which could result in an UNKNOWN state while running the kernel. The
expectation is that the software running at the highest exception levels
will be tightly coupled to the system and can ensure that all available
features are appropriately initialised and that the kernel can initialise
anything else.

There is a gap here in the case where new registers are added to lower
exception levels that require initialisation but the kernel does not yet
understand them. Extend the requirement to also include exception levels
below the one where the kernel is entered to cover this.

Suggested-by: Catalin Marinas <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
broonie authored and ctmarinas committed Apr 8, 2021
1 parent 31c00d2 commit 230800c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Documentation/arm64/booting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@ Before jumping into the kernel, the following conditions must be met:

- System registers

All writable architected system registers at the exception level where
the kernel image will be entered must be initialised by software at a
higher exception level to prevent execution in an UNKNOWN state.
All writable architected system registers at or below the exception
level where the kernel image will be entered must be initialised by
software at a higher exception level to prevent execution in an UNKNOWN
state.

- SCR_EL3.FIQ must have the same value across all CPUs the kernel is
executing on.
Expand Down

0 comments on commit 230800c

Please sign in to comment.