Skip to content

Commit

Permalink
v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SKGleba committed Dec 21, 2019
1 parent 668fb1f commit 4fde399
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion for_renga/0syscall6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
attributes: 0
version:
major: 1
minor: 1
minor: 2
main:
start: module_start
stop: module_stop
2 changes: 1 addition & 1 deletion for_renga/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static int sm_entry = 0;

static void hook_kprx() {
// Path syscall6
renga_exec_code(&sk_rvk_patch_nmp, NULL, sk_rvk_patch_nmp_len, 0);
renga_exec_code(&sk_rvk_patch_nmp, NULL, sk_rvk_patch_nmp_len);

// Add custom kprxauth if present
if (sm_entry == 0)
Expand Down
2 changes: 1 addition & 1 deletion standalone/0syscall6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
attributes: 0
version:
major: 1
minor: 1
minor: 2
main:
start: module_start
stop: module_stop
1 change: 1 addition & 0 deletions standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ target_link_libraries(0syscall6.elf
SceSysrootForKernel_stub
taihenForKernel_stub
taihenModuleUtils_stub
SceIofilemgrForDriver_stub
)

set_target_properties(0syscall6.elf
Expand Down
9 changes: 9 additions & 0 deletions standalone/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ SceUID sub_81000000_patched(int resume, int eventid, void *args, void *opt) {
void _start() __attribute__ ((weak, alias ("module_start")));
int module_start(SceSize argc, const void *args)
{
// Enable update_sm caching
NMPcache_ussm("os0:sm/update_service_sm.self", 1);

// Use venezia SPRAM
NMPcorridor_paddr = 0x1f850000;
NMPcorridor_size = 0x10000;

// Patch syscall6 to return 0
NMPrun_default(&sk_rvk_patch_nmp, sk_rvk_patch_nmp_len);

Expand All @@ -37,5 +44,7 @@ int module_start(SceSize argc, const void *args)

int module_stop(SceSize argc, const void *args)
{
// Free the cached sm memblock
NMPcache_ussm(NULL, 0);
return SCE_KERNEL_STOP_SUCCESS;
}

0 comments on commit 4fde399

Please sign in to comment.