Cleanup
This commit is contained in:
parent
5202ba8826
commit
a736e4602a
@ -9,7 +9,7 @@
|
||||
#include "fatfs/sdmmc/sdmmc.h"
|
||||
|
||||
/****************************************************************
|
||||
* Crypto Libs
|
||||
* Crypto libs
|
||||
****************************************************************/
|
||||
|
||||
/* original version by megazig */
|
||||
@ -271,7 +271,7 @@ static void sha(void *res, const void *src, u32 size, u32 mode)
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
* Nand/FIRM Crypto stuff
|
||||
* NAND/FIRM crypto
|
||||
****************************************************************/
|
||||
|
||||
static u8 nandCTR[0x10],
|
||||
|
@ -22,6 +22,7 @@ static const struct fb {
|
||||
static inline int strlen(const char *string)
|
||||
{
|
||||
char *stringEnd = (char *)string;
|
||||
|
||||
while(*stringEnd) stringEnd++;
|
||||
|
||||
return stringEnd - string;
|
||||
@ -43,7 +44,7 @@ void loadSplash(void)
|
||||
fileRead(fb->bottom, "/luma/splashbottom.bin", 0x38400))
|
||||
{
|
||||
u64 i = 0x1400000;
|
||||
while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func
|
||||
while(i--) __asm("mov r0, r0"); //Less Ghetto sleep func
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define NCSD_MAGIC (0x4453434E)
|
||||
#define NCSD_MAGIC 0x4453434E
|
||||
|
||||
void getEmunandSect(u32 *off, u32 *head, u32 *emuNAND);
|
||||
u32 getSDMMC(u8 *pos, u32 size);
|
||||
|
@ -138,7 +138,6 @@ void main(void)
|
||||
//If screens are inited or the corresponding option is set, load splash screen
|
||||
if(PDN_GPU_CNT != 1 || CONFIG(8)) loadSplash();
|
||||
|
||||
//Determine if we need to autoboot sysNAND
|
||||
u32 autoBootSys = CONFIG(0);
|
||||
|
||||
//Determine if we need to boot an emuNAND or sysNAND
|
||||
@ -187,7 +186,6 @@ void main(void)
|
||||
launchFirm(bootType);
|
||||
}
|
||||
|
||||
//Load FIRM into FCRAM
|
||||
static inline void loadFirm(u32 firmType, u32 externalFirm)
|
||||
{
|
||||
section = firm->section;
|
||||
@ -390,7 +388,7 @@ static inline void patchTwlAgbFirm(u32 firmType)
|
||||
|
||||
static inline void launchFirm(u32 bootType)
|
||||
{
|
||||
//Copy firm partitions to respective memory locations
|
||||
//Copy FIRM sections to respective memory locations
|
||||
for(u32 i = 0; i < 4 && section[i].size; i++)
|
||||
memcpy(section[i].address, (u8 *)firm + section[i].offset, section[i].size);
|
||||
|
||||
|
@ -11,11 +11,9 @@
|
||||
|
||||
const u32 mpuPatch[3] = {0x00360003, 0x00200603, 0x001C0603};
|
||||
|
||||
const u16 nandRedir[2] = {0x4C00, 0x47A0};
|
||||
|
||||
const u16 sigPatch[2] = {0x2000, 0x4770};
|
||||
|
||||
const u16 writeBlock[2] = {0x2000, 0x46C0};
|
||||
const u16 nandRedir[2] = {0x4C00, 0x47A0},
|
||||
sigPatch[2] = {0x2000, 0x4770},
|
||||
writeBlock[2] = {0x2000, 0x46C0};
|
||||
|
||||
const u8 unitInfoPatch = 0xE3;
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
* Patches
|
||||
**************************************************/
|
||||
const u32 mpuPatch[3];
|
||||
const u16 nandRedir[2];
|
||||
const u16 sigPatch[2];
|
||||
const u16 writeBlock[2];
|
||||
const u16 nandRedir[2],
|
||||
sigPatch[2],
|
||||
writeBlock[2];
|
||||
const u8 unitInfoPatch;
|
||||
|
||||
/**************************************************
|
||||
|
Reference in New Issue
Block a user