![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceKernelAllocMemBlockOpt |
| struct | SceKernelFreeMemorySizeInfo |
| struct | SceKernelSubbudgetInfo |
Enumerations | |
| enum | SceKernelMemoryAccessType { SCE_KERNEL_MEMORY_ACCESS_X = 0x01 , SCE_KERNEL_MEMORY_ACCESS_W = 0x02 , SCE_KERNEL_MEMORY_ACCESS_R = 0x04 } |
| enum | SceKernelSubbudgetId { SCE_KERNEL_SUBBUDGET_ID_MAIN = 0 , SCE_KERNEL_SUBBUDGET_ID_CDLG = 1 } |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0x40, SceKernelAllocMemBlockOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelFreeMemorySizeInfo) | |
| SceUID | sceKernelAllocMemBlock (const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockOpt *opt) |
| Allocates a new memory block. | |
| int | sceKernelFreeMemBlock (SceUID uid) |
| Frees new memory block. | |
| int | sceKernelGetMemBlockBase (SceUID uid, void **base) |
| Gets the base address of a memory block. | |
| SceUID | sceKernelFindMemBlockByAddr (const void *addr, SceSize size) |
| Gets the associated memory block to a given memory location. | |
| int | sceKernelGetMemBlockInfoByAddr (void *base, SceKernelMemBlockInfo *info) |
| Gets memory block information given a base address. | |
| int | sceKernelGetMemBlockInfoByRange (void *base, SceSize size, SceKernelMemBlockInfo *info) |
| Gets memory block information given a memory location. | |
| SceUID | sceKernelAllocMemBlockForVM (const char *name, SceSize size) |
| Allocates a new memory block for Virtual Machine domain. | |
| int | sceKernelSyncVMDomain (SceUID uid, void *data, SceSize size) |
| Flushes Virtual Machine caches for the given memory location. | |
| int | sceKernelOpenVMDomain (void) |
| Makes all Virtual Machine domain memblocks executeable. | |
| int | sceKernelCloseVMDomain (void) |
| Makes all Virtual Machine domain memblocks non executeable. | |
| int | sceKernelOpenMemBlock (const char *name, int flags) |
| int | sceKernelCloseMemBlock (SceUID uid) |
| int | sceKernelGetModelForCDialog (void) |
| Get the model number of the device. | |
| int | sceKernelGetModel (void) |
| Get the model number of the device. | |
| int | sceKernelGetFreeMemorySize (SceKernelFreeMemorySizeInfo *info) |
| Get free memory size in bytes. | |
| int | sceKernelIsPSVitaTV (void) |
| Returns wether the running device is a PSTV or not. | |
| VITASDK_BUILD_ASSERT_EQ (0xC, SceKernelSubbudgetInfo) | |
| SceUID | sceKernelAllocUnmapMemBlock (const char *name, SceSize size) |
| Allocates a user memblock without mapping it. | |
| int | sceKernelCheckModelCapability (int capability_index) |
| Tests a hardware-model capability whose purpose is unknown. | |
| int | sceKernelFreeMemBlockForVM (SceUID uid) |
| Frees a VM memblock tracked by the calling process. | |
| int | sceKernelGetSubbudgetInfo (SceKernelSubbudgetId subbudget, SceKernelSubbudgetInfo *info) |
| Gets the total and free size of a memory subbudget. | |
Variables | |
| SceSize | SceKernelAllocMemBlockOpt::size |
| SceUInt32 | SceKernelAllocMemBlockOpt::attr |
| SceSize | SceKernelAllocMemBlockOpt::alignment |
| SceUInt32 | SceKernelAllocMemBlockOpt::uidBaseBlock |
| const char * | SceKernelAllocMemBlockOpt::strBaseBlockName |
| int | SceKernelAllocMemBlockOpt::flags |
| int | SceKernelAllocMemBlockOpt::reserved [10] |
| Unknown flags 0x10 or 0x30 for sceKernelOpenMemBlock. | |
| int | SceKernelFreeMemorySizeInfo::size |
| sizeof(SceKernelFreeMemorySizeInfo) | |
| int | SceKernelFreeMemorySizeInfo::size_user |
| Free memory size for *_USER_RW memory. | |
| int | SceKernelFreeMemorySizeInfo::size_cdram |
| Free memory size for USER_CDRAM_RW memory. | |
| int | SceKernelFreeMemorySizeInfo::size_phycont |
| Free memory size for USER_MAIN_PHYCONT_*_RW memory. | |
| SceSize | SceKernelSubbudgetInfo::size |
Must be set to sizeof(SceKernelSubbudgetInfo). | |
| SceSize | SceKernelSubbudgetInfo::total_size |
| Total size of the subbudget in bytes. | |
| SceSize | SceKernelSubbudgetInfo::free_size |
| Free space in the subbudget in bytes. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
| struct SceKernelAllocMemBlockOpt |
| Data Fields | ||
|---|---|---|
| SceSize | size | |
| SceUInt32 | attr | |
| SceSize | alignment | |
| SceUInt32 | uidBaseBlock | |
| const char * | strBaseBlockName | |
| int | flags | |
| int | reserved[10] | Unknown flags 0x10 or 0x30 for sceKernelOpenMemBlock. |
| struct SceKernelFreeMemorySizeInfo |
| struct SceKernelSubbudgetInfo |
| enum SceKernelSubbudgetId |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x40 | , |
| SceKernelAllocMemBlockOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceKernelFreeMemorySizeInfo | |||
| ) |
| SceUID sceKernelAllocMemBlock | ( | const char * | name, |
| SceKernelMemBlockType | type, | ||
| SceSize | size, | ||
| SceKernelAllocMemBlockOpt * | opt | ||
| ) |
Allocates a new memory block.
| [in] | name | - Name for the memory block |
| [in] | type | - Type of the memory to allocate. Use SCE_KERNEL_MEMBLOCK_TYPE_USER_*. |
| [in] | size | - Size of the memory to allocate in bytes |
| [in] | opt | - Memory block options? |
| int sceKernelFreeMemBlock | ( | SceUID | uid | ) |
Frees new memory block.
| [in] | uid | - SceUID of the memory block to free |
| int sceKernelGetMemBlockBase | ( | SceUID | uid, |
| void ** | base | ||
| ) |
Gets the base address of a memory block.
| [in] | uid | - SceUID of the memory block to free |
| [out] | base | - Base address of the memory block identified by SceUID |
Gets the associated memory block to a given memory location.
| [in] | addr | - Address of the memory location to search |
| [in] | size | - Size of the memory location in bytes |
| int sceKernelGetMemBlockInfoByAddr | ( | void * | base, |
| SceKernelMemBlockInfo * | info | ||
| ) |
Gets memory block information given a base address.
| [in] | base | - Base address of the memory location |
| [out] | info | - Information about the related memory block |
| int sceKernelGetMemBlockInfoByRange | ( | void * | base, |
| SceSize | size, | ||
| SceKernelMemBlockInfo * | info | ||
| ) |
Gets memory block information given a memory location.
| [in] | base | - Address of the memory location |
| [in] | size | - Size of the memory location in bytes |
| [out] | info | - Information about the related memory block |
Allocates a new memory block for Virtual Machine domain.
| [in] | name | - Name for the memory block |
| [in] | size | - Size of the memory to allocate in bytes |
Flushes Virtual Machine caches for the given memory location.
| [in] | uid | - SceUID of the memory block to flush. |
| [in] | data | - Address of the memory location to flush |
| [in] | size | - Size of the memory to flush in bytes |
| int sceKernelOpenVMDomain | ( | void | ) |
Makes all Virtual Machine domain memblocks executeable.
| int sceKernelCloseVMDomain | ( | void | ) |
Makes all Virtual Machine domain memblocks non executeable.
| int sceKernelOpenMemBlock | ( | const char * | name, |
| int | flags | ||
| ) |
| int sceKernelCloseMemBlock | ( | SceUID | uid | ) |
| int sceKernelGetModelForCDialog | ( | void | ) |
Get the model number of the device.
| int sceKernelGetModel | ( | void | ) |
Get the model number of the device.
| int sceKernelGetFreeMemorySize | ( | SceKernelFreeMemorySizeInfo * | info | ) |
Get free memory size in bytes.
| [out] | info | - Returned free memory size for different kind of memory block types |
| int sceKernelIsPSVitaTV | ( | void | ) |
Returns wether the running device is a PSTV or not.
| VITASDK_BUILD_ASSERT_EQ | ( | 0xC | , |
| SceKernelSubbudgetInfo | |||
| ) |
Allocates a user memblock without mapping it.
FW 3.60 accepts only sizes aligned to 1 MiB and copies at most 31 bytes of name. This function is available only while user remapping is enabled.
| [in] | name | - Memory-block name. |
| [in] | size | - Allocation size, aligned to 1 MiB. |
| int sceKernelCheckModelCapability | ( | int | capability_index | ) |
Tests a hardware-model capability whose purpose is unknown.
FW 3.60 accepts only indices 7 and 10. Index 10 identifies the Teleport-client model: TeleportClient requires it, while TeleportServer rejects operation when it is present. The purpose of index 7 is unknown; no caller in the FW 3.60 dumps uses it.
| [in] | capability_index | Capability bit index. |
| int sceKernelFreeMemBlockForVM | ( | SceUID | uid | ) |
Frees a VM memblock tracked by the calling process.
| [in] | uid | - UID previously returned for a tracked VM allocation. |
| int sceKernelGetSubbudgetInfo | ( | SceKernelSubbudgetId | subbudget, |
| SceKernelSubbudgetInfo * | info | ||
| ) |
Gets the total and free size of a memory subbudget.
| [in] | subbudget | SCE_KERNEL_SUBBUDGET_ID_MAIN or SCE_KERNEL_SUBBUDGET_ID_CDLG. |
| [in,out] | info | Pointer to a SceKernelSubbudgetInfo structure. |
| SceSize SceKernelAllocMemBlockOpt::size |
| SceUInt32 SceKernelAllocMemBlockOpt::attr |
| SceSize SceKernelAllocMemBlockOpt::alignment |
| SceUInt32 SceKernelAllocMemBlockOpt::uidBaseBlock |
| const char* SceKernelAllocMemBlockOpt::strBaseBlockName |
| int SceKernelAllocMemBlockOpt::flags |
| int SceKernelAllocMemBlockOpt::reserved[10] |
Unknown flags 0x10 or 0x30 for sceKernelOpenMemBlock.
| int SceKernelFreeMemorySizeInfo::size |
sizeof(SceKernelFreeMemorySizeInfo)
| int SceKernelFreeMemorySizeInfo::size_user |
Free memory size for *_USER_RW memory.
| int SceKernelFreeMemorySizeInfo::size_cdram |
Free memory size for USER_CDRAM_RW memory.
| int SceKernelFreeMemorySizeInfo::size_phycont |
Free memory size for USER_MAIN_PHYCONT_*_RW memory.
| SceSize SceKernelSubbudgetInfo::size |
Must be set to sizeof(SceKernelSubbudgetInfo).
| SceSize SceKernelSubbudgetInfo::total_size |
Total size of the subbudget in bytes.
| SceSize SceKernelSubbudgetInfo::free_size |
Free space in the subbudget in bytes.