HomeFreeBSD

RISC-V: initialize pcpu slightly earlier

Description

RISC-V: initialize pcpu slightly earlier

In certain scenarios, it is possible for PCPU data to be
accessed before it has been initialized (e.g. during printf
if the kernel was built with the TSLOG option).

Initialize the PCPU pointer for hart 0 at the beginning of
initriscv() rather than near the end.

Reviewed by: markj
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D19726

Details

Provenance
mhorneAuthored on
Reviewer
markj
Differential Revision
D19726: RISC-V: Initialize pcpu slightly earlier
Parents
rS346020: MFC r345741:
Branches
Unknown
Tags
Unknown