Just in case an old interrupt is pending make sure we clear everything
asserted before this kernel started. Based on similar M-mode code in
opensbi.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nick Kossifidis <mick@ics.forth.gr>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
__INIT
ENTRY(_start)
- /* Mask all interrupts */
+ /* Mask and clear all interrupts */
csrw sie, zero
+ csrw sip, zero
/* Load the global pointer */
.option push