| View previous topic :: View next topic |
| Author |
Message |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Mon Apr 13, 2009 1:56 am Post subject: Precision regarding sctrlHENFindFunction |
|
|
When hooking a kernel function in the samples that i have seen programmers
use sctrHENFindFunction like this sample got from iop.prx:
orgaddr[0]=sctrlHENFindFunction("sceIOFileManager", "IoFileMgrForUser", 0x06A70004);
this function get the address of the nid 0x06A7004 aka sceIoMkdir
i have found the nid from http://silverspring.lan.st/
My question Is this code firmware independant even if sony change is nids ?
Does M33 firmware do all the job ?
Another question what does this function do ?
int level = sctrlKernelSetUserLevel(8);
it save the userlevel into the var level but what is the userlevel ? |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Apr 13, 2009 2:53 am Post subject: |
|
|
You only need to search for the 3.52 NIDs. The M33 NIDs resolver will handle the random NIDs even in this function.
Userlevel is required for some privileged operations. In the case of iop.prx all the functions are syscalls, so they will be executed in the context of the thread that called the function, i.e. a user mode thread. By setting the userlever=8, the level of the calling user mode thread will be 8 and it can access the restricted functions like assigning flash0:/ for read/write etc. |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Mon Apr 13, 2009 3:12 am Post subject: |
|
|
thx torch for the reply as you have see the sample is taken from your iop.prx.
where do you find all this information ? is there a site regrouping system resources or just talking to guys like moonlight , tyranid etc ..... |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Apr 13, 2009 3:15 am Post subject: |
|
|
| I asked moonlight. The iop.prx is his not mine, I just added the code in module_stop to undo the patches on unloading the module, otherwise it broke the M33 patches in the XMB. |
|
| Back to top |
|
 |
|