vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmemForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceKernelMemBlockType)
 
int ksceKernelVAtoPA (const void *va, uintptr_t *pa)
 Get the physical address of a given virtual address. More...
 
int ksceKernelVARangeToPARange (const SceKernelVARange *va_range, SceKernelPARange *pa_range)
 Get the physical address range of a given virtual address range. More...
 
int ksceKernelVARangeToPAVector (const SceKernelVARange *va_range, SceKernelPAVector *pa_vector)
 Get the physical address list of a given virtual address range. More...
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceKernelProcessContext)
 
int ksceKernelProcessGetContext (SceUID pid, SceKernelProcessContext **ctx)
 Get the process context. More...
 
int ksceKernelProcessSwitchContext (const SceKernelProcessContext *new_context, SceKernelProcessContext *prev_context)
 Switch the process context. More...
 
int ksceKernelAddressSpaceFreeAllMemBlock (SceUID guid)
 
int ksceKernelAddressSpaceSetPhyMemPart (SceUID guid, SceUInt32 index, void *pPhyMemPart)
 
int ksceKernelAddressSpaceUnmap (SceUID uid, int a2, int a3, void *addr, SceSize size)
 
int ksceKernelAddressSpaceVAtoPA (void *pAS, SceUInt32 mode, void *pVA, void **pPA)
 
SceUID ksceKernelCreateAddressSpace (SceUID pid, const char *name, SceUInt32 type, void *pOpt)
 
int ksceKernelDeleteAddressSpace (SceUID guid)
 
int ksceKernelCopyFromUser (void *dst, const void *src, SceSize len)
 Memcpy from user memory. More...
 
int ksceKernelCopyFromUserProc (SceUID pid, void *dst, const void *src, SceSize len)
 Memcpy from user memory with process. More...
 
int ksceKernelCopyToUser (void *dst, const void *src, SceSize len)
 Memcpy to user memory. More...
 
int ksceKernelCopyToUserProc (SceUID pid, void *dst, const void *src, SceSize len)
 Memcpy from user memory with process. More...
 
int ksceKernelCopyToUserDomain (void *dst, const void *src, SceSize len)
 Memcpy to user RO memory. More...
 
int ksceKernelCopyToUserTextDomain (void *dst, const void *src, SceSize len)
 Memcpy to user RO memory with DcacheAndL2WritebackRange. More...
 
int ksceKernelCopyToUserProcTextDomain (SceUID pid, void *dst, const void *src, SceSize len)
 Memcpy to user RX memory with process. More...
 
SceSSize ksceKernelStrncpyFromUser (char *dst, const char *src, SceSize len)
 Strncpy from user memory. More...
 
SceSSize ksceKernelStrncpyFromUserProc (SceUID pid, char *dst, const char *src, SceSize len)
 Strncpy from user memory with process. More...
 
SceSSize ksceKernelStrncpyToUser (char *dst, const char *src, SceSize len)
 Strncpy to user memory. More...
 
SceSSize ksceKernelStrncpyToUserProc (SceUID pid, char *dst, const char *src, SceSize len)
 Strncpy to user memory with process. More...
 
SceSize ksceKernelStrnlenFromUser (const char *s, SceSize n)
 Strnlen user memory. More...
 
SceSSize ksceKernelStrnlenFromUserProc (SceUID pid, const char *s, SceSize n)
 Strnlen user memory with process. More...
 
int ksceKernelCopyFromToUser (void *dst, const void *src, SceSize len)
 Memcpy user memory to user memory. More...
 
int ksceKernelCopyFromToUserProc (SceUID pid, void *dst, const void *src, SceSize len)
 Memcpy user memory to user memory with process. More...
 
int ksceKernelGetFixedHeapInfoByPointer (void *pFixedHeap, void *pInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x1C, SceKernelHeapCreateOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceAllocOpt)
 
SceUID ksceKernelCreateHeap (const char *name, SceSize size, SceKernelHeapCreateOpt *opt)
 Create heap area. More...
 
int ksceKernelDeleteHeap (SceUID uid)
 Delete heap area. More...
 
void * ksceKernelAllocHeapMemory (SceUID uid, SceSize size)
 Allocation the specified length of memory from heap. More...
 
void * ksceKernelAllocHeapMemoryWithOption (SceUID heapid, SceSize len, SceAllocOpt *opt)
 Allocation the specified length of memory from heap with option. More...
 
int ksceKernelFreeHeapMemory (SceUID uid, void *ptr)
 Free allocated memory. More...
 
void * ksceKernelAlloc (unsigned int size)
 Alloc kernel memory. More...
 
int ksceKernelFree (void *ptr)
 Free kernel memory. More...
 
int ksceKernelGetHeapInfo (SceUID heapid, SceUInt32 level, void *pInfo)
 
int ksceKernelGetHeapInfoByPtr (void *pObject, void *pInfo)
 
int ksceKernelNameHeapGetInfo (void *pInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x2C, SceClass)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceObjectBase)
 
SceClassksceKernelGetUIDClass (void)
 
SceClassksceKernelGetUIDDLinkClass (void)
 
SceClassksceKernelGetUIDHeapClass (void)
 
SceClassksceKernelGetUIDMemBlockClass (void)
 
int ksceUIDClassInitClass (SceClass *cls, const char *name, void *uidclass, SceSize itemsize, SceClassCallback create, SceClassCallback destroy)
 
int ksceKernelFindClassByName (const char *name, SceClass **cls)
 
SceInt32 ksceKernelUIDEntryHeapGetInfo (SceUID entryHeapId, void *pInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceGUIDKernelCreateOpt)
 
SceUID ksceGUIDKernelCreateWithOpt (SceClass *sce_class, const char *name, SceGUIDKernelCreateOpt *opt, SceObjectBase **obj)
 
int ksceGUIDClose (SceUID guid)
 
int ksceGUIDReferObject (SceUID guid, SceObjectBase **object)
 Gets an object from a UID. More...
 
int ksceGUIDReferObjectWithClass (SceUID guid, SceClass *sce_class, SceObjectBase **object)
 Gets an object from a UID with class. More...
 
int ksceGUIDReferObjectWithClassLevel (SceUID guid, SceClass *pClass, SceUInt32 level, SceObjectBase **entry)
 Gets an object from a UID with class and level. More...
 
int ksceGUIDReleaseObject (SceUID guid)
 Releases an object referenced by the UID. More...
 
int ksceGUIDGetUIDVectorByClass (SceClass *cls, int vis_level, SceUID *vector, SceSize num, SceSize *ret_num)
 Get created GUID vectors. More...
 
int ksceGUIDGetObjectWithClass (SceUID uid, SceClass *pClass, SceObjectBase **obj)
 
int ksceGUIDKernelCreateWithAttr (SceClass *pClass, const char *name, SceUInt32 attr, SceObjectBase **ppEntry)
 
SceUID ksceGUIDOpenByGUID (SceUID guid)
 
SceUID kscePUIDOpenByGUID (SceUID pid, SceUID guid)
 
int kscePUIDClose (SceUID pid, SceUID puid)
 
SceUID kscePUIDtoGUID (SceUID pid, SceUID puid)
 
 VITASDK_BUILD_ASSERT_EQ (0x58, SceKernelAllocMemBlockKernelOpt)
 
SceUID ksceKernelAllocMemBlock (const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockKernelOpt *opt)
 Allocates a new memory block. More...
 
int ksceKernelFreeMemBlock (SceUID uid)
 Frees new memory block. More...
 
int ksceKernelGetMemBlockBase (SceUID uid, void **base)
 Gets the base address of a memory block. More...
 
int ksceKernelGetMemBlockType (SceUID uid, unsigned int *type)
 Gets the memory block type of a memory block. More...
 
SceUID ksceKernelFindMemBlockByAddr (const void *addr, SceSize size)
 Find the SceUID of a memory block. More...
 
SceUID ksceKernelFindProcMemBlockByAddr (SceUID pid, const void *addr, SceSize size)
 Find the SceUID of a memory block in a process. More...
 
