xtensa_saveusercontext:Leave the context information empty
In the current implementation of other architectures, it is not really implemented to preserve the context, so it is emulated from other architectures to clear the context. If this behavior is not implemented, it will cause the xtensa architecture processor to loop assert in the active assert case Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
a59f82b8d2
commit
4d285cb14d
@ -23,6 +23,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
@ -46,5 +49,13 @@
|
||||
|
||||
int up_saveusercontext(void *saveregs)
|
||||
{
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* TODO: save interrupt context */
|
||||
|
||||
memset(saveregs, 0x0, XCPTCONTEXT_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sys_call1(SYS_save_context, (uintptr_t)saveregs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user