mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 19:26:55 -04:00
Implement Panic() stub.
This commit is contained in:
parent
fba3d1c2d9
commit
66b3b3a706
6 changed files with 59 additions and 9 deletions
|
@ -1,11 +1,26 @@
|
|||
#include <stdbool.h>
|
||||
#include "utils.h"
|
||||
#include "se.h"
|
||||
#include "fuse.h"
|
||||
#include "pmc.h"
|
||||
#include "timers.h"
|
||||
|
||||
void panic(uint32_t code) {
|
||||
(void)code; /* TODO */
|
||||
|
||||
__attribute__ ((noreturn)) void panic(uint32_t code) {
|
||||
/* Set Panic Code for NX_BOOTLOADER. */
|
||||
if (APBDEV_PMC_SCRATCH200_0 == 0) {
|
||||
APBDEV_PMC_SCRATCH200_0 = code;
|
||||
}
|
||||
|
||||
/* TODO: Custom Panic Driver, which displays to screen without rebooting. */
|
||||
/* For now, just use NX BOOTLOADER's panic. */
|
||||
fuse_disable_programming();
|
||||
APBDEV_PMC_CRYPTO_OP_0 = 1; /* Disable all SE operations. */
|
||||
watchdog_reboot();
|
||||
}
|
||||
|
||||
void generic_panic(void) {
|
||||
/* TODO */
|
||||
__attribute__ ((noreturn)) void generic_panic(void) {
|
||||
panic(0xFF000006);
|
||||
}
|
||||
|
||||
__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