Skip to content

Commit

Permalink
Merge pull request #32 from InvoxiPlayGames/reboot-if-noxell
Browse files Browse the repository at this point in the history
feature: reboot console on exit if xell not found
  • Loading branch information
Swizzy authored Feb 1, 2024
2 parents 71a411c + 828c7be commit 44580f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libxenon/drivers/newlib/xenon_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <sys/dirent.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <time/time.h>

#include <assert.h>
#include <debug.h>
Expand Down Expand Up @@ -135,6 +136,11 @@ static void xenon_exit(int status) {
try_return_to_xell(0xc8070000, 0x1c000000); // xell-gggggg (ggboot)
try_return_to_xell(0xc8095060, 0x1c040000); // xell-2f (freeboot)
try_return_to_xell(0xc8100000, 0x1c000000); // xell-1f, xell-ggggggg

sprintf(s, "Failed to load Xell, rebooting in 10 seconds...");
vfs_console_write(NULL, 0, s, strlen(s));
delay(10);
xenon_smc_power_reboot();
}

for (;;);
Expand Down

0 comments on commit 44580f2

Please sign in to comment.