| View previous topic :: View next topic |
| Author |
Message |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Tue Jul 11, 2006 1:57 am Post subject: 2.60 syscalls |
|
|
Is there a list of 2.60 syscalls available?
Thanks in advance, although I doubt that this firmware is well-documented... |
|
| Back to top |
|
 |
groepaz

Joined: 01 Sep 2005 Posts: 305
|
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Tue Jul 11, 2006 3:33 am Post subject: |
|
|
I'm trying to add some stuff to DevHook's VSHExtender which runs in emulated 2.60 (no, not ISO-related stuff :))
Thanks anyway. |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Tue Jul 11, 2006 3:38 am Post subject: |
|
|
The code i gave you the other day should work.
NIDS don't change between firmware revisions.
The only reasons why it shouldn't work is the function being removed, or the library containing the function being changed of module. |
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Tue Jul 11, 2006 3:42 am Post subject: |
|
|
That code causes a crash. It could be that scePower_service/scePower_driver no longer applies, or the function has been entirely removed, as you said.
I will try to use asm("syscall 0x2198"); instead as this is the same function.
(btw, for anyone who doesn't know what I'm on about, I'm talking about using scePower_0442D852) |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Tue Jul 11, 2006 3:46 am Post subject: |
|
|
| I have checked it. The function still exists and in the same place. |
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Tue Jul 11, 2006 3:51 am Post subject: |
|
|
| Okay, well it's definitely crashing. I'll try some more stuff :) |
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Tue Jul 11, 2006 5:01 am Post subject: |
|
|
Tried the following:
static void reboot(int blah)
{
__asm__ volatile("syscall 0x2198");
}
When I called reboot(0); the PSP crashed.
static void reboot(int blah)
{
asm("syscall 0x2198");
}
When I called reboot(0); it ignored it. |
|
| Back to top |
|
 |
bradskins
Joined: 20 Dec 2005 Posts: 25
|
Posted: Tue Jul 11, 2006 12:57 pm Post subject: |
|
|
Could you forward the same info my way?
bradskins (underscore) 28@hotmail.....
thanks! _________________ ... |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Tue Jul 11, 2006 6:23 pm Post subject: |
|
|
You can't use fixed syscall IDs on 2.5 or 2.6.
See the older thread about coding for the GTA exploit, but basically there's a random offset applied to the syscall ID (not entirely sure when it changes, probably at each reboot).
You need to find some way of calibrating the syscall IDs. The typical way is to find the link table in some preloaded module elsewhere in RAM, and to determine the ID of a known NID from there.
BTW there's a simple syscall list in that thread, with all the syscalls that are used by GTA. _________________ Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you! |
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Sun Jul 16, 2006 11:52 pm Post subject: |
|
|
Thanks for the list. BTW, this code is to be used within a PRX which is loaded by DevHook on top of the 2.60/2.71 VSH, so we're in kernel mode and not restrained by the GTA eLoader environment :)
After looking at the list I realised that the syscall for the scePower_0442D852 function is 0x2197 and not 0x2198.. I must have been looking at the wrong row :/
Anyway, I changed my code to | Code: | | __asm__ volatile("syscall 0x2197"); | yet it still crashes.
However, scePower_0442D852 needs to be called as "scePower_0442D852(0);" but I'm not sure how to do this using inline asm.
Hope someone can help me with this :s |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Mon Jul 31, 2006 5:02 am Post subject: |
|
|
If you're in kernel mode then you can use a kernel mode function (sorry, I forget the name, I've never used it personally) to retrieve the syscall ID for a given NID.
On 2.5+, the syscalls are not constant - so as I said before, you can't rely on using a fixed syscall number every time. _________________ Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you! |
|
| Back to top |
|
 |
PspPet
Joined: 30 Mar 2005 Posts: 210
|
Posted: Wed Aug 02, 2006 2:14 am Post subject: |
|
|
sceKernelQuerySystemCall and related sceKernelRegisterSystemCallTable
IIRC 'sceKernelQuerySystemCall' takes a pointer to the real function in (kernel) memory
Anyway not very useful in most cases for the reasons stated. |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Wed Aug 02, 2006 5:02 am Post subject: |
|
|
| PspPet wrote: | sceKernelQuerySystemCall and related sceKernelRegisterSystemCallTable
IIRC 'sceKernelQuerySystemCall' takes a pointer to the real function in (kernel) memory
Anyway not very useful in most cases for the reasons stated. |
Hmm, that's unfortunate, I was hoping to look into using that function at some point in the near future.
Still, I guess it's possible to RE the table in kmem and retrieve the syscall from there. Or perhaps to use QueryModuleInfo to look through the export info of the module concerned. _________________ Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you! |
|
| Back to top |
|
 |
|