Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Commit

Permalink
More work on Daemons plus porting to 7.02 7.55
Browse files Browse the repository at this point in the history
- Daemons are full implimented and working. Still need to fix some menu stuff.
- Daemons now read param sfo using sysfileutilwrapper.
- Patches and offsets for 7.02 & 7.55 done. Still need to do userland side for mono.
  • Loading branch information
OSM-Made committed Jun 4, 2021
1 parent fcb1bc3 commit 7ba8c2e
Show file tree
Hide file tree
Showing 25 changed files with 813 additions and 227 deletions.
36 changes: 18 additions & 18 deletions Loader/Kernel/include/Resolver/Resolver-702.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
#define addr_memset 0x2DFC20
#define addr_memcmp 0x207500
#define addr_strlen 0x93FF0
#define addr_strcpy 0x
#define addr_strncpy 0x
#define addr_strcpy 0x2CC70
#define addr_strncpy 0xF9E40
#define addr_strcmp 0x43B5F0
#define addr_strstr 0x5740
#define addr_sprintf 0xBC970
#define addr_snprintf 0xBCA30
#define addr_vsprintf 0x
#define addr_vprintf 0x
#define addr_vsprintf 0xBCA00
#define addr_vprintf 0xBC7A0
#define addr_sscanf 0x2077A0
#define addr_strdup 0x382B0
#define addr_realloc 0x301B70
#define addr_kprintf 0xBC730

/* File IO */
#define addr_vn_fullpath 0x15F470
#define addr_kern_rmdir 0x
#define addr_kern_mkdir 0x
#define addr_kern_open 0x
#define addr_kern_rmdir 0x35ADE0
#define addr_kern_mkdir 0x35AA60
#define addr_kern_open 0x355960
#define addr_kern_mount 0x299080
#define addr_mount_argf 0x298ED0

Expand All @@ -47,32 +47,32 @@
#define addr_allproc 0x1B48318
#define addr_proc_kill 0x313B90
#define addr_proc_rwmem 0x43E80
#define addr_create_thread 0x
#define addr_create_thread 0x842E0

/* Kproc */
#define addr_kproc_create 0xC4170
#define addr_kproc_exit 0xC43E0
#define addr_kproc_kthread_add 0xC46D0
#define addr_kthread_exit 0xC49C0
#define addr_kthread_suspend_check 0x
#define addr_kthread_suspend_check 0xC4DD0
#define addr_pause 0x16EEE0

/* Module Offsets */
#define addr_thr_initial_libkernel 0x
#define addr_thr_initial_libkernel_web 0x
#define addr_thr_initial_libkernel_sys 0x
#define addr_thr_initial_libkernel 0x8D420
#define addr_thr_initial_libkernel_web 0x8D420
#define addr_thr_initial_libkernel_sys 0x8D830

/* Virtual Memory */
#define addr_vmspace_acquire_ref 0x25F9F0
#define addr_vmspace_free 0x25F820
#define addr_vm_map_lock_read 0x25FB90
#define addr_vm_map_unlock_read 0x25FBE0
#define addr_vm_map_lookup_entry 0x260190
#define addr_vm_map_findspace 0x
#define addr_vm_map_insert 0x
#define addr_vm_map_lock 0x
#define addr_vm_map_unlock 0x
#define addr_vm_map_delete 0x
#define addr_vm_map_protect 0x
#define addr_vm_map_findspace 0x262CC0
#define addr_vm_map_insert 0x260D60
#define addr_vm_map_lock 0x25FA50
#define addr_vm_map_unlock 0x25FAB0
#define addr_vm_map_delete 0x262700
#define addr_vm_map_protect 0x264A50

#endif
6 changes: 3 additions & 3 deletions Loader/Kernel/include/Resolver/Resolver-755.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
#define addr_pause 0x86E80

/* Module Offsets */
#define addr_thr_initial_libkernel 0x
#define addr_thr_initial_libkernel_web 0x
#define addr_thr_initial_libkernel_sys 0x
#define addr_thr_initial_libkernel 0x8D420
#define addr_thr_initial_libkernel_web 0x8D420
#define addr_thr_initial_libkernel_sys 0x8D830

