HomeFreeBSD

arm64: Move the FEAT_PAN check later

Description

arm64: Move the FEAT_PAN check later

We only need to enable PAN (Privileged access never) before userspace
is running. Before that there are no unprivileged mappings to protect
the kernel from accessing.

While here switch to use get_kernel_reg to handle the case some CPUs
have FEAT_PAN, while some don't.

Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D52576

Details

Provenance
andrewAuthored on Sep 19 2025, 10:05 AM
Reviewer
emaste
Differential Revision
D52576: arm64: Move the FEAT_PAN check later
Parents
rG088e21000507: release: More fixes for building pkg package
Branches
Unknown
Tags
Unknown