seL4 icon indicating copy to clipboard operation
seL4 copied to clipboard

aarch64 kernel should configure TCR_EL1, MAIR_EL1 and other system registers rather than the loader doing it

Open midnightveil opened this issue 2 months ago • 1 comments

This is instead done by the loader, and seL4 expects these to be setup:

https://github.com/seL4/seL4_tools/blob/26f94df7e97a04f8ee49c1e94a0aa12036581f71/elfloader-tool/src/arch-arm/armv/armv8-a/64/mmu.S#L57-L76

There's several other registers that configure various properties which we expect for other architectures/modes of aarch64.

There's not really any reason not to do this in the kernel.

This would also allow us to enable the TBI (Top Byte Ignore) feature (D8.8 of the ARMv8-A spec)

midnightveil avatar Oct 10 '25 03:10 midnightveil

To clarify, the loader should still program the registers necessary to enable the MMU before jumping to the kernel, but the kernel shouldn't assume anything about that and configure things how it expects it itself.

Indanz avatar Oct 15 '25 14:10 Indanz