MPC8540 Custom Board _start_e500
I am in the process of bringing up a custom SBC with an MPC8540. I am using the BDI2000 to debug. When I trace through the code, the system halts in _start_e500 in start.S where it invalidates MMU L1/L2.
I have a Rev 1 processor, and the errata is included
at the top of _start_e500. It seems to fail at isync.
I have included some screen captures from the BDI2000
and the source.
BDI>ti
Target CPU : MPC8560/8540 Rev.2
Target state : halted
Debug entry cause : single step
Current PC : 0xfffff14c
Current CR : 0x40000000
Current MSR : 0x00000200
Current LR : 0x00000000
Current CCSRBAR : 0x40000000
BDI>ti
Target CPU : MPC8560/8540 Rev.2
Target state : halted
Debug entry cause : single step
Current PC : 0xfffff150
Current CR : 0x40000000
Current MSR : 0x00000200
Current LR : 0x00000000
Current CCSRBAR : 0x40000000BDI>ti
- Core status is 0x0041
*** Core is stopped, no restart possible
# PPC: timeout while waiting for halt
BDI> Target CPU : MPC8560/8540 Rev.2
Target state : halted
Debug entry cause : COP freeze
Current PC : 0x00000000
Current CR : 0x00000000
Current MSR : 0x00000000
Current LR : 0x00000000
Current CCSRBAR : 0x40000000# Step timeout detected
BDI>
start.S
/*
* Invalidate MMU L1/L2
*
* Note: There is a fixup earlier for Errata
CPU4 on
* Rev 1 parts that must precede this MMU
invalidation.
*/
li r2, 0x001e
mtspr MMUCSR0, r2
isyncstart.S objdump:
140: 38 20 20 00 li r1,8192 144: 7c 3f 63 a6 mtspr 415,r1 148: 38 40 00 1e li r2,30 14c: 7c 54 fb a6 mtiac1 r2 150: 4c 00 01 2c isync 154: 38 60 00 04 li r3,4
Could the initializationt that the BDI does be interfering here? Any help would be greatly appreciated.
Thanks,
Jeff Stevens
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
Quoted 4 lines · Jeff Stevens
I am in the process of bringing up a custom SBC with an MPC8540. I am using the BDI2000 to debug. When I trace through the code, the system halts in
_start_e500instart.Swhere it invalidates MMU L1/L2.
Not surprised. Debugging the e500 core at this level is much more challenging than classic PowerPC cores due to the MMU and debug implementation. I never found a way to fully single step through the entire initialization phase, you have to go as far as you can with the debugger, inspect the next bunch of code by hand, assume it works, and then trap the processor at a later time. Any time you stop the e500 core (and you really never stop it, the BDI2000 kinda makes it appear that way) you have to also stop and think about the environment at that time, if you can continue from that point, and then gather the necessary information. In most cases, you can single step the e500 just like a classic core, but anything related to MMU change is likely to cause a more challenging debug environment.
I have debugged several e500 core boot roms with the BDI2000, and you will get the hang of it. You just have to change your methods a little, and most of all stop thinking the processor core or the debugger isn't working correctly. They are both probably doing exactly what you told them to do.
Good Luck! :-)
-- Dan