 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sat Mar 29, 2008 2:24 am Post subject: PS2 exceptions |
|
|
The tutorial at http://lukasz.dk/playstation-2-programming/ps2link-debugging/ is very helpful (thanks Lukasz!) but I wonder if there is documentation about the meaning of the Cause, BadVAddr and Status things...
Or are they classified as confidential being described only on official Sony SDK documents? |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Sat Mar 29, 2008 4:18 am Post subject: Re: PS2 exceptions |
|
|
| ptek wrote: | The tutorial at http://lukasz.dk/playstation-2-programming/ps2link-debugging/ is very helpful (thanks Lukasz!) but I wonder if there is documentation about the meaning of the Cause, BadVAddr and Status things...
Or are they classified as confidential being described only on official Sony SDK documents? |
These values are MIPS COP0 registers, which are documented in alot of MIPS manuals, but for a more PS2 specific one, check the tx79 manual at my site http://lukasz.dk/playstation-2-programming/file-mirror/
Check section 4, about CPU and COP0 registers, there you will see the description of Status, BadVAddr and Cause. There is also a more detailed description of the different exceptions in section 5 of the manual.
The PS2 has hardware support for virtual memory in the form of TLB. If you get an TLB exception, this is because the PS2 assumes that if you referer to an "illegal" address, then this is a virtual address. But since you havn't registered a TLB (virtual address) handler in the kernel, you just get an error in PS2Link, stating its a Bad Virtual Address (BadVAddr).
If you printf memory access addresses in the function which caused the exception (locate this either by ee-addr2line or EPC) and if you get the same address as BadVAddr, you found your bug :-) _________________ Lukasz.dk |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sat Mar 29, 2008 11:54 pm Post subject: |
|
|
| OK thanks |
|
| Back to top |
|
 |
|
|
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
|