int ksceKernelGetMemBlockAllocMapSize (SceUID memid, SceSize *alloc_map_size)
 Get the AllocMapSize of a MemBlock. More...
 
int ksceKernelMapMemBlock (SceUID uid)
 Map a memblock. More...
 
int ksceKernelMapMemBlockWithFlag (SceUID uid, int flag)
 Map a memblock. More...
 
int ksceKernelRemapMemBlock (SceUID uid, SceKernelMemBlockType type)
 Changes the block type. More...
 
int ksceKernelUnmapMemBlock (SceUID uid)
 Unmap a memblock. More...
 
SceUID ksceKernelUserMap (const char *name, int permission, const void *user_buf, SceSize size, void **kernel_page, SceSize *kernel_size, SceUInt32 *kernel_offset)
 The mapping user address space to kernel. More...
 
SceUID ksceKernelProcUserMap (SceUID pid, const char *name, int permission, const void *user_buf, SceSize size, void **kernel_page, SceSize *kernel_size, SceUInt32 *kernel_offset)
 The mapping user address space to kernel with process. More...
 
SceUID ksceKernelUserMapWithFlags (const char *name, int permission, int flags, const void *user_buf, SceSize size, void **kernel_page, SceSize *kernel_size, unsigned int *kernel_offset)
 The mapping user address space to kernel with flags. More...
 
int ksceKernelUserUnmap (SceUID uid)
 Frees a memblock mapped with ksceKernelUserMap. More...
 
int ksceKernelLockRange (void *addr, SceSize size)
 Locks a memory range. More...
 
int ksceKernelLockRangeProc (SceUID pid, void *addr, SceSize size)
 Locks a memory range for a process (pid) More...
 
int ksceKernelLockRangeWithMode (SceKernelMemoryRefPerm perm, void *addr, SceSize size)
 Locks a memory range, checking for a given permission. More...
 
int ksceKernelUnlockRange (void *addr, SceSize size)
 Unlocks a memory range. More...
 
int ksceKernelUnlockRangeProc (SceUID pid, void *addr, SceSize size)
 Unlocks a memory range for a process (pid) More...
 
int ksceKernelUnlockRangeWithMode (SceKernelMemoryRefPerm perm, void *addr, SceSize size)
 Unlocks a memory range checking for a given permission. More...
 
SceUID ksceKernelAllocPartitionMemBlock (SceUID part, const char *name, SceKernelMemBlockType type, SceSize size, const SceKernelAllocMemBlockOptKernel *pOpt)
 
int ksceKernelFreeSimpleMemBlock (void *a1)
 

Typedefs

typedef SceUInt32 SceKernelMemBlockType
 
typedef int(* SceClassCallback) (void *item)
 
typedef SceGUIDKernelCreateOpt SceCreateUidObjOpt
 
typedef SceKernelAllocMemBlockKernelOpt SceKernelAllocMemBlockOptKernel
 

