taiHEN  1.0
CFW framework for PS Vita
patches.h
1 
4 #ifndef TAI_PATCHES_HEADER
5 #define TAI_PATCHES_HEADER
6 
7 #include "taihen_internal.h"
8 
25 int patches_init(void);
26 void patches_deinit(void);
27 
28 void cache_flush(SceUID pid, uintptr_t vma, size_t len);
29 int tai_memcpy_to_kernel(SceUID src_pid, void *dst, const char *src, size_t size);
30 SceUID tai_hook_func_abs(tai_hook_ref_t *p_hook, SceUID pid, void *dest_func, const void *hook_func);
31 int tai_hook_release(SceUID uid, tai_hook_ref_t hook_ref);
32 SceUID tai_inject_abs(SceUID pid, void *dest, const void *src, size_t size);
33 int tai_inject_release(SceUID uid);
34 int tai_try_cleanup_process(SceUID pid);
35 
38 #endif // TAI_PATCHES_HEADER
uintptr_t tai_hook_ref_t
Hook information.
Definition: taihen.h:215
int tai_hook_release(SceUID uid, tai_hook_ref_t hook_ref)
Removes a hook and restores original function if chain is empty.
Definition: patches.c:595
int patches_init(void)
Initializes the patch system.
Definition: patches.c:90
SceUID tai_inject_abs(SceUID pid, void *dest, const void *src, size_t size)
Inserts a raw data injection given an absolute address and PID of the address space.
Definition: patches.c:646
int tai_try_cleanup_process(SceUID pid)
Called on process exist to force remove private hooks.
Definition: patches.c:765
SceUID tai_hook_func_abs(tai_hook_ref_t *p_hook, SceUID pid, void *dest_func, const void *hook_func)
Inserts a hook given an absolute address and PID of the function.
Definition: patches.c:498
int tai_inject_release(SceUID uid)
Removes an injection and restores the original data.
Definition: patches.c:710
int tai_memcpy_to_kernel(SceUID src_pid, void *dst, const char *src, size_t size)
Memcpy from a process to kernel.
Definition: patches.c:364
void cache_flush(SceUID pid, uintptr_t vma, size_t len)
Flush L1 and L2 cache for an address.
Definition: patches.c:170
void patches_deinit(void)
Cleans up the patch system.
Definition: patches.c:125