mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-31 02:11:44 +01:00
generic: mips: support harts to boot from mips_warm_boot
We program reset base for harts (other than hart 0) to boot at mips_warm_boot that jumps to _start_warm. This helps to skip some code sequence to speed up. Signed-off-by: Chao-ying Fu <cfu@mips.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250723204010.9927-1-cfu@mips.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include <mips/p8700.h>
|
||||
#include <mips/mips-cm.h>
|
||||
|
||||
extern void mips_warm_boot(void);
|
||||
|
||||
static unsigned long mips_csr_read_num(int csr_num)
|
||||
{
|
||||
#define switchcase_csr_read(__csr_num, __val) \
|
||||
@@ -150,6 +152,9 @@ static int mips_hart_start(u32 hartid, ulong saddr)
|
||||
if (hartid == 0)
|
||||
return SBI_ENOTSUPP;
|
||||
|
||||
/* Change reset base to mips_warm_boot */
|
||||
write_gcr_co_reset_base(hartid, (unsigned long)mips_warm_boot, local_p);
|
||||
|
||||
if (cpu_hart(hartid) == 0) {
|
||||
/* Ensure its coherency is disabled */
|
||||
write_gcr_co_coherence(hartid, 0, local_p);
|
||||
|
Reference in New Issue
Block a user