vitasdk
Documentation of the vitasdk
types.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2KERN_TYPES_H_
7 #define _PSP2KERN_TYPES_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2common/types.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 enum {
22  SCE_KERNEL_HEAP_ID = 0x1000B,
65  SCE_DEPRECATED_EX(SCE_GUID_SYSROOT, "use SCE_KERNEL_SYSROOT_ID") = SCE_KERNEL_SYSROOT_ID,
66  SCE_DEPRECATED_EX(SCE_GUID_GUID_ENTRY_HEAP, "use SCE_KERNEL_GUID_ENTRY_HEAP_ID") = SCE_KERNEL_GUID_ENTRY_HEAP_ID,
67  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_PROCESS_ID, "use SCE_KERNEL_PROCESS_ID") = SCE_KERNEL_PROCESS_ID,
68  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_ADDRESS_SPACE, "use SCE_KERNEL_ADDRESS_SPACE_ID") = SCE_KERNEL_ADDRESS_SPACE_ID,
69  SCE_DEPRECATED_EX(SCE_GUID_PART_ROOT, "use SCE_KERNEL_PARTITION_ROOT_ID") = SCE_KERNEL_PARTITION_ROOT_ID,
70  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_HEAP, "use SCE_KERNEL_HEAP_ID") = SCE_KERNEL_HEAP_ID,
71  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_HEAP_UNCACHE, "use SCE_KERNEL_HEAP_UNCACHE_ID") = SCE_KERNEL_HEAP_UNCACHE_ID,
72  SCE_DEPRECATED_EX(SCE_GUID_PHYMEM_PART_KERNEL, "use SCE_KERNEL_PHYMEMPART_ID") = SCE_KERNEL_PHYMEMPART_ID,
73  SCE_DEPRECATED_EX(SCE_GUID_PHYMEM_PART_TOOL, "use SCE_KERNEL_PHYMEMPART_TOOL_ID") = SCE_KERNEL_PHYMEMPART_TOOL_ID,
74  SCE_DEPRECATED_EX(SCE_GUID_DUMMY_PROCESS_GAME, "use SCE_KERNEL_DUMMY_PROCESS_GAME_ID") = SCE_KERNEL_DUMMY_PROCESS_GAME_ID,
75  SCE_DEPRECATED_EX(SCE_GUID_DUMMY_PROCESS_SYSTEM, "use SCE_KERNEL_DUMMY_PROCESS_SYSTEM_ID") = SCE_KERNEL_DUMMY_PROCESS_SYSTEM_ID,
76  SCE_DEPRECATED_EX(SCE_GUID_CLEANER_THREAD, "use SCE_KERNEL_CLEANER_THREAD_ID") = SCE_KERNEL_CLEANER_THREAD_ID,
77  SCE_DEPRECATED_EX(SCE_GUID_IDLE_THREAD_0, "use SCE_KERNEL_IDLE_THREAD_0_ID") = SCE_KERNEL_IDLE_THREAD_0_ID,
78  SCE_DEPRECATED_EX(SCE_GUID_IDLE_THREAD_1, "use SCE_KERNEL_IDLE_THREAD_1_ID") = SCE_KERNEL_IDLE_THREAD_1_ID,
79  SCE_DEPRECATED_EX(SCE_GUID_IDLE_THREAD_2, "use SCE_KERNEL_IDLE_THREAD_2_ID") = SCE_KERNEL_IDLE_THREAD_2_ID,
80  SCE_DEPRECATED_EX(SCE_GUID_IDLE_THREAD_3, "use SCE_KERNEL_IDLE_THREAD_3_ID") = SCE_KERNEL_IDLE_THREAD_3_ID,
81  SCE_DEPRECATED_EX(SCE_GUID_ALL_PROCESS, "use SCE_KERNEL_ALL_PROCESS_ID") = SCE_KERNEL_ALL_PROCESS_ID,
82  SCE_DEPRECATED_EX(SCE_GUID_GLOBAL_WORK_QUEUE, "use SCE_KERNEL_GLOBAL_WORK_QUEUE_ID") = SCE_KERNEL_GLOBAL_WORK_QUEUE_ID,
83  SCE_DEPRECATED_EX(SCE_GUID_THREAD_ID_SYSTEM_ALL, "use SCE_KERNEL_THREAD_ID_SYSTEM_ALL_ID") = SCE_KERNEL_THREAD_ID_SYSTEM_ALL_ID,
84  SCE_DEPRECATED_EX(SCE_GUID_THREAD_ID_PROCESS_ALL, "use SCE_KERNEL_THREAD_ID_PROCESS_ALL_ID") = SCE_KERNEL_THREAD_ID_PROCESS_ALL_ID,
85  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_HEAP_TOOL, "use SCE_KERNEL_HEAP_TOOL_ID") = SCE_KERNEL_HEAP_TOOL_ID,
86  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_16B, "use SCE_KERNEL_FIXED_HEAP_16B_ID") = SCE_KERNEL_FIXED_HEAP_16B_ID,
87  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_32B, "use SCE_KERNEL_FIXED_HEAP_32B_ID") = SCE_KERNEL_FIXED_HEAP_32B_ID,
88  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_48B, "use SCE_KERNEL_FIXED_HEAP_48B_ID") = SCE_KERNEL_FIXED_HEAP_48B_ID,
89  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_64B, "use SCE_KERNEL_FIXED_HEAP_64B_ID") = SCE_KERNEL_FIXED_HEAP_64B_ID,
90  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_128B, "use SCE_KERNEL_FIXED_HEAP_128B_ID") = SCE_KERNEL_FIXED_HEAP_128B_ID,
91  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_256B, "use SCE_KERNEL_FIXED_HEAP_256B_ID") = SCE_KERNEL_FIXED_HEAP_256B_ID,
92  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_512B, "use SCE_KERNEL_FIXED_HEAP_512B_ID") = SCE_KERNEL_FIXED_HEAP_512B_ID,
93  SCE_DEPRECATED_EX(SCE_GUID_KERNEL_FIXED_HEAP_L2_OBJECT, "use SCE_KERNEL_FIXED_HEAP_L2_OBJECT_ID") = SCE_KERNEL_FIXED_HEAP_L2_OBJECT_ID,
94  SCE_DEPRECATED_EX(SCE_GUID_PART_USER_SHARED, "use SCE_KERNEL_PARTITION_USER_SHARED_ID") = SCE_KERNEL_PARTITION_USER_SHARED_ID,
95  SCE_DEPRECATED_EX(SCE_GUID_PART_IO, "use SCE_KERNEL_PARTITION_IO_ID") = SCE_KERNEL_PARTITION_IO_ID,
96  SCE_DEPRECATED_EX(SCE_GUID_PART_CDRAM, "use SCE_KERNEL_PARTITION_CDRAM_ID") = SCE_KERNEL_PARTITION_CDRAM_ID,
97  SCE_DEPRECATED_EX(SCE_GUID_PART_TMP, "use SCE_KERNEL_PARTITION_TMP_ID") = SCE_KERNEL_PARTITION_TMP_ID,
98  SCE_DEPRECATED_EX(SCE_GUID_PART_ROOT_UNCACHE, "use SCE_KERNEL_PARTITION_ROOT_UNCACHE_ID") = SCE_KERNEL_PARTITION_ROOT_UNCACHE_ID,
99  SCE_DEPRECATED_EX(SCE_GUID_PART_KMP, "use SCE_KERNEL_PARTITION_KMP_ID") = SCE_KERNEL_PARTITION_KMP_ID,
100  SCE_DEPRECATED_EX(SCE_GUID_PART_ROOT_UNCACHE_GPU_GAME, "use SCE_KERNEL_PARTITION_ROOT_UNCACHE_GPU_GAME_ID") = SCE_KERNEL_PARTITION_ROOT_UNCACHE_GPU_GAME_ID,
101  SCE_DEPRECATED_EX(SCE_GUID_PART_TMP_FS_GAME, "use SCE_KERNEL_PARTITION_TMP_FS_GAME_ID") = SCE_KERNEL_PARTITION_TMP_FS_GAME_ID,
102  SCE_DEPRECATED_EX(SCE_GUID_PART_ROOT_TOOL, "use SCE_KERNEL_PARTITION_ROOT_TOOL_ID") = SCE_KERNEL_PARTITION_ROOT_TOOL_ID,
103  SCE_DEPRECATED_EX(SCE_GUID_PART_ROOT_TOOL_UNCACHE, "use SCE_KERNEL_PARTITION_ROOT_TOOL_UNCACHE_ID") = SCE_KERNEL_PARTITION_ROOT_TOOL_UNCACHE_ID,
104  SCE_DEPRECATED_EX(SCE_GUID_PROCESS_BUDGET_KERNEL, "use SCE_KERNEL_PROCESS_BUDGET_KERNEL_ID") = SCE_KERNEL_PROCESS_BUDGET_KERNEL_ID,
105  SCE_DEPRECATED_EX(SCE_GUID_PROCESS_BUDGET_SHELL, "use SCE_KERNEL_PROCESS_BUDGET_SHELL_ID") = SCE_KERNEL_PROCESS_BUDGET_SHELL_ID,
106  SCE_DEPRECATED_EX(SCE_GUID_PROCESS_BUDGET_FULL_GAME, "use SCE_KERNEL_PROCESS_BUDGET_FULL_GAME_ID") = SCE_KERNEL_PROCESS_BUDGET_FULL_GAME_ID
107  /* Random completely from 0x10061 */
108 };
109 
110 typedef struct SceKernelAddrPair { // do not use
111  uint32_t addr;
112  uint32_t length;
115 
116 typedef struct SceKernelVARange { // size is 0x8
117  uint32_t addr;
121 
122 typedef struct SceKernelPARange { // size is 0x8
123  uint32_t addr;
127 
128 typedef struct SceKernelPAVector { // size is 0x14
130  union {
131  struct {
132  uint32_t ranges_size;
133  uint32_t data_in_vector;
134  uint32_t count;
136  };
137  struct { // do not use.
138  uint32_t list_size;
139  uint32_t ret_length;
140  uint32_t ret_count;
142  };
143  };
146 
147 typedef SceKernelPAVector SceKernelPaddrList; // do not use.
148 
149 typedef struct SceSharedSecret { // size is 0x40-bytes
150  uint8_t shared_secret_0[0x10];
151  uint8_t klicensee[0x10];
152  uint8_t shared_secret_2[0x10];
153  uint32_t shared_secret_3_0; // ex: 0x10
159 
160 typedef struct SceSelfAuthInfo { // size is 0x90-bytes
162  uint8_t padding[8];
163  uint8_t capability[0x20];
164  uint8_t attribute[0x20];
168 
169 typedef struct SceAuthInfo { // size is 0x130-bytes
171  SceUInt32 self_type; // kernel = 0, user = 1, sm = 2
176 } SceAuthInfo;
178 
199 typedef int SceKernelSpinlock;
201 
222 
237 
238 #ifdef __cplusplus
239 }
240 #endif
241 
242 #endif /* _PSP2KERN_TYPES_H_ */
uint32_t list_size
Size in elements of the list array.
Definition: types.h:138
uint8_t klicensee[0x10]
Definition: types.h:151
SceSize size
Size of this structure.
Definition: types.h:129
SceKernelPAVector SceKernelPaddrList
Definition: types.h:147
uint32_t addr
Definition: types.h:123
uint32_t shared_secret_3_3
Definition: types.h:156
VITASDK_BUILD_ASSERT_EQ(8, SceIVector2)
uint32_t ret_count
Number of elements of list filled by ksceKernelVARangeToPAVector.
Definition: types.h:140
uint32_t shared_secret_3_2
Definition: types.h:155
uint32_t ret_length
Total physical size of the memory pairs.
Definition: types.h:139
SceSize size
Definition: types.h:118
uint32_t count
Definition: types.h:134
int SceKernelSpinlock
Regular Spinlock.
Definition: types.h:199
SceSelfAuthInfo request
Definition: types.h:172
uint32_t ranges_size
Ex: 8.
Definition: types.h:132
SceSize size
Definition: types.h:124
unsigned int SceSize
Definition: types.h:56
SceUInt32 unk_0x00
Definition: types.h:170
uint8_t attribute[0x20]
Definition: types.h:164
uint32_t shared_secret_3_1
Definition: types.h:154
uint32_t addr
Definition: types.h:117
SceSelfAuthInfo response
Definition: types.h:173
SceUInt32 unk_0x12C
Definition: types.h:175
SceKernelAddrPair * list
Array of physical addresses and their lengths pairs.
Definition: types.h:141
uint32_t addr
Address.
Definition: types.h:111
uint8_t shared_secret_0[0x10]
Definition: types.h:150
SceUInt64 program_authority_id
Definition: types.h:161
int SceKernelIntrStatus
Interrupt status.
Definition: types.h:235
int SceKernelRWSpinlock
RW Spinlock.
Definition: types.h:220
uint32_t length
Length.
Definition: types.h:112
uint64_t SceUInt64
Definition: types.h:51
uint32_t SceUInt32
Definition: types.h:45
SceUInt32 self_type
Definition: types.h:171
SceKernelPARange * ranges
Definition: types.h:135
uint8_t shared_secret_2[0x10]
Definition: types.h:152
uint32_t data_in_vector
Must be <= 8.
Definition: types.h:133
SceUInt32 media_type
Definition: types.h:174
SceSharedSecret secret
Definition: types.h:165
uint8_t capability[0x20]
Definition: types.h:163
uint8_t padding[8]
Definition: types.h:162
uint32_t shared_secret_3_0
Definition: types.h:153
@ SCE_KERNEL_RESERVED_GUID_29
Definition: types.h:37
@ SCE_KERNEL_GUID_ENTRY_HEAP_ID
Definition: types.h:18
@ SCE_KERNEL_PARTITION_TMP_ID
Definition: types.h:54
@ SCE_KERNEL_THREAD_ID_SYSTEM_ALL_ID
Definition: types.h:35
@ SCE_KERNEL_CLEANER_THREAD_ID
Definition: types.h:28
@ SCE_KERNEL_FIXED_HEAP_512B_ID
Definition: types.h:48
@ SCE_KERNEL_IDLE_THREAD_3_ID
Definition: types.h:32
@ SCE_KERNEL_FIXED_HEAP_64B_ID
Definition: types.h:45
@ SCE_KERNEL_ADDRESS_SPACE_ID
Definition: types.h:20
@ SCE_KERNEL_DUMMY_PROCESS_SYSTEM_ID
Definition: types.h:27
@ SCE_KERNEL_HEAP_TOOL_ID
Definition: types.h:38
@ SCE_KERNEL_FIXED_HEAP_32B_ID
Definition: types.h:43
@ SCE_KERNEL_PHYMEMPART_TOOL_ID
Definition: types.h:25
@ SCE_KERNEL_FIXED_HEAP_L2_OBJECT_ID
Definition: types.h:49
@ SCE_KERNEL_HEAP_ID
Definition: types.h:22
@ SCE_KERNEL_PARTITION_ROOT_TOOL_ID
Definition: types.h:59
@ SCE_KERNEL_DUMMY_PROCESS_GAME_ID
Definition: types.h:26
@ SCE_KERNEL_ALL_PROCESS_ID
Definition: types.h:33
@ SCE_KERNEL_FIXED_HEAP_128B_ID
Definition: types.h:46
@ SCE_KERNEL_PARTITION_ROOT_UNCACHE_ID
Definition: types.h:55
@ SCE_KERNEL_FIXED_HEAP_256B_ID
Definition: types.h:47
@ SCE_KERNEL_PHYMEMPART_ID
Definition: types.h:24
@ SCE_KERNEL_RESERVED_GUID_49
Definition: types.h:53
@ SCE_KERNEL_PROCESS_BUDGET_FULL_GAME_ID
Definition: types.h:63
@ SCE_KERNEL_FIXED_HEAP_16B_ID
Definition: types.h:42
@ SCE_KERNEL_GLOBAL_WORK_QUEUE_ID
Definition: types.h:34
@ SCE_KERNEL_PARTITION_ROOT_TOOL_UNCACHE_ID
Definition: types.h:60
@ SCE_KERNEL_IDLE_THREAD_2_ID
Definition: types.h:31
@ SCE_KERNEL_PROCESS_ID
Definition: types.h:19
@ SCE_KERNEL_HEAP_UNCACHE_ID
Definition: types.h:23
@ SCE_KERNEL_PARTITION_USER_SHARED_ID
Definition: types.h:50
@ SCE_DEPRECATED_EX
Definition: types.h:65
@ SCE_KERNEL_RESERVED_GUID_5F
Definition: types.h:64
@ SCE_KERNEL_PARTITION_TMP_FS_GAME_ID
Definition: types.h:58
@ SCE_KERNEL_PARTITION_KMP_ID
Definition: types.h:56
@ SCE_KERNEL_RESERVED_GUID_2F
Definition: types.h:40
@ SCE_KERNEL_THREAD_ID_PROCESS_ALL_ID
Definition: types.h:36
@ SCE_KERNEL_SYSROOT_ID
Definition: types.h:17
@ SCE_KERNEL_FIXED_HEAP_48B_ID
Definition: types.h:44
@ SCE_KERNEL_PARTITION_ROOT_UNCACHE_GPU_GAME_ID
Definition: types.h:57
@ SCE_KERNEL_PARTITION_ROOT_ID
Definition: types.h:21
@ SCE_KERNEL_PROCESS_BUDGET_KERNEL_ID
Definition: types.h:61
@ SCE_KERNEL_PARTITION_IO_ID
Definition: types.h:51
@ SCE_KERNEL_PARTITION_CDRAM_ID
Definition: types.h:52
@ SCE_KERNEL_IDLE_THREAD_0_ID
Definition: types.h:29
@ SCE_KERNEL_RESERVED_GUID_2D
Definition: types.h:39
@ SCE_KERNEL_IDLE_THREAD_1_ID
Definition: types.h:30
@ SCE_KERNEL_PROCESS_BUDGET_SHELL_ID
Definition: types.h:62
@ SCE_KERNEL_RESERVED_GUID_31
Definition: types.h:41
Definition: types.h:169
Definition: types.h:110
Definition: types.h:122
Definition: types.h:128
Definition: types.h:116
Definition: types.h:160
Definition: types.h:149