/* Virtual Memory */
#define addr_vmspace_acquire_ref 0x2FC290
Expand Down
19 changes: 8 additions & 11 deletions Loader/Kernel/source/kproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ void test_thread(void* arg)
//Mount the dirs for ShellUI
Mount_Dirs(p, bkJail.fd_jdir, true);

klog("****Launching Toolbox...****");
/*klog("****Launching Toolbox...****");
if(Load_SPRX(p, SPRX_PATH))
klog("Launched Toolbox...");
else
klog("Failed to Launch Toolbox... Maybe you forgot to load HEN??");
klog("Failed to Launch Toolbox... Maybe you forgot to load HEN??");*/

//Restore previous jail.
RestoreJail(p, bkJail);
Expand Down Expand Up @@ -120,7 +120,7 @@ void test2_thread(void* arg)
Mount_Dirs(p, bkJail.fd_jdir, true);

klog("****Launching Toolbox...****");
if(Load_SPRX(p, SPRX_PATH))
//if(Load_SPRX(p, SPRX_PATH))
{
klog("Launched Toolbox Sucessfully.");

Expand All @@ -131,10 +131,9 @@ void test2_thread(void* arg)
ProcessStartEvent = EVENTHANDLER_REGISTER(process_exec_end, (void*)OnProcessStart, nullptr, EVENTHANDLER_PRI_LAST);
ProcessExitEvent = EVENTHANDLER_REGISTER(process_exit, (void*)OnProcessExit, nullptr, EVENTHANDLER_PRI_ANY);
klog("Events Registered Sucessfully.");
}

else
klog("Failed to Launch Toolbox... Maybe you forgot to load HEN??");
}
//else
//klog("Failed to Launch Toolbox... Maybe you forgot to load HEN??");

//Restore previous jail.
RestoreJail(p, bkJail);
Expand All @@ -144,11 +143,9 @@ void test2_thread(void* arg)

void kproc_Init()
{


proc* kernel = proc_find_by_name("kernel");
if(kernel)
kproc_kthread_add(test2_thread, nullptr, &kernel, NULL, NULL, 0, "kernel", "Loader Thread");
if(kernel)
kproc_kthread_add(test2_thread, nullptr, &kernel, NULL, NULL, 0, "kernel", "Loader Thread");

klog("kproc_Init() -> Sucess!");
}
Expand Down
22 changes: 22 additions & 0 deletions Loader/Userland/include/Resolver/Resolver-702.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#if defined(SOFTWARE_VERSION_672)

/* Util */
#define addr_Xfast_syscall 0x1C0
#define addr_ksysvec 0x1A4F460
#define addr_kprison0 0x113E398
#define addr_krootvnode 0x22C5750

/* STD Lib */
#define addr_kmemcpy 0x2F040
#define addr_kmemset 0x2DFC20
#define addr_kmemcmp 0x207500
#define addr_ksprintf 0xBC970
#define addr_kvsprintf 0xBCA00
#define addr_kprintf 0xBC730

#define addr_kmem_alloc 0x1170F0
#define addr_kernel_map 0x21C8EE0

#endif
22 changes: 22 additions & 0 deletions Loader/Userland/include/Resolver/Resolver-755.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#if defined(SOFTWARE_VERSION_672)

/* Util */
#define addr_Xfast_syscall 0x1C0
#define addr_ksysvec 0x1564E80
#define addr_kprison0 0x113B728
#define addr_krootvnode 0x1B463E0

/* STD Lib */
#define addr_kmemcpy 0x28F800
#define addr_kmemset 0x8D6F0
#define addr_kmemcmp 0x31D250
#define addr_ksprintf 0x26F980
#define addr_kvsprintf 0x26FA10
#define addr_kprintf 0x26F740

#define addr_kmem_alloc 0x1753E0
#define addr_kernel_map 0x21405B8

#endif
Loading

0 comments on commit 7ba8c2e

Please sign in to comment.