Secure Monitor: Difference between revisions
as seen on 5.0.1 kernel |
→GetConfig: better name, description for other bits. |
||
Line 225: | Line 225: | ||
| 11 || [[#IsDebugMode]] | | 11 || [[#IsDebugMode]] | ||
|- | |- | ||
| 12 || [[# | | 12 || [[#KernelFlags]] | ||
|- | |- | ||
| 13 || [[#IsChargerHiZModeEnabled]] | | 13 || [[#IsChargerHiZModeEnabled]] | ||
Line 381: | Line 381: | ||
The value of this field is loaded from [[BootConfig]] unsigned-config+0x10 u8 bit1. | The value of this field is loaded from [[BootConfig]] unsigned-config+0x10 u8 bit1. | ||
==== | ==== KernelFlags ==== | ||
Kernel reads this when setting up memory-related code | Kernel reads this when setting up memory-related code. | ||
Bit 0 is a boolean determining whether kernel should it will memset various allocated memory-regions with 0x58, 0x59, 0x5A ('X', 'Y', 'Z') instead of zero. This allows Nintendo devs to find uninitialized memory bugs. | |||
Bit 1 is a boolean determining whether kernel should forcefully enable usermode exception handlers (when false, only data aborts/prefetch aborts that occur when the faulting address is in a readable region with MemoryType_CodeStatic will trigger usermode exception handlers). | |||
Bit 2 is a boolean determining whether kernel should enable usermode access to the Performance Monitors (whether PMUSERENR_EL0 should be 1 or 0). | |||
Bits 8-15 are a boolean determining whether kernel should call smcPanic on error instead of infinite-looping. | |||
Bits 16-17 determine how much memory is available. 00/03 = 4 GB, 01 = 6 GB, 02 = 8 GB. | |||
==== IsChargerHiZModeEnabled ==== | ==== IsChargerHiZModeEnabled ==== |