diff --git a/hal/armv7a/exceptions.c b/hal/armv7a/exceptions.c index 6bd9725e..65013f44 100644 --- a/hal/armv7a/exceptions.c +++ b/hal/armv7a/exceptions.c @@ -133,6 +133,10 @@ void exceptions_dispatch(unsigned int n, exc_context_t *ctx) hal_exceptionsDumpContext(buff, ctx, n); hal_consolePrint(buff); +#ifdef NDEBUG + hal_cpuReboot(); +#endif + for (;;) hal_cpuHalt(); } diff --git a/hal/ia32/exceptions.c b/hal/ia32/exceptions.c index e915995b..9ad9a059 100644 --- a/hal/ia32/exceptions.c +++ b/hal/ia32/exceptions.c @@ -158,6 +158,11 @@ static void exceptions_defaultHandler(unsigned int n, exc_context_t *ctx) hal_consolePrint(buff); hal_consolePrint("\033[0m"); hal_interruptsDisableAll(); + +#ifdef NDEBUG + hal_cpuReboot(); +#endif + hal_cpuHalt(); } diff --git a/hal/sparcv8leon3/exceptions.c b/hal/sparcv8leon3/exceptions.c index 000cfe5e..5dc2688a 100644 --- a/hal/sparcv8leon3/exceptions.c +++ b/hal/sparcv8leon3/exceptions.c @@ -174,6 +174,10 @@ void exceptions_dispatch(unsigned int n, exc_context_t *ctx) hal_exceptionsDumpContext(buff, ctx, n); hal_consolePrint(buff); +#ifdef NDEBUG + hal_cpuReboot(); +#endif + for (;;) { hal_cpuHalt(); }