HomeFreeBSD

mips/malta: Explicitly set AP entry point to _locore

Description

mips/malta: Explicitly set AP entry point to _locore

Otherwise we rely on the firmware implicitly ending up there without
faulting. Perhaps the hardware this was tested on does so, but on QEMU
this is not the case, as the AP will otherwise re-run bootloader code
that tries to reconfigure PCI BARs and ends up faulting, so the AP is
never seen by FreeBSD to have started.

This matches Linux's arch/mips/kernel/smp-mt.c:vsmp_boot_secondary,
which unconditionally writes to TCRestart (this register), albeit using
a separate entry point, whilst ours is shared.

This is a direct commit to stable/13 as mips no longer exists in main.

Obtained from: CheriBSD (diagnosis; patch rewritten from scratch)

Details

Provenance
jrtc27Authored on Dec 12 2024, 9:07 PM
Parents
rG1e502fc1c421: sh(1): -l is only valid in cli option not as set -l
Branches
Unknown
Tags
Unknown