vitasdk
Documentation of the vitasdk
sysmem.h File Reference

Go to the source code of this file.

Data Structures

struct  SceKernelAllocMemBlockKernelOpt
 

Macros

#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)
 

Typedefs

typedef SceKernelAllocMemBlockKernelOpt SceKernelAllocMemBlockOptKernel
 

Enumerations

enum  SceKernelMemoryRefPerm {
  SCE_KERNEL_MEMORY_REF_PERM_ANY = 0 , SCE_KERNEL_MEMORY_REF_PERM_USER_R = 0x01 , SCE_KERNEL_MEMORY_REF_PERM_USER_W = 0x02 , SCE_KERNEL_MEMORY_REF_PERM_USER_X = 0x04 ,
  SCE_KERNEL_MEMORY_REF_PERM_KERN_R = 0x10 , SCE_KERNEL_MEMORY_REF_PERM_KERN_W = 0x20 , SCE_KERNEL_MEMORY_REF_PERM_KERN_X = 0x40
}
 

Functions

 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)