arm: Fix CONFIG_RUNTIME_NMI behavior
Zephyr kernel is unable to compile when CONFIG_RUNTIME_NMI is enabled in defconfig on ARM's architectures. This patch addresses the following issues: * In nmi.c _DefaultHandler() is referencing a function (_ScbSystemReset()) not defined in Zephyr. This has now been replaced with sys_arch_reboot. * nmi.h is included in ASM files and due to the usage of "extern" the compilation ends with an error. Added the directive _ASMLANGUAGE to prevent the problem. Jira: ZEP-1319 Change-Id: I7623ca97523cde04e4c6db40dc332d93ca801928 Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This commit is contained in:
parent
04c542d9d0
commit
4d8c021820
2 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <nanokernel.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <misc/printk.h>
|
||||
#include <misc/reboot.h>
|
||||
#include <toolchain.h>
|
||||
#include <sections.h>
|
||||
|
||||
|
@ -51,7 +52,8 @@ static _NmiHandler_t handler = _SysNmiOnReset;
|
|||
static void _DefaultHandler(void)
|
||||
{
|
||||
printk("NMI received! Rebooting...\n");
|
||||
_ScbSystemReset();
|
||||
/* In ARM implementation sys_reboot ignores the parameter */
|
||||
sys_reboot(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue