1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-05 19:51:45 +00:00

exo: always enable usermode exception handlers

This commit is contained in:
Michael Scire 2019-04-10 23:30:19 -07:00
parent 88294116b8
commit 1e5fcff242
4 changed files with 18 additions and 5 deletions

View file

@ -123,7 +123,7 @@ uint64_t bootconfig_get_memory_arrangement(void) {
}
}
uint64_t bootconfig_get_kernel_memory_configuration(void) {
uint64_t bootconfig_get_kernel_configuration(void) {
if (bootconfig_is_debug_mode()) {
uint64_t high_val = 0;
if (fuse_get_dram_id() == 4) {

View file

@ -21,6 +21,14 @@
#include <stdint.h>
#include "memory_map.h"
/* This is kind of ConfigItem, but it's stored in BootConfig, so... */
typedef enum {
KERNELCONFIGFLAG_INITIALIZE_MEMORY_TO_PATTERN = (1 << 0),
KERNELCONFIGFLAG_ENABLE_USER_EXCEPTION_HANDLERS = (1 << 1),
KERNELCONFIGFLAG_ENABLE_USER_PMU_ACCESS = (1 << 2),
KERNELCONFIGFLAG_CALL_SMC_PANIC_ON_KERNEL_ERROR = (1 << 8),
} KernelConfigFlag;
/* This provides management for Switch BootConfig. */
#define LOADED_BOOTCONFIG (get_loaded_bootconfig())
@ -78,7 +86,7 @@ bool bootconfig_take_extabt_serror_to_el3(void);
uint64_t bootconfig_get_value_for_sysctr0(void);
uint64_t bootconfig_get_memory_arrangement(void);
uint64_t bootconfig_get_kernel_memory_configuration(void);
uint64_t bootconfig_get_kernel_configuration(void);
bool bootconfig_is_recovery_boot(void);
uint64_t bootconfig_get_boot_reason(void);

View file

@ -206,8 +206,13 @@ uint32_t configitem_get(bool privileged, ConfigItem item, uint64_t *p_outvalue)
*p_outvalue = (int)(bootconfig_is_debug_mode());
}
break;
case CONFIGITEM_KERNELMEMORYCONFIGURATION:
*p_outvalue = bootconfig_get_kernel_memory_configuration();
case CONFIGITEM_KERNELCONFIGURATION:
{
uint64_t config = bootconfig_get_kernel_configuration();
/* Always enable usermode exception handlers. */
config |= KERNELCONFIGFLAG_ENABLE_USER_EXCEPTION_HANDLERS;
*p_outvalue = config;
}
break;
case CONFIGITEM_BATTERYPROFILE:
*p_outvalue = (int)g_battery_profile;

View file

@ -32,7 +32,7 @@ typedef enum {
CONFIGITEM_BOOTREASON = 9,
CONFIGITEM_MEMORYARRANGE = 10,
CONFIGITEM_ISDEBUGMODE = 11,
CONFIGITEM_KERNELMEMORYCONFIGURATION = 12,
CONFIGITEM_KERNELCONFIGURATION = 12,
CONFIGITEM_BATTERYPROFILE = 13,
CONFIGITEM_ISQUESTUNIT = 14,
CONFIGITEM_NEWHARDWARETYPE_5X = 15,