arch: arc: Implement z_arch_system_halt()
"brk" is a break-point instruction which among other things halts ARC core. As compared to pure halt (which is "flag 1" for ARC) it is much more convenient as it might be executed from either secure mode or normal mode (with SecureShield enabled), while "flag" instruction will raise privilege violation exception if SecureShield is enabled and we're in "normal" mode. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
parent
11d6385ebe
commit
19d4caaaab
1 changed files with 9 additions and 0 deletions
|
@ -34,3 +34,12 @@ FUNC_NORETURN void z_arch_syscall_oops(void *ssf_ptr)
|
|||
z_arc_fatal_error(K_ERR_KERNEL_OOPS, ssf_ptr);
|
||||
CODE_UNREACHABLE;
|
||||
}
|
||||
|
||||
FUNC_NORETURN void z_arch_system_halt(unsigned int reason)
|
||||
{
|
||||
ARG_UNUSED(reason);
|
||||
|
||||
__asm__("brk");
|
||||
|
||||
CODE_UNREACHABLE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue