diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-11-12 00:29:56 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 07:58:17 -0700 |
commit | b46f30a378673a5c789d145c1d8d0d76312714d8 (patch) | |
tree | 2065881150fea2870cbda7f5e2634cd68d2498dd /arch/sandbox/cpu/start.c | |
parent | 21f9075def91ccbed3620c187cc2e15c0a94bac4 (diff) |
sandbox: add handler for exceptions
Add a handler for SIGILL, SIGBUS, SIGSEGV.
When an exception occurs print the program counter and the loaded
UEFI binaries and reset the system if CONFIG_SANDBOX_CRASH_RESET=y
or exit to the OS otherwise.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r-- | arch/sandbox/cpu/start.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index a03e5aa0b30..f6c98545e0d 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -451,6 +451,10 @@ int main(int argc, char *argv[]) if (ret) goto err; + ret = os_setup_signal_handlers(); + if (ret) + goto err; + #if CONFIG_VAL(SYS_MALLOC_F_LEN) gd->malloc_base = CONFIG_MALLOC_F_ADDR; #endif |