vitasdk
Documentation of the vitasdk
sm_sched.h
Go to the documentation of this file.
1
6#ifndef _PSP2KERN_KERNEL_SM_SCHED_H_
7#define _PSP2KERN_KERNEL_SM_SCHED_H_
8
9#include <psp2kern/types.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
30typedef int SceSblSmSchedProxyIntrHandler(SceSmSchedRequestId req_id, SceUInt32 interrupt_index, int callback_arg, SceUInt32 status, int result);
31
34
46
72VITASDK_BUILD_ASSERT_EQ(1, SceSmStatus); // size is from FW 3.60
73
84
102
104#define ksceSblSmSchedProxyChangeF00DStatus ksceSblSmSchedProxyForceStop
105
118
120#define ksceSblSmSchedProxyDisableCry2ArmInterrupt ksceSblSmSchedProxyReleaseIntrHandler
121
138
140#define ksceSblSmSchedProxyEnableCry2ArmInterrupt ksceSblSmSchedProxyRegisterIntrHandler
141
164int ksceSblSmSchedProxyExecuteSKCommand(SceUInt32 command_index, SceUInt32 unused1, SceUInt32 unused2, SceUInt32 unused3);
165
167#define ksceSblSmSchedProxyExecuteF00DCommand ksceSblSmSchedProxyExecuteSKCommand
168
179
181#define ksceSblSmSchedProxyGetCommandF00DRegister ksceSblSmSchedProxyReadArm2Cry
182
194
203
230int ksceSblSmSchedProxyInvoke(SceBool priority, SceUIntPtr pa_ranges_paddr, SceSize pa_range_count, const SceSmInvokeDataBlockInput *invoke_input, const SceSblSmCommContext130 *context, SceSmSchedRequestId *request_id);
231
242
251
263
274
276#define ksceSblSmSchedProxyWriteArm2Cry ksceSblSmSchedProxyClearArm2Cry
277
288
290#define ksceSblSmSchedProxyWriteCry2Arm ksceSblSmSchedProxyClearCry2Arm
291
298
305
306#ifdef __cplusplus
307}
308#endif
309
310#endif /* _PSP2KERN_KERNEL_SM_SCHED_H_ */
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceUInt32 SceSmSchedRequestId
Secure-module scheduler request ID.
Definition sm_comm.h:16
Identity and media context used to start a secure module.
Definition sm_comm.h:51
Definition sm_comm.h:20
Startup data whose meaning is defined by the secure module.
Definition sm_comm.h:34
int ksceSblSmSchedProxyExecuteSKCommand(SceUInt32 command_index, SceUInt32 unused1, SceUInt32 unused2, SceUInt32 unused3)
Execute a secure scheduler control command selected by index through SMC 0x13C.
int SceSblSmSchedProxyIntrHandler(SceSmSchedRequestId req_id, SceUInt32 interrupt_index, int callback_arg, SceUInt32 status, int result)
Secure-module scheduler interrupt handler.
Definition sm_sched.h:30
int ksceSblSmSchedProxyInitialize(void)
Initialize the scheduler proxy.
int ksceSblSmSchedProxyWait(SceSmSchedRequestId req_id, SceSblSmCommPair *result)
Wait for a secure-module request to complete through SMC 0x12E.
SceSblSmSchedProxyErrorCode
Scheduler-proxy errors identified on FW 3.60.
Definition sm_sched.h:36
int ksceSblSmSchedProxyForceStop(SceSmSchedRequestId req_id)
Forcibly stop a secure-module scheduler request through SMC 0x130.
int ksceSblSmSchedProxyReleaseIntrHandler(SceSmSchedRequestId req_id, SceUInt32 interrupt_index)
Release a scheduler interrupt handler through SMC 0x139.
int ksceSblSmSchedProxyClearArm2Cry(SceSmSchedRequestId req_id, SceUInt32 mailbox_id, SceUInt32 mail_mask)
Clear bits in an ARM-to-Cry mailbox through SMC 0x135.
int ksceSblSmSchedProxyGetStatus(SceSmSchedRequestId req_id, SceSblSmCommPair *result)
Query a secure-module request through SMC 0x12F.
int ksceSblSmSchedProxyUninitialize(void)
Uninitialize the scheduler proxy.
SceSmStatus
Secure-module scheduler lifecycle states.
Definition sm_sched.h:63
int ksceSblSmSchedProxyInvoke(SceBool priority, SceUIntPtr pa_ranges_paddr, SceSize pa_range_count, const SceSmInvokeDataBlockInput *invoke_input, const SceSblSmCommContext130 *context, SceSmSchedRequestId *request_id)
Start a secure-module scheduler request through SMC 0x12D.
SceSblSmSchedProxyIntrHandler sceSblSmSchedProxyIntrHandler
Previous VitaSDK type name retained for backwards compatibility.
Definition sm_sched.h:33
int ksceSblSmSchedProxyClearCry2Arm(SceSmSchedRequestId req_id, SceUInt32 mailbox_id, SceUInt32 mail_mask)
Clear bits in a Cry-to-ARM mailbox through SMC 0x136.
int ksceSblSmSchedProxyRegisterIntrHandler(SceSmSchedRequestId req_id, SceUInt32 interrupt_index, SceSblSmSchedProxyIntrHandler *handler, int callback_arg)
Register a scheduler interrupt handler through SMC 0x138.
int SceSblSmSchedProxyForKernel_1DFC8624(void)
Does nothing on FW 3.60.
int ksceSblSmSchedProxyReadArm2Cry(SceSmSchedRequestId req_id, SceUInt32 mailbox_id, SceUInt32 *mail_value)
Read an ARM-to-Cry mailbox through SMC 0x134.
int ksceSblSmSchedCallFunc(SceSmSchedRequestId req_id, SceUInt32 mailbox_id, SceUInt32 mail_mask)
Set bits in an ARM-to-Cry scheduler mailbox through SMC 0x133.
int ksceSblSmSchedProxyReadCry2Arm(SceSmSchedRequestId req_id, SceUInt32 mailbox_id, SceUInt32 *mail_value)
Read a Cry-to-ARM mailbox through SMC 0x137.
int SceSblSmSchedProxyForKernel_984EC9D1(void)
Does nothing on FW 3.60.
@ SCE_SM_SCHED_PROXY_ERROR_HANDLER_ALREADY_REGISTERED
Definition sm_sched.h:43
@ SCE_SM_SCHED_PROXY_ERROR_REQUEST_NOT_FOUND
Definition sm_sched.h:42
@ SCE_SM_SCHED_PROXY_ERROR_NOT_INITIALIZED
Definition sm_sched.h:40
@ SCE_SM_SCHED_PROXY_ERROR_NOT_SUPPORTED
Definition sm_sched.h:39
@ SCE_SM_SCHED_PROXY_ERROR_REQUEST_ALREADY_STOPPED
FW 3.60 callers treat this as an already stopped request.
Definition sm_sched.h:41
@ SCE_SM_SCHED_PROXY_ERROR_INVALID_ARGUMENT
Definition sm_sched.h:38
@ SCE_SM_SCHED_PROXY_ERROR_RESOURCE_LIMIT
Definition sm_sched.h:37
@ SCE_SM_STATUS_START_RESUME_REQUESTED
Definition sm_sched.h:68
@ SCE_SM_STATUS_RUNNING
Definition sm_sched.h:65
@ SCE_SM_STATUS_READY
Definition sm_sched.h:64
@ SCE_SM_STATUS_STOPPED
Definition sm_sched.h:66
@ SCE_SM_STATUS_SUSPENDING
Definition sm_sched.h:69
@ SCE_SM_STATUS_SUSPEND_REQUESTED
Definition sm_sched.h:70
@ SCE_SM_STATUS_FORCE_STOPPED
Definition sm_sched.h:67
int SceBool
Definition types.h:59
unsigned int SceUIntPtr
Definition types.h:84
unsigned int SceSize
Definition types.h:56
uint32_t SceUInt32
Definition types.h:45