From: Bin Meng Date: Tue, 13 Nov 2018 00:22:07 -0800 Subject: [U-Boot] [PATCH 19/19] riscv: Allow U-Boot to run on hart 0 only In-Reply-To: <1542097327-6629-1-git-send-email-bmeng.cn@gmail.com> References: <1542097327-6629-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1542097327-6629-20-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Allow U-Boot to run on hart 0 only, and suspend other harts. With this change, '-smp n' works on QEMU RISC-V board. Signed-off-by: Bin Meng --- arch/riscv/cpu/start.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 9858058..fcb0466 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -46,6 +46,10 @@ _start: /* mask all interrupts */ csrw mie, zero + csrr t0, mhartid + beqz t0, call_board_init_f +1: j 1b + /* * Set stackpointer in internal/ex RAM to call board_init_f */ -- 2.7.4