HomeFreeBSD

arm64: Initialize x18 for APs earlier during boot

Description

arm64: Initialize x18 for APs earlier during boot

When KMSAN is configured, the instrumentation inserts calls to
__msan_get_context_state() into all function prologues. The
implementation dereferences curthread and thus assumes that x18 points
to the PCPU area. This applies in particular to init_secondary(), which
currently is responsible for initializing x18 for APs.

Move initialization into locore to avoid this problem. No functional
change intended.

Reviewed by: kib, andrew
MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D42533

Details

Provenance
markjAuthored on Nov 13 2023, 3:44 PM
Reviewer
kib
Differential Revision
D42533: arm64: Initialize x18 for APs earlier during boot
Parents
rG21e9018ae196: pkgbase: use <major>.<minor> format for alpha, beta and release package versions
Branches
Unknown
Tags
Unknown