2018-09-07 16:00:13 +01:00
|
|
|
/*
|
2019-04-08 03:00:49 +01:00
|
|
|
* Copyright (c) 2018-2019 Atmosphère-NX
|
2018-09-07 16:00:13 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-02-19 08:41:19 +00:00
|
|
|
#ifndef EXOSPHERE_CFG_ITEM_H
|
|
|
|
#define EXOSPHERE_CFG_ITEM_H
|
|
|
|
|
2018-02-23 03:58:39 +00:00
|
|
|
#include <stdbool.h>
|
2018-02-19 08:41:19 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-03-05 22:59:46 +00:00
|
|
|
typedef enum {
|
2018-02-19 08:41:19 +00:00
|
|
|
CONFIGITEM_DISABLEPROGRAMVERIFICATION = 1,
|
2018-02-25 09:21:52 +00:00
|
|
|
CONFIGITEM_DRAMID = 2,
|
2018-02-19 08:41:19 +00:00
|
|
|
CONFIGITEM_SECURITYENGINEIRQ = 3,
|
2018-02-24 15:25:38 +00:00
|
|
|
CONFIGITEM_VERSION = 4,
|
2018-02-19 08:41:19 +00:00
|
|
|
CONFIGITEM_HARDWARETYPE = 5,
|
|
|
|
CONFIGITEM_ISRETAIL = 6,
|
|
|
|
CONFIGITEM_ISRECOVERYBOOT = 7,
|
|
|
|
CONFIGITEM_DEVICEID = 8,
|
|
|
|
CONFIGITEM_BOOTREASON = 9,
|
|
|
|
CONFIGITEM_MEMORYARRANGE = 10,
|
|
|
|
CONFIGITEM_ISDEBUGMODE = 11,
|
|
|
|
CONFIGITEM_KERNELMEMORYCONFIGURATION = 12,
|
2018-03-09 10:54:36 +00:00
|
|
|
CONFIGITEM_BATTERYPROFILE = 13,
|
2018-09-20 21:47:20 +01:00
|
|
|
CONFIGITEM_ISQUESTUNIT = 14,
|
2018-03-25 22:05:08 +01:00
|
|
|
CONFIGITEM_NEWHARDWARETYPE_5X = 15,
|
|
|
|
CONFIGITEM_NEWKEYGENERATION_5X = 16,
|
2018-05-09 13:29:56 +01:00
|
|
|
CONFIGITEM_PACKAGE2HASH_5X = 17,
|
|
|
|
|
|
|
|
/* These are unofficial, for usage by Exosphere. */
|
2018-11-30 12:57:17 +00:00
|
|
|
CONFIGITEM_EXOSPHERE_VERSION = 65000,
|
2019-01-20 10:50:13 +00:00
|
|
|
CONFIGITEM_NEEDS_REBOOT = 65001,
|
2019-02-21 15:05:58 +00:00
|
|
|
CONFIGITEM_NEEDS_SHUTDOWN = 65002,
|
2019-03-29 22:16:03 +00:00
|
|
|
CONFIGITEM_EXOSPHERE_VERHASH = 65003,
|
2019-04-01 21:10:45 +01:00
|
|
|
CONFIGITEM_HAS_RCM_BUG_PATCH = 65004,
|
2018-03-05 22:59:46 +00:00
|
|
|
} ConfigItem;
|
2018-02-19 08:41:19 +00:00
|
|
|
|
2019-01-20 10:50:13 +00:00
|
|
|
#define REBOOT_KIND_NO_REBOOT 0
|
|
|
|
#define REBOOT_KIND_TO_RCM 1
|
|
|
|
#define REBOOT_KIND_TO_WB_PAYLOAD 2
|
|
|
|
|
2018-11-30 11:10:27 +00:00
|
|
|
uint32_t configitem_set(bool privileged, ConfigItem item, uint64_t value);
|
|
|
|
uint32_t configitem_get(bool privileged, ConfigItem item, uint64_t *p_outvalue);
|
2018-02-19 08:41:19 +00:00
|
|
|
|
2018-02-23 03:58:39 +00:00
|
|
|
bool configitem_is_recovery_boot(void);
|
|
|
|
bool configitem_is_retail(void);
|
2018-02-26 10:00:02 +00:00
|
|
|
bool configitem_should_profile_battery(void);
|
2018-12-04 23:59:30 +00:00
|
|
|
bool configitem_is_debugmode_priv(void);
|
2018-02-20 09:02:01 +00:00
|
|
|
|
2018-11-30 11:10:27 +00:00
|
|
|
void configitem_set_debugmode_override(bool user, bool priv);
|
|
|
|
|
2018-03-02 20:16:30 +00:00
|
|
|
uint64_t configitem_get_hardware_type(void);
|
|
|
|
|
2018-02-25 19:00:50 +00:00
|
|
|
#endif
|