mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
Merge branch 'master' into emunand_dev
This commit is contained in:
commit
a9afbd2458
123 changed files with 6022 additions and 1386 deletions
|
@ -41,6 +41,8 @@ static const char *get_error_desc_str(uint32_t error_desc) {
|
|||
return "SError";
|
||||
case 0x301:
|
||||
return "Bad SVC";
|
||||
case 0xFFE:
|
||||
return "std::abort() called";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
|
@ -48,7 +50,8 @@ static const char *get_error_desc_str(uint32_t error_desc) {
|
|||
|
||||
static void _check_and_display_atmosphere_fatal_error(void) {
|
||||
/* Check for valid magic. */
|
||||
if (ATMOSPHERE_FATAL_ERROR_CONTEXT->magic != ATMOSPHERE_REBOOT_TO_FATAL_MAGIC) {
|
||||
if (ATMOSPHERE_FATAL_ERROR_CONTEXT->magic != ATMOSPHERE_REBOOT_TO_FATAL_MAGIC &&
|
||||
ATMOSPHERE_FATAL_ERROR_CONTEXT->magic != ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
#define PANIC_CODE_SAFEMODE 0x00000020
|
||||
|
||||
|
||||
#define AMS_FATAL_ERROR_MAX_STACKTRACE 0x20
|
||||
#define AMS_FATAL_ERROR_MAX_STACKDUMP 0x100
|
||||
|
||||
/* Atmosphere reboot-to-fatal-error. */
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
|
@ -43,17 +47,23 @@ typedef struct {
|
|||
};
|
||||
};
|
||||
uint64_t pc;
|
||||
uint64_t padding;
|
||||
uint64_t module_base;
|
||||
uint32_t pstate;
|
||||
uint32_t afsr0;
|
||||
uint32_t afsr1;
|
||||
uint32_t esr;
|
||||
uint64_t far;
|
||||
uint64_t report_identifier; /* Normally just system tick. */
|
||||
uint64_t stack_trace_size;
|
||||
uint64_t stack_dump_size;
|
||||
uint64_t stack_trace[AMS_FATAL_ERROR_MAX_STACKTRACE];
|
||||
uint8_t stack_dump[AMS_FATAL_ERROR_MAX_STACKDUMP];
|
||||
} atmosphere_fatal_error_ctx;
|
||||
|
||||
/* "AFE1" */
|
||||
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC 0x31454641
|
||||
/* "AFE0" */
|
||||
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC 0x30454641
|
||||
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_0 0x30454641
|
||||
|
||||
#define ATMOSPHERE_FATAL_ERROR_CONTEXT ((volatile atmosphere_fatal_error_ctx *)(0x4003E000))
|
||||
|
||||
|
|
|
@ -1202,6 +1202,9 @@ void sdmmc_finish(sdmmc_t *sdmmc)
|
|||
|
||||
/* Power cycle for 100ms without power. */
|
||||
mdelay(100);
|
||||
|
||||
/* Disable the regulator. */
|
||||
max77620_regulator_enable(REGULATOR_LDO2, 0);
|
||||
}
|
||||
|
||||
/* Force a register read to refresh the clock control value. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue