arch: qemu-rv: Fix qemu_rv_mtimer_interrupt() for BUILD_KERNEL
Summary: - I noticed that rv-virt:ksmp64 sometimes stops during boot. - Finally, I found that it posts the Supervisor Software Interrupt before the OS finishes hardware initialization. - This commit fixes this issue. Impact: - None Testing: - Tested with QEMU-7.1 Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
7f9cf184e5
commit
2f80a05eae
@ -31,6 +31,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/init.h>
|
||||
#include <nuttx/spinlock.h>
|
||||
#include <nuttx/timers/arch_alarm.h>
|
||||
#include <arch/board/board.h>
|
||||
@ -198,9 +199,12 @@ void qemu_rv_mtimer_interrupt(void)
|
||||
g_mtimer_cnt++;
|
||||
g_stimer_pending = true;
|
||||
|
||||
/* Post Supervisor Software Interrupt */
|
||||
if (OSINIT_HW_READY())
|
||||
{
|
||||
/* Post Supervisor Software Interrupt */
|
||||
|
||||
SET_CSR(sip, SIP_SSIP);
|
||||
SET_CSR(sip, SIP_SSIP);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BUILD_KERNEL */
|
||||
|
Loading…
x
Reference in New Issue
Block a user