11#include "irx_imports.h"
14IRX_ID(
"RebootByEE", 1, 1);
18extern void reboot_handler_thread(
void *userdata);
20int _start(
int argc,
char *argv[])
27 BootMode = QueryBootMode(3);
33 printf(
" No SIF service(reboot)\n");
37 printf(
" No Reboot by EE service\n");
43 v4.thread = reboot_handler_thread;
47 v3 = CreateThread(&v4);
57 int system_status_flag;
76 for (i = 0; i < data->arglen; i += 1) {
77 harg->arg[i] = data->arg[i];
79 harg->mode = data->mode;
80 iSetEventFlag(harg->system_status_flag, 0x400u);
83void reboot_handler_thread(
void *userdata)
87 if (!sceSifCheckInit()) {
90 printf(
"Reboot service module.(99/11/10)\n");
91 reboot_variables.system_status_flag = GetSystemStatusFlag();
93 sceSifAddCmdHandler(0x80000003, (SifCmdHandler_t)reboot_sif_handler, &reboot_variables);
94 WaitEventFlag(reboot_variables.system_status_flag, 0x400u, 0, 0);
95 printf(
"Get Reboot Request From EE\n");
96 sceSifSetMSFlag(0x20000u);
97 *((vu32 *)0xBF801538) = 0;
98 ReBootStart(reboot_variables.arg, reboot_variables.mode);