MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / sys_ss_access_control_engine

Function sys_ss_access_control_engine

kernel/cellos/src/sys_ss.cpp:152–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152error_code sys_ss_access_control_engine(u64 pkg_id, u64 a2, u64 a3) {
153 sys_ss.success(
154 "sys_ss_access_control_engine(pkg_id=0x%llx, a2=0x%llx, a3=0x%llx)",
155 pkg_id, a2, a3);
156
157 const u64 authid =
158 g_ps3_process_info.self_info.valid
159 ? g_ps3_process_info.self_info.prog_id_hdr.program_authority_id
160 : 0;
161
162 switch (pkg_id) {
163 case 0x1: {
164 if (!g_ps3_process_info.debug_or_root()) {
165 return not_an_error(CELL_ENOSYS);
166 }
167
168 if (!a2) {
169 return CELL_ESRCH;
170 }
171
172 ensure(a2 == static_cast<u64>(process_getpid()));
173 vm::write64(vm::cast(a3), authid);
174 break;
175 }
176 case 0x2: {
177 vm::write64(vm::cast(a2), authid);
178 break;
179 }
180 case 0x3: {
181 if (!g_ps3_process_info.debug_or_root()) {
182 return CELL_ENOSYS;
183 }
184
185 break;
186 }
187 default:
188 return 0x8001051du;
189 }
190
191 return CELL_OK;
192}
193
194error_code sys_ss_get_console_id(vm::ptr<u8> buf) {
195 sys_ss.notice("sys_ss_get_console_id(buf=*0x%x)", buf);

Callers

nothing calls this directly

Calls 6

process_getpidFunction · 0.85
write64Function · 0.85
successMethod · 0.80
debug_or_rootMethod · 0.80
ensureFunction · 0.50
castFunction · 0.50

Tested by

no test coverage detected