Editing LV2 Functions and Syscalls

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 37: Line 37:
int64_t modres;
int64_t modres;
uint64_t pe_func; //casted to sys_prx_entry_pe_t (see sys/prx.h)
uint64_t pe_func; //casted to sys_prx_entry_pe_t (see sys/prx.h)
};
struct np_drm_info_t {
uint32_t magic;
uint32_t version;
uint32_t drm_type;
uint32_t type;
uint8_t content_id[0x30];
struct CellRtcTick validity_start;
struct CellRtcTick validity_end;
struct CellRtcTick current_tick;
struct CellRtcTick current_secure_tick;
};
};
</source>
</source>
Line 551: Line 539:
| {{Root}}
| {{Root}}
| sys_process_get_sdk_version
| sys_process_get_sdk_version
| int sys_process_get_sdk_version(sys_pid_t pid, uint32_t* sdk_version)
| 2 params :sys_pid_t pid, uint8_t outbuf[4]
Only needs root permission if 'pid' is not the current process.
|-
|-
| 26
| 26
Line 986: Line 973:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_create
| sys_lwmutex_create
| int _sys_lwmutex_create(sys_lwmutex_pseudo_id_t* lwmutex, sys_protocol_t protocol, sys_lwmutex_t *control, int has_name, uint64_t name)
| int sys_lwmutex_create(sys_lwmutex_t *lwmutex, sys_lwmutex_attribute_t *attr)
|-
|-
| 96
| 96
Line 993: Line 980:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_destroy
| sys_lwmutex_destroy
| int _sys_lwmutex_destroy(sys_lwmutex_pseudo_id_t lwmutex)
| int sys_lwmutex_destroy(sys_lwmutex_t *lwmutex)
|-
|-
| 97
| 97
Line 1,000: Line 987:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_lock
| sys_lwmutex_lock
| int _sys_lwmutex_lock(sys_lwmutex_pseudo_id_t lwmutex, usecond_t timeout)
| int sys_lwmutex_lock(sys_lwmutex_t *lwmutex, usecond_t timeout)
|-
|-
| 98
| 98
Line 1,007: Line 994:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_unlock
| sys_lwmutex_unlock
| int _sys_lwmutex_unlock(sys_lwmutex_pseudo_id_t lwmutex)
| int sys_lwmutex_unlock(sys_lwmutex_t *lwmutex)
|-
|-
| 99
| 99
Line 1,014: Line 1,001:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_trylock
| sys_lwmutex_trylock
| int _sys_lwmutex_trylock(sys_lwmutex_pseudo_id_t lwmutex)
| int sys_lwmutex_trylock(sys_lwmutex_t *lwmutex)
|-
|-
! colspan="6" id="sys_mutex Syscalls"|[[#sys_mutex Syscalls]] (100-104)
! colspan="6" id="sys_mutex Syscalls"|[[#sys_mutex Syscalls]] (100-104)
Line 1,104: Line 1,091:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwcond_create
| sys_lwcond_create
| int _sys_lwcond_create(sys_lwcond_pseudo_id_t *lwcond, sys_lwmutex_pseudo_id_t lwmutex, sys_lwcond_t *control, uint64_t name)
| int sys_lwcond_create(sys_lwcond_t *lwcond, sys_lwmutex_t *lwmutex, sys_lwcond_attribute_t *attr)
|-
|-
| 112
| 112
Line 1,111: Line 1,098:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwcond_destroy
| sys_lwcond_destroy
| int _sys_lwcond_destroy(sys_lwcond_pseudo_id_t lwcond)
| int sys_lwcond_destroy(sys_lwcond_t *lwcond)
|-
|-
| 113
| 113
Line 1,118: Line 1,105:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwcond_queue_wait
| sys_lwcond_queue_wait
| int _sys_lwcond_queue_wait(sys_lwcond_pseudo_id_t lwcond, sys_lwmutex_pseudo_id_t lwmutex, usecond_t timeout)
| int sys_lwcond_queue_wait(sys_lwcond_t lwcond, sys_lwmutex_t lwmutex, __int64 timeout)
|-
|-
! colspan="6" id="sys_semaphore Syscalls"|[[#sys_semaphore Syscalls]] (90-94+114)
! colspan="6" id="sys_semaphore Syscalls"|[[#sys_semaphore Syscalls]] (90-94+114)
Line 1,134: Line 1,121:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwcond_signal
| sys_lwcond_signal
| int _sys_lwcond_signal(sys_lwcond_pseudo_id_t lwcond, sys_lwmutex_pseudo_id_t lwmutex, sys_ppu_thread_t ppu_thread_id, uint32_t mode)
| 4 params
|-
|-
| 116
| 116
Line 1,141: Line 1,128:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwcond_signal_all
| sys_lwcond_signal_all
| int _sys_lwcond_signal_all(sys_lwcond_pseudo_id_t lwcond, sys_lwmutex_pseudo_id_t lwmutex, uint32_t mode)
| 3 params
|-
|-
| 117
| 117
Line 1,148: Line 1,135:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| _sys_lwmutex_unlock2
| sys_lwmutex_unlock2
| int _sys_lwmutex_unlock2(sys_lwmutex_pseudo_id_t lwmutex)
| 1 params : sys_lwmutex_t *lwmutex
Sets a different "unlocked" flag than _sys_lwmutex_unlock.
|-
|-
! colspan="6" id="sys_event Syscalls"|[[#sys_event Syscalls]] (82+83+85-87+118+128-140)
! colspan="6" id="sys_event Syscalls"|[[#sys_event Syscalls]] (82+83+85-87+118+128-140)
Line 1,422: Line 1,408:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| sys_spu_image_get_information
| sys_spu_image_get_information?
| int sys_spu_image_get_information(sys_spu_image_t *img, int *entry_point, int *nsegs)
| int sys_spu_image_get_information?(sys_spu_image_t *img, out:uint[4],out:uint[4])
|-
|-
| 156
| 156
Line 1,450: Line 1,436:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
|
|
| sys_spu_image_get_segments
| sys_raw_spu_load
| int sys_spu_image_get_segments(sys_spu_image_t *img, sys_spu_segment_t* segments, int size)
| 3 Params ( sys_spu_image_t * img, sys_addr_t alloc_addr, int size? ), needs much more proper information
Used by sys_raw_spu_load liblv2 function.
|-
|-
| 160
| 160
Line 1,522: Line 1,507:
|
|
| sys_spu_thread_initialize
| sys_spu_thread_initialize
| int sys_spu_thread_initialize(sys_spu_thread_t *thread, sys_spu_thread_group_t group, uint32_t spu_num, sys_spu_image_t *img, sys_spu_thread_attribute_t *attr, sys_spu_thread_argument_t *arg)
| int sys_spu_thread_initialize(sys_spu_thread_t *thread,sys_spu_thread_group_t group,uint spu_num,sys_spu_image_t *img,sys_spu_thread_attribute_t *attr,sys_spu_thread_argument_t *arg)
|-
|-
| 173
| 173
Line 1,966: Line 1,951:
|
|
| sys_spu_thread_group_get_cooperative_information
| sys_spu_thread_group_get_cooperative_information
| int sys_spu_thread_group_get_cooperative_information(sys_spu_thread_group_t id, sys_spu_thread_group_cooperative_info_t* info)
| int sys_spu_thread_group_get_cooperative_information( sys_spu_thread_group_t id, sys_spu_thread_group_cooperative_info_t* info)
Only allowed for COOPERATE_WITH_SYSTEM spu thread group types.
Only allowed for COOPERATE_WITH_SYSTEM spu thread group types.
|-
|-
Line 2,854: Line 2,839:
|
|
| sys_overlay_get_sdk_version
| sys_overlay_get_sdk_version
| int sys_overlay_get_sdk_version(sys_overlay_t ovlmid, uint32_t* sdk_ver)
| 2 Params
|-
|-
| 457
| 457
Line 2,940: Line 2,925:
| {{Root}}
| {{Root}}
| sys_npdrm_check_ekc
| sys_npdrm_check_ekc
| int syscall 470 (sys_pid_t pid, np_drm_info_t* np_drm_info)
| int syscall 470 (uint32_t type?, void* npd? [0x60])
|-
|-
| 471
| 471
Line 2,949: Line 2,934:
| int syscall_471(uint32_t type, char* titleID, void* klicensee, uint8_t* actdat, uint8_t* rif, int32_t licenseType, uint8_t* magicVersion);<!--//The function has different parameters depending if the content is debug, free or paid:
| int syscall_471(uint32_t type, char* titleID, void* klicensee, uint8_t* actdat, uint8_t* rif, int32_t licenseType, uint8_t* magicVersion);<!--//The function has different parameters depending if the content is debug, free or paid:
FREE: syscall471(npd.type, &npd.titleID, freeklicensee, NULL, NULL, npd.license, &npd);
FREE: syscall471(npd.type, &npd.titleID, freeklicensee, NULL, NULL, npd.license, &npd);
PAID: syscall471(npd.type, &npd.titleID, NULL, &actdat.keyTable[rif.actDatIndex], &rif.key, npd.license, &npd);
PAID: syscall471(npd.type, &npd.titleID, NULL, &actdat.keyTable[rif.actDatIndex], &rif.key, npd.license, &npd);//-->
Deprecated on modern firmwares, use syscall 475 instead; //-->
|-
|-
| 472
| 472
Line 2,977: Line 2,961:
| {{DECR}} {{DEX}} {{CEX}}
| {{DECR}} {{DEX}} {{CEX}}
| {{Root}}
| {{Root}}
| sys_npdrm_regist_ekc2 ?
|
| int syscall_475(sys_pid_t pid, np_drm_info_t* np_drm_info, void* klicensee, uint8_t* actdat, uint8_t* rif, uint8_t magicVersion)
| int syscall_475(uint32_t type, void* npd?, void* klicensee, uint8_t* actdat, uint8_t* rif, uint8_t magicVersion)
|-
|-
| 476
| 476
Line 4,172: Line 4,156:
|
|
| sys_rsxaudio_initialize
| sys_rsxaudio_initialize
| int sys_rsxaudio_initialize(uint32_t* out_handle)
| int sys_rsxaudio_initialize(out:uint8[4])
|-
|-
| 651
| 651
Line 4,179: Line 4,163:
|
|
| sys_rsxaudio_finalize
| sys_rsxaudio_finalize
| int sys_rsxaudio_finalize(uint32_t handle)
| 1 Params
|-
|-
| 652
| 652
Line 4,186: Line 4,170:
|
|
| sys_rsxaudio_import_shared_memory
| sys_rsxaudio_import_shared_memory
| int sys_rsxaudio_import_shared_memory(uint32_t handle, uint64_t* out_addr)
| 2 Params
|-
|-
| 653
| 653
Line 4,193: Line 4,177:
|
|
| sys_rsxaudio_unimport_shared_memory
| sys_rsxaudio_unimport_shared_memory
| int sys_rsxaudio_unimport_shared_memory(uint32_t handle, uint64_t* addr)
| 2 Params
|-
|-
| 654
| 654
Line 4,764: Line 4,748:
|
|
| sys_fs_link
| sys_fs_link
| int sys_fs_link(const char* path_from, const char* path_to)
| int sys_fs_link(char  const*, char  const*)
|-
|-
| 811
| 811
Line 4,813: Line 4,797:
|
|
| sys_fs_fcntl
| sys_fs_fcntl
| int sys_fs_fcntl(int fd, int operation, void* ptr, uint64_t)
| int sys_fs_fcntl(int, int, void *, unsigned long)
'fd' may be set to -1 or other invalid values if the operation is not using it.
'ptr' may be casted to different types depends on the operation or not be used at all.
|-
|-
| 818
| 818
Line 4,843: Line 4,825:
|
|
| sys_fs_fget_block_size
| sys_fs_fget_block_size
| int sys_fs_fget_block_size(int fd, uint64_t* sector_size, uint64_t* block_size, uint64_t* arg4, int* out_flags)
| int sys_fs_fget_block_size(int, unsigned long *, unsigned long *, unsigned long *, int *)
|-
|-
| 822
| 822
Line 4,850: Line 4,832:
|
|
| sys_fs_get_block_size
| sys_fs_get_block_size
| int sys_fs_get_block_size(const char* path, uint64_t* block_size, uint64_t* arg4)
| int sys_fs_get_block_size(char  const*, unsigned long *, unsigned long *, unsigned long *)
|-
|-
| 823
| 823
Line 4,857: Line 4,839:
|
|
| sys_fs_acl_read
| sys_fs_acl_read
| int sys_fs_acl_read(const char* path, CellFsAcl *)
| int sys_fs_acl_read(char  const*, CellFsAcl *)
|-
|-
| 824
| 824
Line 4,864: Line 4,846:
|
|
| sys_fs_acl_write
| sys_fs_acl_write
| int sys_fs_acl_read(const char* path, CellFsAcl *)
| int sys_fs_acl_read(char  const*, CellFsAcl *)
|-
|-
| 825
| 825
Line 4,871: Line 4,853:
|
|
| sys_fs_lsn_get_cda_size
| sys_fs_lsn_get_cda_size
| int sys_fs_lsn_get_cda_size(int fd, uint64_t*)
| int sys_fs_lsn_get_cda_size(int, unsigned long *)
|-
|-
| 826
| 826
Line 4,878: Line 4,860:
|
|
| sys_fs_lsn_get_cda
| sys_fs_lsn_get_cda
| int sys_fs_lsn_get_cda(int fd, CellFsCda*, uint64_t, uint64_t*)
| int sys_fs_lsn_get_cda(int, CellFsCda *, unsigned long, unsigned long *)
|-
|-
| 827
| 827
Line 4,885: Line 4,867:
|
|
| sys_fs_lsn_lock
| sys_fs_lsn_lock
| int sys_fs_lsn_lock(int fd)
| int sys_fs_lsn_lock(int)
|-
|-
| 828
| 828
Line 4,892: Line 4,874:
|
|
| sys_fs_lsn_unlock
| sys_fs_lsn_unlock
| int sys_fs_lsn_unlock(int fd)
| int sys_fs_lsn_unlock(int)
|-
|-
| 829
| 829
Line 4,899: Line 4,881:
|
|
| sys_fs_lsn_read
| sys_fs_lsn_read
| int sys_fs_lsn_read(int fd, const CellFsCda*, uint64_t size)
| int sys_fs_lsn_read(int, CellFsCda  const*, unsigned long)
|-
|-
| 830
| 830
Line 4,906: Line 4,888:
|
|
| sys_fs_lsn_write
| sys_fs_lsn_write
| int sys_fs_lsn_write(int fd, const CellFsCda*, uint64_t size)
| int sys_fs_lsn_write(int, CellFsCda  const*, unsigned long)
|-
|-
| 831
| 831
Line 4,927: Line 4,909:
|
|
| sys_fs_symbolic_link
| sys_fs_symbolic_link
| int sys_fs_symbolic_link(const char* target_path, const char* link_path)
| int sys_fs_symbolic_link(char  const*, char  const*)
|-
|-
| 834
| 834
Line 4,941: Line 4,923:
|
|
| sys_fs_chown
| sys_fs_chown
| int sys_fs_chown(const char* path, int uid, int gid)
| int sys_fs_chown(char  const*, int, int)
|-
|-
| 836
| 836
Line 4,948: Line 4,930:
|
|
| sys_fs_newfs
| sys_fs_newfs
| int sys_fs_newfs(const char* deviceName, const char*, int, const char**)  
| int sys_fs_newfs(char const* deviceName, char  const*, int, char  const**)  
|-
|-
| 837
| 837
Line 4,955: Line 4,937:
|
|
| sys_fs_mount
| sys_fs_mount
| int sys_fs_mount(const char* deviceName, const char*, const char*, int, int, int, const char**) <br>Example: Device Name (e.g CELL_FS_IOS:BUILTIN_FLSH1), Device File System (e.g CELL_FS_FAT), Device Path (e.g. /dev_flash), 0, Write Protection (0 or 1), 0, 0, 0
| int sys_fs_mount(char const* deviceName, char  const*, char  const*, int, int, int, char  const**) <br>Example: Device Name (e.g CELL_FS_IOS:BUILTIN_FLSH1), Device File System (e.g CELL_FS_FAT), Device Path (e.g. /dev_flash), 0, Write Protection (0 or 1), 0, 0, 0
|-
|-
| 838
| 838
Line 4,962: Line 4,944:
|
|
| sys_fs_unmount
| sys_fs_unmount
| int sys_fs_unmount(const char* device_path, int, int)<br>Parameters: Device Path (e.g. /dev_flash)
| int sys_fs_unmount(char  const*, int, int)<br>Parameters: Device Path (e.g. /dev_flash)
|-
|-
| 839
| 839
Line 4,982: Line 4,964:
|
|
| sys_fs_disk_free
| sys_fs_disk_free
| int sys_fs_disk_free(const char* path, uint64_t* total_free, uint64_t* avail_free)
| int sys_fs_disk_free(char  const*, unsigned long *, unsigned long *)
|-
|-
| 841
| 841
Line 4,989: Line 4,971:
|
|
| sys_fs_get_mount_info_size
| sys_fs_get_mount_info_size
| int sys_fs_get_mount_info_size(uint64_t* out_length)
| int sys_fs_get_mount_info_size(unsigned long *)
'out_length' is set to the number of mounted devices sys_fs_get_mount_info may write at max.
|-
|-
| 842
| 842
Line 4,997: Line 4,978:
|
|
| sys_fs_get_mount_info
| sys_fs_get_mount_info
| int sys_fs_get_mount_info(CellFsMountInformation* info, uint64_t buffer_length, uint64_t* written_length)
| int sys_fs_get_mount_info(CellFsMountInformation *, unsigned long, unsigned long *)
'buffer_length' is the number entries 'info' points.
'written_length' is the number of entries written to 'info', lower/equal to 'buffer_length'.
|-
|-
| 843
| 843
Line 5,006: Line 4,985:
|
|
| sys_fs_get_fs_info_size
| sys_fs_get_fs_info_size
| int sys_fs_get_fs_info_size(uint64_t *)
| int sys_fs_get_fs_info_size(unsigned long *)
|-
|-
| 844
| 844
Line 5,013: Line 4,992:
|
|
| sys_fs_get_fs_info
| sys_fs_get_fs_info
| int sys_fs_get_fs_info(uint64_t, uint64_t *, CellFsInfo *)
| int sys_fs_get_fs_info(ulong, ulong*, CellFsInfo *)
|-
|-
| 845
| 845
Line 5,020: Line 4,999:
|
|
| sys_fs_mapped_allocate
| sys_fs_mapped_allocate
| int sys_fs_mapped_allocate(int, uint64_t, void **)
| int sys_fs_mapped_allocate(int, unsigned long, void **)
|-
|-
| 846
| 846
Line 5,173: Line 5,152:
| {{dbg}}
| {{dbg}}
| sys_ss_access_control_engine
| sys_ss_access_control_engine
| 3 params, their types and usage depends on 'pkg_id'.
| 3 params
  (pkg_id=1,sys_pid_t,out:uint64_t)  
  (1,sys_pid_t,out:uint8_t [8])  
  (pkd_id=2,out:uint64_t,0) // returns [[Program Authority ID]]
  (2,out:uint8_t [8],0) // returns [[Authentication_IDs]]
  (pkg_id=3,out:uint64_t,0)
  (3,out:uint8_t [8],0)
|-
|-
| 872
| 872
Line 5,721: Line 5,700:
|
|
| sys_dbg_get_lwcond_information
| sys_dbg_get_lwcond_information
| int sys_dbg_get_lwcond_information (sys_pid_t id, sys_lwcond_pseudo_id_t id, sys_dbg_lwcond_information_t* info )
| int sys_dbg_get_lwcond_information (sys_pid_t id,   sys_lwcond_pseudo_id_t id, sys_dbg_lwcond_information_t* info )
|-
|-
| 952
| 952
Line 6,463: Line 6,442:
| 203
| 203
| lv2_peek - [[CCAPI]]
| lv2_peek - [[CCAPI]]
| false info look ccapi section
|  
|-
|-
| 204
| 204
| lv2_poke - [[CCAPI]]
| lv2_poke - [[CCAPI]]
| false info look ccapi section
|  
|-
|-
| 1022
| 1022
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)