forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Change partition attribute ?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Fri Oct 10, 2008 9:24 pm    Post subject: Change partition attribute ? Reply with quote

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
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Sat Oct 11, 2008 4:17 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Sun Oct 12, 2008 1:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Oct 12, 2008 11:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Sun Oct 12, 2008 5:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sun Oct 12, 2008 9:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Sun Oct 12, 2008 10:57 pm    Post subject: Reply with quote

I dont want to use the user memory at all :)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Oct 13, 2008 12:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group