riscv/qemu-rv: skip reloading mhartid

As a0 already has mhartid passed by SBI  or ZSBL, no need to load it
again here.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-07-30 14:34:46 +08:00 committed by Xiang Xiao
parent 522cec4db9
commit a6c7e68b5d

View File

@ -43,11 +43,7 @@
__start:
/* Preserve a1 as it contains the pointer to DTB */
/* Load mhartid (cpuid) */
#ifndef CONFIG_ARCH_USE_S_MODE
csrr a0, CSR_MHARTID
#endif
/* Preserve a0 as it has mhartid */
/* Load the number of CPUs that the kernel supports */
li t1, CONFIG_SMP_NCPUS