HomeFreeBSD

arm64: Move curthread setup earlier

Description

arm64: Move curthread setup earlier

In 469cfa3c30ee cperciva added TSLOG profiling to link_elf_ireloc. This
requires curthread to be read when the kernel linker is invoked, but it
hadn't yet been initialized. On amd64 this was harmless since [gs:0] was
readable; but on arm64 this broke since [x18] was not readable.

Move the curthread (and associated PCPU) setup earlier on arm64 in order
to allow TSLOG to work there.

Fixes: 469cfa3c30ee ("tslog: Annotate some early boot functions")
Differential Revision: https://reviews.freebsd.org/D44317

Details

Provenance
iciliaat_gmail.comAuthored on Mar 13 2024, 6:06 PM
cpercivaCommitted on Mar 19 2024, 10:16 PM
Differential Revision
D44317: Changed order of arm64 events such that TSLOG-enabled kernels are able to boot
Parents
rGe37471440e60: Add myself (eduardo) to the calendar.
Branches
Unknown
Tags
Unknown