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 

Boot Code

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



Joined: 29 Sep 2005
Posts: 3

PostPosted: Fri Mar 03, 2006 4:17 pm    Post subject: Boot Code Reply with quote

Hi

I am created a dump of the boot code, I am presuming that it has not been changed once the system starts (0xBFC00000 to 0xBFC10000). I am just trying to understand what it is doing.

BFC00000: ctc0 v0, 6
BFC00004: mfc0 v0, Unknown 22
BFC00008: bnez v0, BFC00040
BFC0000C: nop
BFC00010: cfc0 v0, 9
BFC00014: jr v0
BFC00018: nop

I did not think that COP 0 had any control registers? also unsure what cop0 reg 22 is, any clues where I should look for this info ?
Back to top
View user's profile Send private message
ryoko_no_usagi



Joined: 29 Nov 2005
Posts: 65

PostPosted: Fri Mar 03, 2006 7:21 pm    Post subject: Re: Boot Code Reply with quote

zilmar wrote:
Hi

I am created a dump of the boot code, I am presuming that it has not been changed once the system starts (0xBFC00000 to 0xBFC10000). I am just trying to understand what it is doing.

BFC00000: ctc0 v0, 6
BFC00004: mfc0 v0, Unknown 22
BFC00008: bnez v0, BFC00040
BFC0000C: nop
BFC00010: cfc0 v0, 9
BFC00014: jr v0
BFC00018: nop

I did not think that COP 0 had any control registers? also unsure what cop0 reg 22 is, any clues where I should look for this info ?


Cop0 is a custom effort by Sony; apparently it has control registers. Reg22 indicates whether main or ME core (0 = main, 1 = ME). Groepaz/Hitmen released a hardware doc with some info on cop0.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
zilmar



Joined: 29 Sep 2005
Posts: 3

PostPosted: Fri Mar 03, 2006 8:55 pm    Post subject: Reply with quote

Thanks I think I found the doc you meant at
http://psp3d.com/showthread.php?t=3709
Back to top
View user's profile Send private message
chrismulhearn



Joined: 22 Feb 2006
Posts: 80

PostPosted: Wed Mar 08, 2006 3:07 am    Post subject: Reply with quote

The r4000 manual lists CP0 $22 as "reserved". The PSP hardware doc lists it as "Virtual Address of Exception Vector."

It also lists CP0 $6 as "Number of Wired TLB entries". This controls how many TLB entries are unchangable. this register is not included in the PSP hardware document.

By loading "0" in there , they are saying "no TLB entries are fixed".

In all likelihood though, this is a case where the Allegrex and the R4000 differ. I've heard numerous places that the CP0 in Allegrex is different from the R4000s, (The only thing I've verified for myself is that the interrupt control in the CP0 status register is the same in both r4000 and allegrex) I'd love to know how people found out the Allegrex CP0 is different??? Is that just speculation or has it been verified? And if there is no TLB support, why does the PSP hardware doc list CP0 $22 as "_VIRTUAL_ address of exception vector" ?

confusing.......

-Chris
Back to top
View user's profile Send private message
chrismulhearn



Joined: 22 Feb 2006
Posts: 80

PostPosted: Wed Mar 08, 2006 4:00 am    Post subject: Reply with quote

Actually, I was thinking those were all "mfc0" and "mtc0" instructions.

But for CP0 registers "6" and "9", its actually using the "cfc0" and "ctc0" instructions.

For the uninitiated, the r4000 manual states that "CFCz" and "CTCz" move data from Coprocessor(z)'s *control* registers (as opposed to its *general* registers accessible via mfc and mtc instructions.)

Note that the r4000 manual ALSO states that CFCz and CTCz are *not valid* for cp0, probably because it has no control registers.

But apparantly Allegrex's CP0 does! shucks!!

Does anyone have any more info about this CP0 than what is in the PSP hardware doc?
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