mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 14:35:17 -04:00
Introduce fatal_error
This commit is contained in:
parent
add03d5774
commit
f45bc83bc4
14 changed files with 104 additions and 137 deletions
|
@ -1,10 +1,13 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include "utils.h"
|
||||
#include "se.h"
|
||||
#include "fuse.h"
|
||||
#include "pmc.h"
|
||||
#include "timers.h"
|
||||
#include "panic.h"
|
||||
|
||||
#include "lib/printk.h"
|
||||
#include "hwinit/btn.h"
|
||||
|
||||
__attribute__((noreturn)) void watchdog_reboot(void) {
|
||||
|
@ -45,7 +48,17 @@ __attribute__((noreturn)) void wait_for_button_and_pmc_reboot(void) {
|
|||
}
|
||||
|
||||
__attribute__ ((noreturn)) void generic_panic(void) {
|
||||
while(true);//panic(0xFF000006);
|
||||
panic(0xFF000006);
|
||||
}
|
||||
|
||||
__attribute__((noreturn)) void fatal_error(const char *fmt, ...) {
|
||||
va_list args;
|
||||
printk("Fatal error: ");
|
||||
va_start(args, fmt);
|
||||
vprintk(fmt, args);
|
||||
va_end(args);
|
||||
printk("\nPress POWER to reboot into RCM, VOL+/VOL- to reboot normally.\n");
|
||||
wait_for_button_and_pmc_reboot();
|
||||
}
|
||||
|
||||
__attribute__((noinline)) bool overlaps(uint64_t as, uint64_t ae, uint64_t bs, uint64_t be)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue