2015-08-05 03:57:37 +02:00
|
|
|
/*
|
|
|
|
* patches.h
|
|
|
|
*/
|
2016-03-06 03:41:07 +01:00
|
|
|
|
2016-03-11 15:08:05 +01:00
|
|
|
#pragma once
|
2015-08-05 03:57:37 +02:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2016-05-25 14:34:43 +02:00
|
|
|
typedef struct patchData {
|
|
|
|
u32 offset[2];
|
|
|
|
union {
|
|
|
|
u8 type0[8];
|
|
|
|
u16 type1;
|
|
|
|
} patch;
|
|
|
|
u32 type;
|
|
|
|
} patchData;
|
2016-05-25 22:56:26 +02:00
|
|
|
|
2016-05-11 19:28:28 +02:00
|
|
|
u8 *getProcess9(u8 *pos, u32 size, u32 *process9Size, u32 *process9MemAddr);
|
2016-06-02 22:33:44 +02:00
|
|
|
u32* getInfoForArm11ExceptionHandlers(u8 *pos, u32 size, u32 *stackAddr);
|
2016-05-25 14:34:43 +02:00
|
|
|
void patchSignatureChecks(u8 *pos, u32 size);
|
2016-05-25 20:50:45 +02:00
|
|
|
void patchTitleInstallMinVersionCheck(u8 *pos, u32 size);
|
2016-05-25 14:34:43 +02:00
|
|
|
void patchFirmlaunches(u8 *pos, u32 size, u32 process9MemAddr);
|
|
|
|
void patchFirmWrites(u8 *pos, u32 size);
|
|
|
|
void patchFirmWriteSafe(u8 *pos, u32 size);
|
2016-05-25 22:56:26 +02:00
|
|
|
void patchExceptionHandlersInstall(u8 *pos, u32 size);
|
2016-06-04 21:11:15 +02:00
|
|
|
void patchSvcBreak9(u8 *pos, u32 size, u32 k9addr);
|
|
|
|
void patchSvcBreak11(u8 *pos, u32 size);
|
2016-05-25 22:56:26 +02:00
|
|
|
void patchUnitInfoValueSet(u8 *pos, u32 size);
|
|
|
|
void patchKernelFCRAMAndVRAMMappingPermissions(u8 *pos, u32 size);
|
2016-05-25 14:34:43 +02:00
|
|
|
void reimplementSvcBackdoor(u8 *pos, u32 size);
|
|
|
|
void applyLegacyFirmPatches(u8 *pos, u32 firmType, u32 console);
|
2016-05-25 22:56:26 +02:00
|
|
|
u32 getLoader(u8 *pos, u32 *loaderSize);
|
2016-05-25 22:28:50 +02:00
|
|
|
u8 *getUnitInfoValueSet(u8 *pos, u32 size);
|