mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-24 12:14:11 +00:00
Normalise patchsets. Simplify LP0 config (needs testing).
This commit is contained in:
parent
24e172b5fb
commit
486a121cbf
@ -460,7 +460,7 @@ int hos_launch(ini_sec_t *cfg)
|
||||
|
||||
if (ctxt.svcperm || ctxt.debugmode)
|
||||
{
|
||||
u32 kernel_crc32 = crc32c((u8 *)ctxt.kernel, ctxt.kernel_size);
|
||||
u32 kernel_crc32 = crc32c(ctxt.kernel, ctxt.kernel_size);
|
||||
ctxt.pkg2_kernel_id = pkg2_identify(kernel_crc32);
|
||||
|
||||
//In case a kernel patch option is set; allows to disable SVC verification or/and enable debug mode.
|
||||
|
20
ipl/pkg1.c
20
ipl/pkg1.c
@ -24,7 +24,6 @@
|
||||
#define _BL(a, o) 0x94000000 | (((o) - (a)) >> 2) & 0x3FFFFFF
|
||||
#define _NOP() 0xD503201F
|
||||
|
||||
//#define SM_100_ADR 0x40014020
|
||||
#define SM_100_ADR 0x4002B020
|
||||
|
||||
PATCHSET_DEF(_secmon_1_patchset,
|
||||
@ -45,27 +44,26 @@ PATCHSET_DEF(_secmon_2_patchset,
|
||||
|
||||
PATCHSET_DEF(_secmon_3_patchset,
|
||||
//Patch package2 decryption and signature/hash checks.
|
||||
{ 0xAC8 + 0xAB4, _NOP() },
|
||||
{ 0xAC8 + 0xA30, _NOP() }, //Header signature.
|
||||
{ 0xAC8 + 0xAB4, _NOP() }, //package2 structure.
|
||||
{ 0xAC8 + 0xAC0, _NOP() }, //Version.
|
||||
{ 0xAC8 + 0xADC, _NOP() } //Sections SHA2.
|
||||
);
|
||||
|
||||
PATCHSET_DEF(_secmon_4_patchset,
|
||||
//Patch package2 decryption and signature/hash checks.
|
||||
{ 0x1218 + 0x6E68, _NOP() }, //Header signature.
|
||||
{ 0x1218 + 0x6E74, _NOP() }, //Version.
|
||||
{ 0x1218 + 0x6FE4, _NOP() }, //Sections SHA2.
|
||||
{ 0x1218 + 0x2DC, _NOP() } //Unknown.
|
||||
{ 0x2300 + 0x5D80, _NOP() }, //package2 structure.
|
||||
{ 0x2300 + 0x5D8C, _NOP() }, //Version.
|
||||
{ 0x2300 + 0x5EFC, _NOP() }, //Header signature.
|
||||
{ 0xAC8 + 0xA2C, _NOP() } //Sections SHA2.
|
||||
);
|
||||
|
||||
PATCHSET_DEF(_secmon_5_patchset,
|
||||
//Patch package2 decryption and signature/hash checks.
|
||||
{ 0x12b0 + 0x4d0, _NOP() },
|
||||
{ 0x12b0 + 0x4dc, _NOP() },
|
||||
{ 0x12b0 + 0x794, _NOP() },
|
||||
{ 0x12b0 + 0xb30, _NOP() }//,
|
||||
//{ 0x12b0 + 0xa18 , _NOP() } // BootConfig Retail Check
|
||||
{ 0xDA8 + 0x9D8 , _NOP() }, //package2 structure.
|
||||
{ 0xDA8 + 0x9E4 , _NOP() }, //Version.
|
||||
{ 0xDA8 + 0xC9C , _NOP() }, //Header signature.
|
||||
{ 0xDA8 + 0x1038 , _NOP() } //Sections SHA2.
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -44,9 +44,9 @@ void sdram_lp0_save_params(const void *params)
|
||||
/* 32 bits version c macro */
|
||||
#define c32(value, pmcreg) pmc->pmcreg = value
|
||||
|
||||
//TODO: pkg1.1 reads them from MC.
|
||||
//TODO: pkg1.1 (1.X - 3.X) reads them from MC.
|
||||
//Patch carveout parameters.
|
||||
sdram->McGeneralizedCarveout1Bom = 0;
|
||||
/*sdram->McGeneralizedCarveout1Bom = 0;
|
||||
sdram->McGeneralizedCarveout1BomHi = 0;
|
||||
sdram->McGeneralizedCarveout1Size128kb = 0;
|
||||
sdram->McGeneralizedCarveout1Access0 = 0;
|
||||
@ -115,7 +115,15 @@ void sdram_lp0_save_params(const void *params)
|
||||
sdram->McGeneralizedCarveout5ForceInternalAccess2 = 0;
|
||||
sdram->McGeneralizedCarveout5ForceInternalAccess3 = 0;
|
||||
sdram->McGeneralizedCarveout5ForceInternalAccess4 = 0;
|
||||
sdram->McGeneralizedCarveout5Cfg0 = 0x8F;
|
||||
sdram->McGeneralizedCarveout5Cfg0 = 0x8F;*/
|
||||
|
||||
//TODO: this is 4.X+ behaviour which seems to work fine for < 4.X.
|
||||
//Patch carveout parameters.
|
||||
sdram->McGeneralizedCarveout1Cfg0 = 0;
|
||||
sdram->McGeneralizedCarveout2Cfg0 = 0;
|
||||
sdram->McGeneralizedCarveout3Cfg0 = 0;
|
||||
sdram->McGeneralizedCarveout4Cfg0 = 0;
|
||||
sdram->McGeneralizedCarveout5Cfg0 = 0;
|
||||
|
||||
//Patch SDRAM parameters.
|
||||
u32 t0 = sdram->EmcSwizzleRank0Byte0 << 5 >> 29 > sdram->EmcSwizzleRank0Byte0 << 1 >> 29;
|
||||
|
Loading…
Reference in New Issue
Block a user