arch: fe310: Fix mstatus handling

In previous commit, mstatus.mie was set when creating a new task
    but this change was incorrect and had a side effect such that
    a machine interrupt would be enabled just before returning from
    interrupt handling routine to switch context.

    Also, mstatus.mpp is set to machine mode in up_get_newintctx()
    instead of fe310_dispatch_irq().
This commit is contained in:
Masayuki Ishikawa 2020-01-08 10:38:27 -03:00 • committed by Alan Carvalho de Assis
parent 38b043da9f
commit d76ba14d58
3 changed files with 6 additions and 5 deletions

View file

@ -47,6 +47,7 @@
#define MSTATUS_MIE (0x1 << 3) /* Machine Interrupt Enable */
#define MSTATUS_MPIE (0x1 << 7) /* Machine Previous Interrupt Enable */
#define MSTATUS_MPPM (0x3 << 11) /* Machine Previous Privilege (m-mode) */
/* In mie (machine interrupt enable) register */