mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-23 02:16:41 +00:00
Add SVC generic patches
First patch allows same process on svcControlCodeMemory
This commit is contained in:
parent
4ae42c3a9d
commit
5cd596e53c
3 changed files with 8 additions and 2 deletions
|
@ -487,6 +487,8 @@ int hos_launch(ini_sec_t *cfg)
|
||||||
for (u32 j = 0; j < kernel_patchset[i].val; j++)
|
for (u32 j = 0; j < kernel_patchset[i].val; j++)
|
||||||
*(vu32 *)(ctxt.kernel + kernel_patchset[i].off + (j << 2)) = temp[j];
|
*(vu32 *)(ctxt.kernel + kernel_patchset[i].off + (j << 2)) = temp[j];
|
||||||
}
|
}
|
||||||
|
else if (kernel_patchset[i].id < SVC_VERIFY_DS)
|
||||||
|
*(vu32 *)(ctxt.kernel + kernel_patchset[i].off) = kernel_patchset[i].val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,6 +219,7 @@ KERNEL_PATCHSET_DEF(_kernel_4_patchset,
|
||||||
);
|
);
|
||||||
|
|
||||||
KERNEL_PATCHSET_DEF(_kernel_5_patchset,
|
KERNEL_PATCHSET_DEF(_kernel_5_patchset,
|
||||||
|
{ SVC_GENERIC, 0x38C2C, _NOP(), NULL }, // Allow same process on svcControlCodeMemory.
|
||||||
{ SVC_VERIFY_DS, 0x45E6C, _NOP(), NULL }, // Disable SVC verifications
|
{ SVC_VERIFY_DS, 0x45E6C, _NOP(), NULL }, // Disable SVC verifications
|
||||||
{ DEBUG_MODE_EN, 0x5513C, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
|
{ DEBUG_MODE_EN, 0x5513C, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
|
||||||
// Atmosphère kernel patches.
|
// Atmosphère kernel patches.
|
||||||
|
@ -233,6 +234,7 @@ KERNEL_PATCHSET_DEF(_kernel_5_patchset,
|
||||||
);
|
);
|
||||||
|
|
||||||
KERNEL_PATCHSET_DEF(_kernel_6_patchset,
|
KERNEL_PATCHSET_DEF(_kernel_6_patchset,
|
||||||
|
{ SVC_GENERIC, 0x3A8CC, _NOP(), NULL }, // Allow same process on svcControlCodeMemory.
|
||||||
{ SVC_VERIFY_DS, 0x47EA0, _NOP(), NULL }, // Disable SVC verifications
|
{ SVC_VERIFY_DS, 0x47EA0, _NOP(), NULL }, // Disable SVC verifications
|
||||||
{ DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
|
{ DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
|
||||||
// Atmosphère kernel patches.
|
// Atmosphère kernel patches.
|
||||||
|
|
|
@ -44,8 +44,10 @@ typedef struct _kernel_patch_t
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
// Generic instruction patches
|
// Always applied.
|
||||||
SVC_VERIFY_DS = 0x10, // 0x0-0xF are RESERVED.
|
SVC_GENERIC = 0,
|
||||||
|
// Generic instruction patches.
|
||||||
|
SVC_VERIFY_DS = 0x10,
|
||||||
DEBUG_MODE_EN,
|
DEBUG_MODE_EN,
|
||||||
ATM_GEN_PATCH,
|
ATM_GEN_PATCH,
|
||||||
// >4 bytes patches. Value is a pointer of a u32 array.
|
// >4 bytes patches. Value is a pointer of a u32 array.
|
||||||
|
|
Loading…
Reference in a new issue