
I'm having problem in debugging U-boot for a MPC8540 processor. I'm debugging the very first instructions with the BDI2000. The system crash at 2 places in start.S:
1- when clearing debug registers 2- when setting up interrupt vectors
/* clear registers */ li r0,0 mtspr SRR0,r0 mtspr SRR1,r0 mtspr CSRR0,r0 mtspr CSRR1,r0 mtspr MCSRR0,r0 mtspr MCSRR1,r0
mtspr ESR,r0 mtspr MCSR,r0 mtspr DEAR,r0
HERE -> mtspr DBCR0,r0 mtspr DBCR1,r0 mtspr DBCR2,r0 mtspr IAC1,r0 mtspr IAC2,r0 mtspr DAC1,r0 mtspr DAC2,r0
mfspr r1,DBSR mtspr DBSR,r1 /* Clear all valid bits */
mtspr PID0,r0 mtspr PID1,r0 mtspr PID2,r0 mtspr TCR,r0
mtspr BUCSR,r0 /* disable branch prediction */ mtspr MAS4,r0 mtspr MAS6,r0 isync
/* Setup interrupt vectors */ HERE -> lis r1,0xfff8 mtspr IVPR, r1
li r1,0x0100 mtspr IVOR0,r1 /* 0: Critical input */ li r1,0x0200 mtspr IVOR1,r1 /* 1: Machine check */ li r1,0x0300 mtspr IVOR2,r1 /* 2: Data storage */ li r1,0x0400 mtspr IVOR3,r1 /* 3: Instruction storage */ li r1,0x0500 mtspr IVOR4,r1 /* 4: External interrupt */ li r1,0x0600 mtspr IVOR5,r1 /* 5: Alignment */ li r1,0x0700 mtspr IVOR6,r1 /* 6: Program check */ li r1,0x0800 mtspr IVOR7,r1 /* 7: floating point unavailable */ li r1,0x0c00 mtspr IVOR8,r1 /* 8: System call */ /* 9: Auxiliary processor unavailable(unsupported) */ li r1,0x1000 mtspr IVOR10,r1 /* 10: Decrementer */ li r1,0x1400 mtspr IVOR13,r1 /* 13: Data TLB error */ li r1,0x1300 mtspr IVOR14,r1 /* 14: Instruction TLB error */ li r1,0x2000 mtspr IVOR15,r1 /* 15: Debug */
What should I do to be able to debug this part?