| View previous topic :: View next topic |
| Author |
Message |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Fri Oct 10, 2008 9:24 pm Post subject: Change partition attribute ? |
|
|
Hello, i would like to know if there is a way to change the attribute of a partition ?
I would like to change the slim partition 8 (currently with kernel attr it seems, 000C) to user attribute (000F).
I think moonlight already did this sort of thing in the past when the slim comes out, but i can't find any help from what i see in the sdk includes.
Any help would be greatly appreciated :) |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sat Oct 11, 2008 4:17 am Post subject: |
|
|
From a blog:
artition 8: (new in the psp slim!)
topaddr = 0x8A000000, size = 0x1C00000 (28 MB), attr = 0x0C
Partition 10: (new in psp slim!)
topaddr = 0x8BC00000, size = 0x400000 (4 MB), attr = 0x0C
So it seems at first the new partitions are for kernel mode use, but i guess they can be unlocked for user mode use with the SetDdrMemoryProtection function :)
===================================================================
from moonlight
Techincal stuff, the memory protection of te extra slim memory is in these hardware registers: 0xbc000040-0xbc00007F.
Set all to 0xFF, and you have access to it in user mode (note: sceKernelSetDdrMemoryProtection wouldn't do it)., but anyways is done automatically by m33 when launching homebrew, so no need to care about that.
===============================================================
and from 3.71M33 sdk
it seems Moonlight has incorporated the addition 32 MBytes to Malloc() when using his SDK for M33-3 (Looking at sample memory test).
===================================================================
hope that this help you |
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Sun Oct 12, 2008 1:35 am Post subject: |
|
|
Hi sauron, thanks for the reply.
I think that setting this registers to 0xFF "just" allow access to this partition from user mode, what is done by the m33 firmware u think, but do not change the attribute.
What i want to do is load an user mode module to this partition, but it's currently impossible due to the fact that it has the kernel mode attributes.
Using the sceKernelSetDdrMemoryProtection function won't work too. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Sun Oct 12, 2008 11:34 am Post subject: |
|
|
I don't think its possible to load a kernel module to user memory.
Also, if its even possible, while changing the partition to kernel, it should ideally be one contiguous block like what is done with the remaining 32MB in user mode. But it would have the 24MB user memory sandwiched between the first kernel partition. |
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Sun Oct 12, 2008 5:28 pm Post subject: |
|
|
| Torch wrote: | I don't think its possible to load a kernel module to user memory.
Also, if its even possible, while changing the partition to kernel, it should ideally be one contiguous block like what is done with the remaining 32MB in user mode. But it would have the 24MB user memory sandwiched between the first kernel partition. |
I don't whant to change the slim partition to kernel attr, it's already the case. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Sun Oct 12, 2008 9:33 pm Post subject: |
|
|
| Cpasjuste wrote: |
I don't whant to change the slim partition to kernel attr, it's already the case. |
Sorry I mixed up kernel and user in my entire post.
What are you trying to achieve by loading the module into that particular partition? No matter where its loaded, you can still allocate memory for operation from the entire user memory (including extra memory) while in homebrew mode, and even in VSH mode. |
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Sun Oct 12, 2008 10:57 pm Post subject: |
|
|
| I dont want to use the user memory at all :) |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Oct 13, 2008 12:30 am Post subject: |
|
|
| Cpasjuste wrote: | | I dont want to use the user memory at all :) |
Then that automatically excludes anything that runs during the XMB because Sony code already makes it into user memory.
That only leaves Game mode homebrew. You'd have to disable the M33 patches in systemctrl.prx which converts the UMD Cache into user memory.
I believe it only does this if it finds the LARGE_MEMORY tag in the EBOOT.PBP.
Even if its already flagged as kernel mode, its highly unlikely that the sceKernelLoad functions will allow loading into that partition. In fact in game mode (after disabling M33 patch which in turn disables UMD Cache module first) I don't think its even partitioned, but must be addressed as raw memory. |
|
| Back to top |
|
 |
|