Macros

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_L1WBWA_RW   (0x09404060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_R   (0x09408040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW   (0x09408060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_DEVICE_RW   (0x0C200860)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_R   (0x0C20D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RW   (0x0C20D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_NC_RW   (0x0C208060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_GAME_RW   (0x0C50D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW   (0x0C80D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW   (0x0D808060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_RW   (0x0CA0D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_NC_RW   (0x0CA08060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RW   (0x0CF0D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_NC_RW   (0x0CF08060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_R   (0x0E20D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RW   (0x0E20D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_R   (0x0E208040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_RW   (0x0E208060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE   (0x0C208060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW   (0x0C20D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_NC_RW   (0x0CF08060)
 
#define ksceKernelGetPidContext   ksceKernelProcessGetContext
 
#define ksceKernelSwitchPidContext   ksceKernelProcessSwitchContext
 
#define ksceKernelGetPaddr(va, pa)   ksceKernelVAtoPA(va, pa)
 
#define ksceKernelGetPaddrList(input, list)   ksceKernelVARangeToPAVector((const SceKernelVARange *)input, list)
 
#define ksceKernelMemcpyUserToKernel(__dst__, __src__, __len__)   ksceKernelCopyFromUser((__dst__), (__src__), (__len__))
 
#define ksceKernelMemcpyUserToKernelForPid(__pid__, __dst__, __src__, __len__)   ksceKernelCopyFromUserProc((__pid__), (__dst__), (__src__), (__len__))
 
#define ksceKernelMemcpyKernelToUser(__dst__, __src__, __len__)   ksceKernelCopyToUser((__dst__), (__src__), (__len__))
 
#define ksceKernelMemcpyToUserRo(__dst__, __src__, __len__)   ksceKernelCopyToUserDomain((__dst__), (__src__), (__len__))
 
#define ksceKernelMemcpyToUserRx(__dst__, __src__, __len__)   ksceKernelCopyToUserTextDomain((__dst__), (__src__), (__len__))
 
#define ksceKernelRxMemcpyKernelToUserForPid(__pid__, __dst__, __src__, __len__)   ksceKernelCopyToUserProcTextDomain((__pid__), (__dst__), (__src__), (__len__))
 
#define ksceKernelMemcpyFromUser(__dst__, __src__, __len__)   ksceKernelCopyFromUser(__dst__, __src__, __len__)
 
#define ksceKernelProcMemcpyFromUser(__pid__, __dst__, __src__, __len__)   ksceKernelCopyFromUserProc(__pid__, __dst__, __src__, __len__)
 
#define ksceKernelMemcpyToUser(__dst__, __src__, __len__)   ksceKernelCopyToUser(__dst__, __src__, __len__)
 
#define ksceKernelProcMemcpyToUser(__pid__, __dst__, __src__, __len__)   ksceKernelCopyToUserProc(__pid__, __dst__, __src__, __len__)
 
#define ksceKernelUserMemcpy(__dst__, __src__, __len__)   ksceKernelCopyFromToUser(__dst__, __src__, __len__)
 
#define ksceKernelProcUserMemcpy(__pid__, __dst__, __src__, __len__)   ksceKernelCopyFromToUserProc(__pid__, __dst__, __src__, __len__)
 
#define ksceKernelProcMemcpyToUserRx(__pid__, __dst__, __src__, __len__)   ksceKernelCopyToUserProcTextDomain(__pid__, __dst__, __src__, __len__)
 
#define ksceKernelStrncpyUserToKernel(__dst__, __src__, __len__)   ksceKernelStrncpyFromUser((__dst__), (__src__), (__len__))
 
#define ksceKernelStrncpyUserForPid(__pid__, __dst__, __src__, __len__)   ksceKernelStrncpyFromUserProc((__pid__), (__dst__), (__src__), (__len__))
 
#define ksceKernelStrncpyKernelToUser(__dst__, __src__, __len__)   ksceKernelStrncpyToUser((__dst__), (__src__), (__len__))
 
#define ksceKernelProcStrncpyFromUser(__pid__, __dst__, __src__, __len__)   ksceKernelStrncpyFromUserProc((__pid__), (__dst__), (__src__), (__len__))
 
#define ksceKernelProcStrncpyToUser(__pid__, __dst__, __src__, __len__)   ksceKernelStrncpyToUserProc((__pid__), (__dst__), (__src__), (__len__))
 
#define ksceKernelStrnlenUser(__s__, __n__)   ksceKernelStrnlenFromUser(__s__, __n__)
 
#define ksceKernelProcStrnlenUser(__pid__, __s__, __n__)   ksceKernelStrnlenFromUserProc(__pid__, __s__, __n__)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_R   (0x0320D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RX   (0x0320D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RW   (0x0320D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_R   (0x0390D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RX   (0x0390D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RW   (0x0390D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_R   (0x03A0D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RX   (0x03A0D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RW   (0x03A0D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_R   (0x03F0D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RX   (0x03F0D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RW   (0x03F0D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_R   (0x0B100240)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_RW   (0x0B100260)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_R   (0x0B100840)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_RW   (0x0B100860)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_R   (0x08F0D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RX   (0x08F0D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RW   (0x08F0D060)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_UNK_RW   (0x08F0D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RX   (0x0C20D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_R   (0x0C80D040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_R   (0x0D808040)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RX   (0x0CF0D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RX   (0x0E20D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_UNK_0720D006_RW   (0x0720D006) /* SCE_KERNEL_ERROR_ILLEGAL_PARTITION_INDEX */
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_SO_RW   (0x10200206)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_DEVICE_RW   (0x10200806)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_L1WBWA_RW   (0x10204006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_R   (0x10208004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_RW   (0x10208006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_R   (0x1020D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RX   (0x1020D005)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RW   (0x1020D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_R   (0x1080D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_RW   (0x1080D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_R   (0x30808004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_RW   (0x30808006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_GAME_RW   (0x1050D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_R   (0x10A0D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_RW   (0x10A0D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_NC_RW   (0x10C08006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_RW   (0x10C0D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_R   (0x10F0D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RX   (0x10F0D005)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RW   (0x10F0D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_R   (0x10F08004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_RW   (0x10F08006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_R   (0x1220D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_RW   (0x1220D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_R   (0x13208004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_RW   (0x13208006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_R   (0x20100204)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_RW   (0x20100206)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_R   (0x20100804)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_RW   (0x20100806)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_R   (0x20108004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_RW   (0x20108006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_L1WBWA_RW   (0x40404006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_RW   (0x40408006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_R   (0x60208004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_RW   (0x60208006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_R   (0x6020D004)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_RW   (0x6020D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_GAME_RW   (0x6050D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_GAME_RW   (0xC050D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_TOOL_RW   (0xC0F0D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_11208006_NC_RW   (0x11208006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208014_NC_R   (0x60208014)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208016_NC_RW   (0x60208016)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX   (0x0390D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RX   (0x0C20D050)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX   (0x1020D005)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW   (0x1020D006)
 
#define SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0   (0x6020D006)
 
#define ksceKernelCreateClass(cls, name, uidclass, itemsize, create, destroy)   ksceUIDClassInitClass(cls, name, uidclass, itemsize, create, destroy)
 
#define ksceKernelGetUidClass()   ksceKernelGetUIDClass()
 
#define ksceKernelGetUidDLinkClass()   ksceKernelGetUIDDLinkClass()
 
#define ksceKernelGetUidHeapClass()   ksceKernelGetUIDHeapClass()
 
#define ksceKernelGetUidMemBlockClass()   ksceKernelGetUIDMemBlockClass()
 
#define ksceKernelCreateUidObj(sce_class, name, opt, obj)   ksceGUIDKernelCreateWithOpt(sce_class, name, opt, obj)
 
#define ksceKernelDeleteUid(guid)   ksceGUIDClose(guid)
 
#define ksceKernelGetObjForUid(guid, sce_class, object)   ksceGUIDReferObjectWithClass(guid, sce_class, object)
 
#define ksceKernelUidRelease(guid)   ksceGUIDReleaseObject(guid)
 
#define ksceKernelKernelUidForUserUid(pid, puid)   kscePUIDtoGUID(pid, puid)
 
#define ksceKernelCreateUserUid(pid, guid)   kscePUIDOpenByGUID(pid, guid)
 
#define ksceKernelDeleteUserUid(pid, puid)   kscePUIDClose(pid, puid)
 
#define ksceKernelFindMemBlockByAddrForPid(pid, addr, size)   ksceKernelFindProcMemBlockByAddr(pid, addr, size)
 
#define ksceKernelMapBlockUserVisible(uid)   ksceKernelMapMemBlock(uid)
 
#define ksceKernelRemapBlock(uid, type)   ksceKernelRemapMemBlock(uid, type)
 
#define ksceKernelMapUserBlock(name, permission, flags, user_buf, size, kernel_page, kernel_size, kernel_offset)   ksceKernelUserMapWithFlags(name, permission, flags, user_buf, size, kernel_page, kernel_size, kernel_offset)
 
#define ksceKernelMapUserBlockDefaultType(name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)   ksceKernelUserMap(name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)
 
#define ksceKernelMapUserBlockDefaultTypeForPid(pid, name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)   ksceKernelProcUserMap(pid, name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)
 
#define ksceKernelMemBlockRelease(uid)   ksceKernelUserUnmap(uid)
 
#define ksceKernelMemRangeRetain(addr, size)   ksceKernelLockRange(addr, size)
 
#define ksceKernelMemRangeRetainForPid(pid, addr, size)   ksceKernelLockRangeProc(pid, addr, size)
 
#define ksceKernelMemRangeRetainWithPerm(perm, addr, size)   ksceKernelLockRangeWithMode(perm, addr, size)
 
#define ksceKernelMemRangeRelease(addr, size)   ksceKernelUnlockRange(addr, size)
 
#define ksceKernelMemRangeReleaseForPid(pid, addr, size)   ksceKernelUnlockRangeProc(pid, addr, size)
 
#define ksceKernelMemRangeReleaseWithPerm(perm, addr, size)   ksceKernelUnlockRangeWithMode(perm, addr, size)
 

Data Structure Documentation

◆ SceKernelProcessContext

struct SceKernelProcessContext
Data Fields
SceUInt32 TTBR1
SceUInt32 DACR
SceUInt32 CONTEXTIDR

◆ SceKernelHeapCreateOpt

struct SceKernelHeapCreateOpt
Data Fields
SceSize size
union SceKernelHeapCreateOpt __unnamed__
SceUInt32 field_8
SceUInt32 field_C
SceUInt32 memtype
SceUInt32 field_14
SceUInt32 field_18

◆ SceAllocOpt

struct SceAllocOpt
Data Fields
SceSize size
SceSize data04
SceSize align
int data0C
int data10

◆ SceClass

struct SceClass
Data Fields
struct SceClass * next
struct SceClass * root
struct SceClass * prev
const char * name
struct SceClass * uidclass
unsigned int attributes
unsigned short itemsize
unsigned short itemsize_aligned
unsigned int unk1C
SceClassCallback create_cb
SceClassCallback destroy_cb
unsigned int magic

◆ SceObjectBase

struct SceObjectBase
Data Fields
union SceObjectBase __unnamed__
uint32_t data[]

◆ SceGUIDKernelCreateOpt

struct SceGUIDKernelCreateOpt
Data Fields
union SceGUIDKernelCreateOpt __unnamed__
SceUInt32 field_4
SceUInt32 field_8
SceUInt32 pid
SceUInt32 field_10
SceUInt32 field_14
SceUInt32 field_18
SceUInt32 field_1C

◆ SceKernelAllocMemBlockKernelOpt

struct SceKernelAllocMemBlockKernelOpt
Data Fields
SceSize size sizeof(SceKernelAllocMemBlockKernelOpt)
SceUInt32 field_4
SceUInt32 attr OR of SceKernelAllocMemBlockAttr.
SceUInt32 field_C
SceUInt32 paddr
SceSize alignment
SceUInt32 extraLow
SceUInt32 extraHigh
SceUInt32 mirror_blockid
SceUID pid
SceKernelPaddrList * paddr_list
SceUInt32 field_2C
SceUInt32 field_30
SceUInt32 field_34
SceUInt32 field_38
SceUInt32 field_3C
SceUInt32 field_40
SceUInt32 field_44
SceUInt32 field_48
SceUInt32 field_4C
SceUInt32 field_50
SceUInt32 field_54

◆ SceKernelHeapCreateOpt.__unnamed36__

union SceKernelHeapCreateOpt.__unnamed36__
Data Fields
SceUInt32 attr
SceUInt32 uselock

◆ SceObjectBase.__unnamed38__

union SceObjectBase.__unnamed38__
Data Fields
uint32_t sce_reserved[2]
__unnamed38__ __unnamed__

◆ SceObjectBase.__unnamed38__.__unnamed40__

struct SceObjectBase.__unnamed38__.__unnamed40__
Data Fields
void * object
SceClass * sce_class

◆ SceGUIDKernelCreateOpt.__unnamed42__

union SceGUIDKernelCreateOpt.__unnamed42__
Data Fields
SceUInt32 flags
SceUInt32 attr

Macro Definition Documentation

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_L1WBWA_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_L1WBWA_RW   (0x09404060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_R   (0x09408040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW   (0x09408060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_DEVICE_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_DEVICE_RW   (0x0C200860)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_R   (0x0C20D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RW   (0x0C20D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_NC_RW   (0x0C208060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_GAME_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_GAME_RW   (0x0C50D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW   (0x0C80D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW   (0x0D808060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_RW   (0x0CA0D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_CDIALOG_NC_RW   (0x0CA08060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RW   (0x0CF0D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_NC_RW   (0x0CF08060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_R   (0x0E20D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RW   (0x0E20D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_R   (0x0E208040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_NC_RW   (0x0E208060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE   (0x0C208060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW   (0x0C20D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_NC_RW   (0x0CF08060)

◆ ksceKernelGetPidContext

#define ksceKernelGetPidContext   ksceKernelProcessGetContext

◆ ksceKernelSwitchPidContext

#define ksceKernelSwitchPidContext   ksceKernelProcessSwitchContext

◆ ksceKernelGetPaddr

#define ksceKernelGetPaddr (   va,
  pa 
)    ksceKernelVAtoPA(va, pa)

◆ ksceKernelGetPaddrList

#define ksceKernelGetPaddrList (   input,
  list 
)    ksceKernelVARangeToPAVector((const SceKernelVARange *)input, list)

◆ ksceKernelMemcpyUserToKernel

#define ksceKernelMemcpyUserToKernel (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromUser((__dst__), (__src__), (__len__))

◆ ksceKernelMemcpyUserToKernelForPid

#define ksceKernelMemcpyUserToKernelForPid (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromUserProc((__pid__), (__dst__), (__src__), (__len__))

◆ ksceKernelMemcpyKernelToUser

#define ksceKernelMemcpyKernelToUser (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUser((__dst__), (__src__), (__len__))

◆ ksceKernelMemcpyToUserRo

#define ksceKernelMemcpyToUserRo (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUserDomain((__dst__), (__src__), (__len__))

◆ ksceKernelMemcpyToUserRx

#define ksceKernelMemcpyToUserRx (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUserTextDomain((__dst__), (__src__), (__len__))

◆ ksceKernelRxMemcpyKernelToUserForPid

#define ksceKernelRxMemcpyKernelToUserForPid (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUserProcTextDomain((__pid__), (__dst__), (__src__), (__len__))

◆ ksceKernelMemcpyFromUser

#define ksceKernelMemcpyFromUser (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromUser(__dst__, __src__, __len__)

◆ ksceKernelProcMemcpyFromUser

#define ksceKernelProcMemcpyFromUser (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromUserProc(__pid__, __dst__, __src__, __len__)

◆ ksceKernelMemcpyToUser

#define ksceKernelMemcpyToUser (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUser(__dst__, __src__, __len__)

◆ ksceKernelProcMemcpyToUser

#define ksceKernelProcMemcpyToUser (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUserProc(__pid__, __dst__, __src__, __len__)

◆ ksceKernelUserMemcpy

#define ksceKernelUserMemcpy (   __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromToUser(__dst__, __src__, __len__)

◆ ksceKernelProcUserMemcpy

#define ksceKernelProcUserMemcpy (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyFromToUserProc(__pid__, __dst__, __src__, __len__)

◆ ksceKernelProcMemcpyToUserRx

#define ksceKernelProcMemcpyToUserRx (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelCopyToUserProcTextDomain(__pid__, __dst__, __src__, __len__)

◆ ksceKernelStrncpyUserToKernel

#define ksceKernelStrncpyUserToKernel (   __dst__,
  __src__,
  __len__ 
)    ksceKernelStrncpyFromUser((__dst__), (__src__), (__len__))

◆ ksceKernelStrncpyUserForPid

#define ksceKernelStrncpyUserForPid (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelStrncpyFromUserProc((__pid__), (__dst__), (__src__), (__len__))

◆ ksceKernelStrncpyKernelToUser

#define ksceKernelStrncpyKernelToUser (   __dst__,
  __src__,
  __len__ 
)    ksceKernelStrncpyToUser((__dst__), (__src__), (__len__))

◆ ksceKernelProcStrncpyFromUser

#define ksceKernelProcStrncpyFromUser (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelStrncpyFromUserProc((__pid__), (__dst__), (__src__), (__len__))

◆ ksceKernelProcStrncpyToUser

#define ksceKernelProcStrncpyToUser (   __pid__,
  __dst__,
  __src__,
  __len__ 
)    ksceKernelStrncpyToUserProc((__pid__), (__dst__), (__src__), (__len__))

◆ ksceKernelStrnlenUser

#define ksceKernelStrnlenUser (   __s__,
  __n__ 
)    ksceKernelStrnlenFromUser(__s__, __n__)

◆ ksceKernelProcStrnlenUser

#define ksceKernelProcStrnlenUser (   __pid__,
  __s__,
  __n__ 
)    ksceKernelStrnlenFromUserProc(__pid__, __s__, __n__)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_R   (0x0320D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RX   (0x0320D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_MAIN_RW   (0x0320D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_R   (0x0390D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RX   (0x0390D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_SHARED_RW   (0x0390D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_R   (0x03A0D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RX   (0x03A0D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_CDIALOG_RW   (0x03A0D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_R   (0x03F0D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RX   (0x03F0D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_SHARED_TOOL_RW   (0x03F0D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_R   (0x0B100240)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_SO_RW   (0x0B100260)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_R   (0x0B100840)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_IO_DEVICE_RW   (0x0B100860)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_R   (0x08F0D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RX   (0x08F0D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_RW   (0x08F0D060)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_UNK_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_TOOL_UNK_RW   (0x08F0D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RX   (0x0C20D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_R   (0x0C80D040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_R   (0x0D808040)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_TOOL_RX   (0x0CF0D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDIALOG_RX   (0x0E20D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_UNK_0720D006_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_UNK_0720D006_RW   (0x0720D006) /* SCE_KERNEL_ERROR_ILLEGAL_PARTITION_INDEX */

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_SO_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_SO_RW   (0x10200206)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_DEVICE_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_DEVICE_RW   (0x10200806)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_L1WBWA_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_L1WBWA_RW   (0x10204006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_R   (0x10208004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_NC_RW   (0x10208006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_R   (0x1020D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RX   (0x1020D005)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_RW   (0x1020D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_R   (0x1080D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_RW   (0x1080D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_R   (0x30808004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_PHYCONT_NC_RW   (0x30808006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_GAME_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_GAME_RW   (0x1050D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_R   (0x10A0D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_CDIALOG_RW   (0x10A0D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_NC_RW   (0x10C08006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_ROOT_UMAIN_RW   (0x10C0D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_R   (0x10F0D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RX   (0x10F0D005)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_RW   (0x10F0D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_R   (0x10F08004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TOOL_NC_RW   (0x10F08006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_R   (0x1220D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_RW   (0x1220D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_R   (0x13208004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_FS_GAME_NC_RW   (0x13208006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_R   (0x20100204)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_SO_RW   (0x20100206)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_R   (0x20100804)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_RW   (0x20100806)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_R   (0x20108004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_IO_NC_RW   (0x20108006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_L1WBWA_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_L1WBWA_RW   (0x40404006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_CDRAM_RW   (0x40408006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_R   (0x60208004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_NC_RW   (0x60208006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_R   (0x6020D004)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_RW   (0x6020D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_GAME_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_TMP_GAME_RW   (0x6050D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_GAME_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_GAME_RW   (0xC050D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_TOOL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_KMP_TOOL_RW   (0xC0F0D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_11208006_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_11208006_NC_RW   (0x11208006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208014_NC_R

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208014_NC_R   (0x60208014)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208016_NC_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_UNK_60208016_NC_RW   (0x60208016)

◆ SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_SHARED_RX   (0x0390D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_USER_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RX   (0x0C20D050)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RX   (0x1020D005)

◆ SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW

#define SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_RW   (0x1020D006)

◆ SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0

#define SCE_KERNEL_MEMBLOCK_TYPE_RW_UNK0   (0x6020D006)

◆ ksceKernelCreateClass

#define ksceKernelCreateClass (   cls,
  name,
  uidclass,
  itemsize,
  create,
  destroy 
)    ksceUIDClassInitClass(cls, name, uidclass, itemsize, create, destroy)

◆ ksceKernelGetUidClass

#define ksceKernelGetUidClass ( )    ksceKernelGetUIDClass()

◆ ksceKernelGetUidDLinkClass

#define ksceKernelGetUidDLinkClass ( )    ksceKernelGetUIDDLinkClass()

◆ ksceKernelGetUidHeapClass

#define ksceKernelGetUidHeapClass ( )    ksceKernelGetUIDHeapClass()

◆ ksceKernelGetUidMemBlockClass

#define ksceKernelGetUidMemBlockClass ( )    ksceKernelGetUIDMemBlockClass()

◆ ksceKernelCreateUidObj

#define ksceKernelCreateUidObj (   sce_class,
  name,
  opt,
  obj 
)    ksceGUIDKernelCreateWithOpt(sce_class, name, opt, obj)

◆ ksceKernelDeleteUid

#define ksceKernelDeleteUid (   guid)    ksceGUIDClose(guid)

◆ ksceKernelGetObjForUid

#define ksceKernelGetObjForUid (   guid,
  sce_class,
  object 
)    ksceGUIDReferObjectWithClass(guid, sce_class, object)

◆ ksceKernelUidRelease

#define ksceKernelUidRelease (   guid)    ksceGUIDReleaseObject(guid)

◆ ksceKernelKernelUidForUserUid

#define ksceKernelKernelUidForUserUid (   pid,
  puid 
)    kscePUIDtoGUID(pid, puid)

◆ ksceKernelCreateUserUid

#define ksceKernelCreateUserUid (   pid,
  guid 
)    kscePUIDOpenByGUID(pid, guid)

◆ ksceKernelDeleteUserUid

#define ksceKernelDeleteUserUid (   pid,
  puid 
)    kscePUIDClose(pid, puid)

◆ ksceKernelFindMemBlockByAddrForPid

#define ksceKernelFindMemBlockByAddrForPid (   pid,
  addr,
  size 
)    ksceKernelFindProcMemBlockByAddr(pid, addr, size)

◆ ksceKernelMapBlockUserVisible

#define ksceKernelMapBlockUserVisible (   uid)    ksceKernelMapMemBlock(uid)

◆ ksceKernelRemapBlock

#define ksceKernelRemapBlock (   uid,
  type 
)    ksceKernelRemapMemBlock(uid, type)

◆ ksceKernelMapUserBlock

#define ksceKernelMapUserBlock (   name,
  permission,
  flags,
  user_buf,
  size,
  kernel_page,
  kernel_size,
  kernel_offset 
)    ksceKernelUserMapWithFlags(name, permission, flags, user_buf, size, kernel_page, kernel_size, kernel_offset)

◆ ksceKernelMapUserBlockDefaultType

#define ksceKernelMapUserBlockDefaultType (   name,
  permission,
  user_buf,
  size,
  kernel_page,
  kernel_size,
  kernel_offset 
)    ksceKernelUserMap(name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)

◆ ksceKernelMapUserBlockDefaultTypeForPid

#define ksceKernelMapUserBlockDefaultTypeForPid (   pid,
  name,
  permission,
  user_buf,
  size,
  kernel_page,
  kernel_size,
  kernel_offset 
)    ksceKernelProcUserMap(pid, name, permission, user_buf, size, kernel_page, kernel_size, kernel_offset)

◆ ksceKernelMemBlockRelease

#define ksceKernelMemBlockRelease (   uid)    ksceKernelUserUnmap(uid)

◆ ksceKernelMemRangeRetain

#define ksceKernelMemRangeRetain (   addr,
  size 
)    ksceKernelLockRange(addr, size)

◆ ksceKernelMemRangeRetainForPid

#define ksceKernelMemRangeRetainForPid (   pid,
  addr,
  size 
)    ksceKernelLockRangeProc(pid, addr, size)

◆ ksceKernelMemRangeRetainWithPerm

#define ksceKernelMemRangeRetainWithPerm (   perm,
  addr,
  size 
)    ksceKernelLockRangeWithMode(perm, addr, size)

◆ ksceKernelMemRangeRelease

#define ksceKernelMemRangeRelease (   addr,
  size 
)    ksceKernelUnlockRange(addr, size)

◆ ksceKernelMemRangeReleaseForPid

#define ksceKernelMemRangeReleaseForPid (   pid,
  addr,
  size 
)    ksceKernelUnlockRangeProc(pid, addr, size)

◆ ksceKernelMemRangeReleaseWithPerm

#define ksceKernelMemRangeReleaseWithPerm (   perm,
  addr,
  size 
)    ksceKernelUnlockRangeWithMode(perm, addr, size)

Typedef Documentation

◆ SceKernelMemBlockType

◆ SceClassCallback

typedef int(* SceClassCallback) (void *item)

◆ SceCreateUidObjOpt

◆ SceKernelAllocMemBlockOptKernel

Enumeration Type Documentation

◆ SceKernelAllocMemBlockAttr

Enumerator
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_MIRROR_BLOCKID 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PID 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR_LIST 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_PHYCONT 
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_ALLOW_PARTIAL_OP 

◆ SceKernelModel

Enumerator
SCE_KERNEL_MODEL_VITA 
SCE_KERNEL_MODEL_VITATV 

◆ SceKernelHeapAttr

Enumerator
SCE_KERNEL_HEAP_ATTR_HAS_AUTO_EXTEND 
SCE_KERNEL_HEAP_ATTR_HAS_MEMORY_TYPE 

◆ SceKernelMemoryRefPerm

Enumerator
SCE_KERNEL_MEMORY_REF_PERM_ANY 
SCE_KERNEL_MEMORY_REF_PERM_USER_R 
SCE_KERNEL_MEMORY_REF_PERM_USER_W 
SCE_KERNEL_MEMORY_REF_PERM_USER_X 
SCE_KERNEL_MEMORY_REF_PERM_KERN_R 
SCE_KERNEL_MEMORY_REF_PERM_KERN_W 
SCE_KERNEL_MEMORY_REF_PERM_KERN_X 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/8]

VITASDK_BUILD_ASSERT_EQ ( ,
SceKernelMemBlockType   
)

◆ ksceKernelVAtoPA()

int ksceKernelVAtoPA ( const void *  va,
uintptr_t *  pa 
)

Get the physical address of a given virtual address.

Parameters
[in]va- The virtual address
[out]pa- The physical address
Returns
0 on success, < 0 on error.

◆ ksceKernelVARangeToPARange()

int ksceKernelVARangeToPARange ( const SceKernelVARange va_range,
SceKernelPARange pa_range 
)

Get the physical address range of a given virtual address range.

Parameters
[in]va_range- The virtual address range
[out]pa_range- The vector of physical addresses
Returns
0 on success, < 0 on error.

◆ ksceKernelVARangeToPAVector()

int ksceKernelVARangeToPAVector ( const SceKernelVARange va_range,
SceKernelPAVector pa_vector 
)

Get the physical address list of a given virtual address range.

Parameters
[in]va_range- The virtual address range
[out]pa_vector- The vector of physical addresses
Returns
0 on success, < 0 on error.

◆ VITASDK_BUILD_ASSERT_EQ() [2/8]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceKernelProcessContext   
)

◆ ksceKernelProcessGetContext()

int ksceKernelProcessGetContext ( SceUID  pid,
SceKernelProcessContext **  ctx 
)

Get the process context.

Parameters
[in]pid- The target process id
[out]ctx- The context output pointer of pointer

◆ ksceKernelProcessSwitchContext()

int ksceKernelProcessSwitchContext ( const SceKernelProcessContext new_context,
SceKernelProcessContext prev_context 
)

Switch the process context.

Parameters
[in]new_context- The new context
[out]prev_context- The prev context

◆ ksceKernelAddressSpaceFreeAllMemBlock()

int ksceKernelAddressSpaceFreeAllMemBlock ( SceUID  guid)

◆ ksceKernelAddressSpaceSetPhyMemPart()

int ksceKernelAddressSpaceSetPhyMemPart ( SceUID  guid,
SceUInt32  index,
void *  pPhyMemPart 
)

◆ ksceKernelAddressSpaceUnmap()

int ksceKernelAddressSpaceUnmap ( SceUID  uid,
int  a2,
int  a3,
void *  addr,
SceSize  size 
)

◆ ksceKernelAddressSpaceVAtoPA()

int ksceKernelAddressSpaceVAtoPA ( void *  pAS,
SceUInt32  mode,
void *  pVA,
void **  pPA 
)

◆ ksceKernelCreateAddressSpace()

SceUID ksceKernelCreateAddressSpace ( SceUID  pid,
const char *  name,
SceUInt32  type,
void *  pOpt 
)

◆ ksceKernelDeleteAddressSpace()

int ksceKernelDeleteAddressSpace ( SceUID  guid)

◆ ksceKernelCopyFromUser()

int ksceKernelCopyFromUser ( void *  dst,
const void *  src,
SceSize  len 
)

Memcpy from user memory.

Parameters
[in]dst- The userland or kernel memory pointer.
[in]src- The userland memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcMemcpyFromUser. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelCopyFromUserProc()

int ksceKernelCopyFromUserProc ( SceUID  pid,
void *  dst,
const void *  src,
SceSize  len 
)

Memcpy from user memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland or kernel memory pointer.
[in]src- The userland memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
- Invoke ksceKernelMemcpyFromUser with disable interrupts. Setting TTBR1 - Yes

◆ ksceKernelCopyToUser()

int ksceKernelCopyToUser ( void *  dst,
const void *  src,
SceSize  len 
)

Memcpy to user memory.

Parameters
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcMemcpyToUser. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelCopyToUserProc()

int ksceKernelCopyToUserProc ( SceUID  pid,
void *  dst,
const void *  src,
SceSize  len 
)

Memcpy from user memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
- Invoke ksceKernelMemcpyToUser with disable interrupts. Setting TTBR1 - Yes

◆ ksceKernelCopyToUserDomain()

int ksceKernelCopyToUserDomain ( void *  dst,
const void *  src,
SceSize  len 
)

Memcpy to user RO memory.

Parameters
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
Cannot use this function in kernel context. DACR - 0x15450FC3 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelCopyToUserTextDomain()

int ksceKernelCopyToUserTextDomain ( void *  dst,
const void *  src,
SceSize  len 
)

Memcpy to user RO memory with DcacheAndL2WritebackRange.

Parameters
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcMemcpyToUserRx. DACR - 0x15450FC3 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelCopyToUserProcTextDomain()

int ksceKernelCopyToUserProcTextDomain ( SceUID  pid,
void *  dst,
const void *  src,
SceSize  len 
)

Memcpy to user RX memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The memcpy length.
Returns
0 on success, < 0 on error.
Note
- Invokes ksceKernelCopyToUserTextDomain with disable interrupts. Cleans the cache. Setting TTBR1 - Yes

◆ ksceKernelStrncpyFromUser()

SceSSize ksceKernelStrncpyFromUser ( char *  dst,
const char *  src,
SceSize  len 
)

Strncpy from user memory.

Parameters
[in]dst- The userland or kernel memory pointer.
[in]src- The userland memory pointer.
[in]len- The copy length.
Returns
The copied length on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcStrncpyFromUser. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelStrncpyFromUserProc()

SceSSize ksceKernelStrncpyFromUserProc ( SceUID  pid,
char *  dst,
const char *  src,
SceSize  len 
)

Strncpy from user memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland or kernel memory pointer.
[in]src- The userland memory pointer.
[in]len- The copy length.
Returns
The copied length on success, < 0 on error.
Note
- Invoke ksceKernelStrncpyFromUserInternal with disable interrupts. DACR - Current process DACR Setting TTBR1 - Yes

◆ ksceKernelStrncpyToUser()

SceSSize ksceKernelStrncpyToUser ( char *  dst,
const char *  src,
SceSize  len 
)

Strncpy to user memory.

Parameters
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The copy length.
Returns
The copied length on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcStrncpyToUser. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelStrncpyToUserProc()

SceSSize ksceKernelStrncpyToUserProc ( SceUID  pid,
char *  dst,
const char *  src,
SceSize  len 
)

Strncpy to user memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland memory pointer.
[in]src- The userland or kernel memory pointer.
[in]len- The copy length.
Returns
The copied length on success, < 0 on error.
Note
- Invoke ksceKernelStrncpyToUserInternal with disable interrupts. DACR - Current process DACR Setting TTBR1 - Yes

◆ ksceKernelStrnlenFromUser()

SceSize ksceKernelStrnlenFromUser ( const char *  s,
SceSize  n 
)

Strnlen user memory.

Parameters
[in]s- The userland memory pointer.
[in]n- The max length.
Returns
The strings length
Note
Cannot use this function in kernel context. Use ksceKernelProcStrnlenUser. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelStrnlenFromUserProc()

SceSSize ksceKernelStrnlenFromUserProc ( SceUID  pid,
const char *  s,
SceSize  n 
)

Strnlen user memory with process.

Parameters
[in]pid- The target process id.
[in]s- The userland memory pointer.
[in]n- The max length.
Returns
The strings length on success, < 0 on error.
Note
- Invoke ksceKernelStrnlenUserInternal with disable interrupts. DACR - Current process DACR Setting TTBR1 - Yes

◆ ksceKernelCopyFromToUser()

int ksceKernelCopyFromToUser ( void *  dst,
const void *  src,
SceSize  len 
)

Memcpy user memory to user memory.

Parameters
[in]dst- The userland memory pointer.
[in]src- The userland memory pointer.
[in]len- The copy length.
Returns
0 on success, < 0 on error.
Note
Cannot use this function in kernel context. Use ksceKernelProcUserMemcpy. DACR - 0x55555555 Setting TTBR1 - No (use current TTBR1)

◆ ksceKernelCopyFromToUserProc()

int ksceKernelCopyFromToUserProc ( SceUID  pid,
void *  dst,
const void *  src,
SceSize  len 
)

Memcpy user memory to user memory with process.

Parameters
[in]pid- The target process id.
[in]dst- The userland memory pointer.
[in]src- The userland memory pointer.
[in]len- The copy length.
Returns
0 on success, < 0 on error.
Note
- Invoke ksceKernelUserMemcpyInternal with disable interrupts. DACR - Current process DACR Setting TTBR1 - Yes

◆ ksceKernelGetFixedHeapInfoByPointer()

int ksceKernelGetFixedHeapInfoByPointer ( void *  pFixedHeap,
void *  pInfo 
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/8]

VITASDK_BUILD_ASSERT_EQ ( 0x1C  ,
SceKernelHeapCreateOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/8]

VITASDK_BUILD_ASSERT_EQ ( 0x14  ,
SceAllocOpt   
)

◆ ksceKernelCreateHeap()

SceUID ksceKernelCreateHeap ( const char *  name,
SceSize  size,
SceKernelHeapCreateOpt opt 
)

Create heap area.

Parameters
[in]name- The heap name
[in]size- The heap size
[in]opt- The pointer of SceKernelHeapCreateOpt option data
Returns
heapid on success, < 0 on error.

◆ ksceKernelDeleteHeap()

int ksceKernelDeleteHeap ( SceUID  uid)

Delete heap area.

Parameters
[in]uid- The heapid
Returns
always 0.

note - Trigger an infinite loop if something fails internally. For example, passing an invalid heapid.

◆ ksceKernelAllocHeapMemory()

void* ksceKernelAllocHeapMemory ( SceUID  uid,
SceSize  size 
)

Allocation the specified length of memory from heap.

Parameters
[in]uid- The heapid
[in]size- The alloc size
Returns
The pointer of allocated memory on success, NULL on error.

◆ ksceKernelAllocHeapMemoryWithOption()

void* ksceKernelAllocHeapMemoryWithOption ( SceUID  heapid,
SceSize  len,
SceAllocOpt opt 
)

Allocation the specified length of memory from heap with option.

Parameters
[in]uid- The heapid
[in]size- The alloc size
[in]opt- The pointer of option
Returns
The pointer of allocated memory on success, NULL on error.

◆ ksceKernelFreeHeapMemory()

int ksceKernelFreeHeapMemory ( SceUID  uid,
void *  ptr 
)

Free allocated memory.

Parameters
[in]uid- The heapid
[in]ptr- The pointer of allocated memory
Returns
0 on success, < 0 on error.

◆ ksceKernelAlloc()

void* ksceKernelAlloc ( unsigned int  size)

Alloc kernel memory.

Parameters
[in]size- The alloction memory size
Returns
memory pointer on success, NULL on error.

◆ ksceKernelFree()

int ksceKernelFree ( void *  ptr)

Free kernel memory.

Parameters
[in]ptr- The free memory pointer
Returns
0 on success, < 0 on error.

◆ ksceKernelGetHeapInfo()

int ksceKernelGetHeapInfo ( SceUID  heapid,
SceUInt32  level,
void *  pInfo 
)

◆ ksceKernelGetHeapInfoByPtr()

int ksceKernelGetHeapInfoByPtr ( void *  pObject,
void *  pInfo 
)

◆ ksceKernelNameHeapGetInfo()

int ksceKernelNameHeapGetInfo ( void *  pInfo)

◆ VITASDK_BUILD_ASSERT_EQ() [5/8]

VITASDK_BUILD_ASSERT_EQ ( 0x2C  ,
SceClass   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/8]

VITASDK_BUILD_ASSERT_EQ ( ,
SceObjectBase   
)

◆ ksceKernelGetUIDClass()

SceClass* ksceKernelGetUIDClass ( void  )

◆ ksceKernelGetUIDDLinkClass()

SceClass* ksceKernelGetUIDDLinkClass ( void  )

◆ ksceKernelGetUIDHeapClass()

SceClass* ksceKernelGetUIDHeapClass ( void  )

◆ ksceKernelGetUIDMemBlockClass()

SceClass* ksceKernelGetUIDMemBlockClass ( void  )

◆ ksceUIDClassInitClass()

int ksceUIDClassInitClass ( SceClass cls,
const char *  name,
void *  uidclass,
SceSize  itemsize,
SceClassCallback  create,
SceClassCallback  destroy 
)

◆ ksceKernelFindClassByName()

int ksceKernelFindClassByName ( const char *  name,
SceClass **  cls 
)

◆ ksceKernelUIDEntryHeapGetInfo()

SceInt32 ksceKernelUIDEntryHeapGetInfo ( SceUID  entryHeapId,
void *  pInfo 
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/8]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceGUIDKernelCreateOpt   
)

◆ ksceGUIDKernelCreateWithOpt()

SceUID ksceGUIDKernelCreateWithOpt ( SceClass sce_class,
const char *  name,
SceGUIDKernelCreateOpt opt,
SceObjectBase **  obj 
)

◆ ksceGUIDClose()

int ksceGUIDClose ( SceUID  guid)

◆ ksceGUIDReferObject()

int ksceGUIDReferObject ( SceUID  guid,
SceObjectBase **  object 
)

Gets an object from a UID.

This increases the internal reference count.

Parameters
[in]guid- The target global uid.
[out]object- The object pointer output pointer.
Returns
0 on success, < 0 on error.

◆ ksceGUIDReferObjectWithClass()

int ksceGUIDReferObjectWithClass ( SceUID  guid,
SceClass sce_class,
SceObjectBase **  object 
)

Gets an object from a UID with class.

This retains the object refer count internally! You must call ksceKernelUidRelease after you are done using it.

Parameters
[in]guid- The target global uid.
[in]sce_class- The guid parent class.
[out]object- The object pointer output pointer.
Returns
0 on success, < 0 on error.

◆ ksceGUIDReferObjectWithClassLevel()

int ksceGUIDReferObjectWithClassLevel ( SceUID  guid,
SceClass pClass,
SceUInt32  level,
SceObjectBase **  entry 
)

Gets an object from a UID with class and level.

This retains the object refer count internally! You must call ksceKernelUidRelease after you are done using it.

Parameters
[in]guid- The target global uid.
[in]sce_class- The guid parent class.
[in]level- The openable level (count/number). The max passable number is 7. If the internal object retention count is (level + 1) or higher, get an error.
[out]object- The object pointer output pointer.
Returns
0 on success, < 0 on error.

◆ ksceGUIDReleaseObject()

int ksceGUIDReleaseObject ( SceUID  guid)

Releases an object referenced by the UID.

This decreases the internal reference count.

Parameters
[in]guid- The target global uid.
Returns
0 on success, < 0 on error.

◆ ksceGUIDGetUIDVectorByClass()

int ksceGUIDGetUIDVectorByClass ( SceClass cls,
int  vis_level,
SceUID vector,
SceSize  num,
SceSize ret_num 
)

Get created GUID vectors.

Parameters
[in]cls- The Class.
[in]vis_level- The Visible level.
[out]vector- The GUID vector output.
[in]num- The GUID vector max number.
[out]ret_num- The GUID vector result number.
Returns
0 on success, < 0 on error.

◆ ksceGUIDGetObjectWithClass()

int ksceGUIDGetObjectWithClass ( SceUID  uid,
SceClass pClass,
SceObjectBase **  obj 
)

◆ ksceGUIDKernelCreateWithAttr()

int ksceGUIDKernelCreateWithAttr ( SceClass pClass,
const char *  name,
SceUInt32  attr,
SceObjectBase **  ppEntry 
)

◆ ksceGUIDOpenByGUID()

SceUID ksceGUIDOpenByGUID ( SceUID  guid)

◆ kscePUIDOpenByGUID()

SceUID kscePUIDOpenByGUID ( SceUID  pid,
SceUID  guid 
)

◆ kscePUIDClose()

int kscePUIDClose ( SceUID  pid,
SceUID  puid 
)

◆ kscePUIDtoGUID()

SceUID kscePUIDtoGUID ( SceUID  pid,
SceUID  puid 
)

◆ VITASDK_BUILD_ASSERT_EQ() [8/8]

VITASDK_BUILD_ASSERT_EQ ( 0x58  ,
SceKernelAllocMemBlockKernelOpt   
)

◆ ksceKernelAllocMemBlock()

SceUID ksceKernelAllocMemBlock ( const char *  name,
SceKernelMemBlockType  type,
SceSize  size,
SceKernelAllocMemBlockKernelOpt opt 
)

Allocates a new memory block.

Parameters
[in]name- Name for the memory block
[in]type- Type of the memory to allocate. Use SCE_KERNEL_MEMBLOCK_TYPE_USER_* or SCE_KERNEL_MEMBLOCK_TYPE_KERNEL_*.
[in]size- Size of the memory to allocate
[in]opt- Memory block options?
Returns
SceUID of the memory block on success, < 0 on error.

◆ ksceKernelFreeMemBlock()

int ksceKernelFreeMemBlock ( SceUID  uid)

Frees new memory block.

Parameters
[in]uid- SceUID of the memory block to free
Returns
0 on success, < 0 on error.

◆ ksceKernelGetMemBlockBase()

int ksceKernelGetMemBlockBase ( SceUID  uid,
void **  base 
)

Gets the base address of a memory block.

Parameters
[in]uid- SceUID of the memory block
[out]base- Base address of the memory block identified by uid
Returns
0 on success, < 0 on error.

◆ ksceKernelGetMemBlockType()

int ksceKernelGetMemBlockType ( SceUID  uid,
unsigned int *  type 
)

Gets the memory block type of a memory block.

Parameters
[in]uid- SceUID of the memory block
[out]type- Type of the memory block identified by uid
Returns
0 on success, < 0 on error.

◆ ksceKernelFindMemBlockByAddr()

SceUID ksceKernelFindMemBlockByAddr ( const void *  addr,
SceSize  size 
)

Find the SceUID of a memory block.

Parameters
[in]addr- Base address of the memory block
[in]size- Size to search for (usally set to 0)
Returns
SceUID of the memory block on success, < 0 on error.

◆ ksceKernelFindProcMemBlockByAddr()

SceUID ksceKernelFindProcMemBlockByAddr ( SceUID  pid,
const void *  addr,
SceSize  size 
)

Find the SceUID of a memory block in a process.

Parameters
[in]pid- PID of the process
[in]addr- Base address of the memory block
[in]size- Size to search for (usally set to 0)
Returns
SceUID of the memory block on success, < 0 on error.

◆ ksceKernelGetMemBlockAllocMapSize()

int ksceKernelGetMemBlockAllocMapSize ( SceUID  memid,
SceSize alloc_map_size 
)

Get the AllocMapSize of a MemBlock.

Parameters
[in]memid- The target uid of the memblock
[out]alloc_map_size- The output for AllocMapSize
Returns
SCE_OK on success, < 0 on error.

◆ ksceKernelMapMemBlock()

int ksceKernelMapMemBlock ( SceUID  uid)

Map a memblock.

Parameters
[in]uid- GUID of the memblock to map.
Returns
SCE_OK on success, < 0 on error.

◆ ksceKernelMapMemBlockWithFlag()

int ksceKernelMapMemBlockWithFlag ( SceUID  uid,
int  flag 
)

Map a memblock.

Parameters
[in]uid- GUID of the memblock to map.
[in]flag- Set to 1 to prevent DCache invalidation before mapping.
Returns
SCE_OK on success, < 0 on error.

◆ ksceKernelRemapMemBlock()

int ksceKernelRemapMemBlock ( SceUID  uid,
SceKernelMemBlockType  type 
)

Changes the block type.

Parameters
[in]uid- SceUID of the memory block to change
[in]type- Type of the memory to change to
Returns
0 on success, < 0 on error.

◆ ksceKernelUnmapMemBlock()

int ksceKernelUnmapMemBlock ( SceUID  uid)

Unmap a memblock.

Parameters
[in]uid- GUID of the memblock to unmap.
Returns
SCE_OK on success, < 0 on error.

◆ ksceKernelUserMap()

SceUID ksceKernelUserMap ( const char *  name,
int  permission,
const void *  user_buf,
SceSize  size,
void **  kernel_page,
SceSize kernel_size,
SceUInt32 kernel_offset 
)

The mapping user address space to kernel.

Parameters
[in]name- The mapping name.
[in]permission- The access permission. 1 for Read, 2 or 3 for read/write.
[in]user_buf- The target address of user space.
[in]size- The mapping size.
[out]kernel_page- The mapped kernel address space.
[out]kernel_size- The mapped size.
[out]kernel_offset- The output of address align value. For example, if user_buf is 0x81000123, kernel_offset to 0x123.
Returns
uid on success, < 0 on error.

note - If no longer use the mapped address, need to release it with ksceKernelMemBlockRelease

◆ ksceKernelProcUserMap()

SceUID ksceKernelProcUserMap ( SceUID  pid,
const char *  name,
int  permission,
const void *  user_buf,
SceSize  size,
void **  kernel_page,
SceSize kernel_size,
SceUInt32 kernel_offset 
)

The mapping user address space to kernel with process.

Parameters
[in]pid- The target process id.
[in]name- The mapping name.
[in]permission- The access permission. 1 for Read, 2 or 3 for read/write.
[in]user_buf- The target address of user space.
[in]size- The mapping size.
[out]kernel_page- The mapped kernel address space.
[out]kernel_size- The mapped size.
[out]kernel_offset- The output of address align value. For example, if user_buf is 0x81000123, kernel_offset to 0x123.
Returns
uid on success, < 0 on error.

note - If no longer use the mapped address, need to release it with ksceKernelMemBlockRelease

◆ ksceKernelUserMapWithFlags()

SceUID ksceKernelUserMapWithFlags ( const char *  name,
int  permission,
int  flags,
const void *  user_buf,
SceSize  size,
void **  kernel_page,
SceSize kernel_size,
unsigned int *  kernel_offset 
)

The mapping user address space to kernel with flags.

Parameters
[in]name- The mapping name.
[in]permission- The access permission. 1 for Read, 2 or 3 for read/write.
[in]flags- 0x11 to map into TmpFsGame instead of Tmp
[in]user_buf- The target address of user space.
[in]size- The mapping size.
[out]kernel_page- The mapped kernel address space.
[out]kernel_size- The mapped size.
[out]kernel_offset- The output of address align value. For example, if user_buf is 0x81000123, kernel_offset to 0x123.
Returns
uid on success, < 0 on error.

note - If no longer use the mapped address, need to release it with ksceKernelMemBlockRelease

◆ ksceKernelUserUnmap()

int ksceKernelUserUnmap ( SceUID  uid)

Frees a memblock mapped with ksceKernelUserMap.

This decreases the internal reference count.

Parameters
[in]uidThe uid of the memblock
Returns
0 on success, < 0 on error.

◆ ksceKernelLockRange()

int ksceKernelLockRange ( void *  addr,
SceSize  size 
)

Locks a memory range.

This increases the internal reference count of the memblocks belonging to the range.

Note: It uses SCE_KERNEL_MEMORY_REF_PERM_ANY as the reference permission.

Parameters
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelLockRangeProc()

int ksceKernelLockRangeProc ( SceUID  pid,
void *  addr,
SceSize  size 
)

Locks a memory range for a process (pid)

This increases the internal reference count of the memblocks belonging to the range.

Note: It uses SCE_KERNEL_MEMORY_REF_PERM_ANY as the reference permission.

Parameters
[in]pidThe pid of the process
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelLockRangeWithMode()

int ksceKernelLockRangeWithMode ( SceKernelMemoryRefPerm  perm,
void *  addr,
SceSize  size 
)

Locks a memory range, checking for a given permission.

This increases the internal reference count of the memblocks belonging to the range. If the memory blocks belonging to the range don't have the required memory access permission, it returns an error.

Parameters
[in]permThe required permission of the memory blocks belonging to the range
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelUnlockRange()

int ksceKernelUnlockRange ( void *  addr,
SceSize  size 
)

Unlocks a memory range.

This decreases the internal reference count of the memblocks belonging to the range.

Note: It uses SCE_KERNEL_MEMORY_REF_PERM_ANY as the reference permission.

Parameters
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelUnlockRangeProc()

int ksceKernelUnlockRangeProc ( SceUID  pid,
void *  addr,
SceSize  size 
)

Unlocks a memory range for a process (pid)

This decreases the internal reference count of the memblocks belonging to the range.

Note: It uses SCE_KERNEL_MEMORY_REF_PERM_ANY as the reference permission.

Parameters
[in]pidThe pid of the process
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelUnlockRangeWithMode()

int ksceKernelUnlockRangeWithMode ( SceKernelMemoryRefPerm  perm,
void *  addr,
SceSize  size 
)

Unlocks a memory range checking for a given permission.

This decreases the internal reference count of the memblocks belonging to the range. If the memory blocks belonging to the range don't have the required memory access permission, it returns an error.

Parameters
[in]permThe required permission of the memory blocks belonging to the range
[in]addrThe start address
[in]sizeThe memory range size
Returns
0 on success, < 0 on error.

◆ ksceKernelAllocPartitionMemBlock()

SceUID ksceKernelAllocPartitionMemBlock ( SceUID  part,
const char *  name,
SceKernelMemBlockType  type,
SceSize  size,
const SceKernelAllocMemBlockOptKernel pOpt 
)

◆ ksceKernelFreeSimpleMemBlock()

int ksceKernelFreeSimpleMemBlock ( void *  a1)