mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-11-19 10:21:38 +00:00
Non-boot harts exit _wait_for_boot_hart on a plain load of _boot_status and go on to read platform.hart_index2id and other data the boot hart relocated before publishing. Nothing orders those loads after the status load, so under RVWMO a hart can read the unrelocated pointer and fault through it before mtvec is set. Pair the boot hart's release fence with a "fence r, rw" after the loop. Signed-off-by: Nickolai Zeldovich <nickolai.zeldovich@gmail.com> Assisted-by: Claude Fable 5.1 Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20261006193609.735547-1-nickolai@csail.mit.edu Signed-off-by: Anup Patel <anup@brainfault.org>