1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-24 08:56:03 +00:00
hekate/bootloader/hos/hos.h

84 lines
1.9 KiB
C
Raw Normal View History

2018-03-27 00:04:16 +01:00
/*
2018-08-05 12:40:32 +01:00
* Copyright (c) 2018 naehrwert
*
* 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-03-27 00:04:16 +01:00
2018-05-01 06:15:48 +01:00
#ifndef _HOS_H_
#define _HOS_H_
2018-11-28 19:26:16 +00:00
#include "pkg1.h"
#include "pkg2.h"
2018-08-13 09:58:24 +01:00
#include "../utils/types.h"
#include "../config/ini.h"
#include "../sec/tsec.h"
#define KB_FIRMWARE_VERSION_100_200 0
#define KB_FIRMWARE_VERSION_300 1
#define KB_FIRMWARE_VERSION_301 2
#define KB_FIRMWARE_VERSION_400 3
#define KB_FIRMWARE_VERSION_500 4
#define KB_FIRMWARE_VERSION_600 5
#define KB_FIRMWARE_VERSION_620 6
2019-02-24 00:58:15 +00:00
#define KB_FIRMWARE_VERSION_700 7
2019-06-30 01:29:46 +01:00
#define KB_FIRMWARE_VERSION_810 8
2019-09-12 21:41:08 +01:00
#define KB_FIRMWARE_VERSION_900 9
2019-12-08 01:01:21 +00:00
#define KB_FIRMWARE_VERSION_910 10
#define KB_FIRMWARE_VERSION_MAX KB_FIRMWARE_VERSION_910
#define HOS_PKG11_MAGIC 0x31314B50
2018-11-28 19:26:16 +00:00
typedef struct _launch_ctxt_t
{
void *keyblob;
void *pkg1;
const pkg1_id_t *pkg1_id;
const pkg2_kernel_id_t *pkg2_kernel_id;
void *warmboot;
u32 warmboot_size;
void *secmon;
u32 secmon_size;
void *pkg2;
u32 pkg2_size;
bool new_pkg2;
2018-11-28 19:26:16 +00:00
void *kernel;
u32 kernel_size;
link_t kip1_list;
char* kip1_patches;
bool svcperm;
bool debugmode;
bool stock;
2018-11-28 19:26:16 +00:00
bool atmosphere;
bool exo_no_user_exceptions;
bool exo_user_pmu;
2019-06-30 01:24:58 +01:00
bool emuMMC;
ini_sec_t *cfg;
2018-11-28 19:26:16 +00:00
} launch_ctxt_t;
typedef struct _merge_kip_t
{
void *kip1;
link_t link;
} merge_kip_t;
2018-05-01 06:15:48 +01:00
int hos_launch(ini_sec_t *cfg);
2019-07-06 20:10:23 +01:00
int keygen(u8 *keyblob, u32 kb, tsec_ctxt_t *tsec_ctxt, launch_ctxt_t *hos_ctxt);
#endif