Page MenuHomeFreeBSD

arm64: Ensure sctlr and pstate are in known states
ClosedPublic

Authored by andrew on Jun 7 2024, 2:25 PM.
Tags
None
Referenced Files
F89086976: D45528.diff
Tue, Jul 23, 9:58 AM
Unknown Object (File)
Mon, Jul 22, 7:43 AM
Unknown Object (File)
Fri, Jul 5, 6:26 PM
Unknown Object (File)
Thu, Jul 4, 8:18 AM
Unknown Object (File)
Mon, Jul 1, 12:59 AM
Unknown Object (File)
Jun 23 2024, 12:20 AM
Unknown Object (File)
Jun 16 2024, 7:04 AM
Unknown Object (File)
Jun 16 2024, 6:42 AM
Subscribers

Details

Summary

Before entering the kernel exception level ensure sctlr_el2 and
sctlr_el1 are in a known state. The EOS flag needs to be set to ensure
an eret instruction is a context synchronization event.

Set spcr_el1 when entering the kernel from EL1 and use an eret
instruction to return to the caller. This ensures the CPU pstate is
consistent with the value in spcr_el1 as it is the only way to set it
directly.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable