From f892b43a2bb1c2405b9941aaefdb25e3b4efe1f1 Mon Sep 17 00:00:00 2001 From: sashimi-yzh Date: Fri, 16 Sep 2016 02:02:20 +0800 Subject: machine, mentry.S: fix not receiving IPI for other harts (#38) * Before waiting for IPI by executing wfi instruction, MSIE bit should be set in mie CSR for other harts, else they will get stuck at the wfi instruction. --- machine/mentry.S | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'machine/mentry.S') diff --git a/machine/mentry.S b/machine/mentry.S index 9d2fe75..64c60c3 100644 --- a/machine/mentry.S +++ b/machine/mentry.S @@ -232,6 +232,10 @@ do_reset: beqz a0, init_first_hart + # set MSIE bit to receive IPI + li a1, MIP_MSIP + csrw mie, a1 + .LmultiHart: #if MAX_HARTS > 1 # wait for an IPI to signal that it's safe to boot -- cgit v1.1