Merged in masayuki2009/nuttx.nuttx/fix_fe310_signal (pull request #1099)
Fix fe310 signal handling * arch: fe310: Disable all interrupts in mie at __start * arch: fe310: Fix up_irq_enable() to set external interrupt only * arch: fe310: Fix up_schedule_sigaction() to save REG_INT_CTX * boards: hifive1-revb: Adjust stack size to reduce runtime memory Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
d80d6b8774
commit
15f28896a0
@ -59,6 +59,10 @@ __start:
|
||||
lui sp, %hi(FE310_IDLESTACK_TOP)
|
||||
addi sp, sp, %lo(FE310_IDLESTACK_TOP)
|
||||
|
||||
/* Disable all interrupts (i.e. timer, external) in mie */
|
||||
|
||||
csrw mie, zero
|
||||
|
||||
/* Initialize the Machine Trap Vector */
|
||||
|
||||
lui t0, %hi(__trap_vec)
|
||||
|
@ -260,7 +260,7 @@ irqstate_t up_irq_enable(void)
|
||||
|
||||
/* TODO: should move to up_enable_irq() */
|
||||
|
||||
asm volatile("csrw mie, %0" : /* no output */ : "r"(MIE_MEIE));
|
||||
asm volatile ("csrrs %0, mie, %1": "=r" (oldstat) : "r"(MIE_MEIE));
|
||||
#endif
|
||||
|
||||
/* Read mstatus & set machine interrupt enable (MIE) in mstatus */
|
||||
|
@ -146,6 +146,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
|
||||
tcb->xcp.sigdeliver = sigdeliver;
|
||||
tcb->xcp.saved_epc = g_current_regs[REG_EPC];
|
||||
tcb->xcp.saved_int_ctx = g_current_regs[REG_INT_CTX];
|
||||
|
||||
/* Then set up to vector to the trampoline with interrupts
|
||||
* disabled
|
||||
|
@ -34,8 +34,9 @@ CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_EXAMPLES_BUTTONS=y
|
||||
CONFIG_EXAMPLES_BUTTONS_NAMES=y
|
||||
CONFIG_EXAMPLES_BUTTONS_QTD=1
|
||||
CONFIG_EXAMPLES_BUTTONS_STACKSIZE=1572
|
||||
CONFIG_EXAMPLES_BUTTONS_STACKSIZE=1024
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_HELLO_STACKSIZE=1024
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_WRITABLE=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=1536
|
||||
@ -76,9 +77,9 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=12
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_GETPRIME_STACKSIZE=2048
|
||||
CONFIG_UART0_RXBUFSIZE=8
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_UART0_TXBUFSIZE=32
|
||||
CONFIG_USERMAIN_STACKSIZE=1536
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
|
Loading…
Reference in New Issue
Block a user