[U-Boot-Users] ppc405gp cpu problems

Tadas tpt at pupa.da.ru
Sun Sep 12 04:09:18 CEST 2004


Hello,
I still have lots of problems with my board.
ppc405gp board. 8mb ram, 1mb flash, 1 pci , ethernet.
Mostly with linux, but  also with bootloader.


first problem with bootloader:
(this is default code for all ppc405 boards )
----------------------------------
_start:
addi r4,r0,0x0000  // second command executed after reset
mtspr sgr,r4
mtspr dcwr,r4
mtesr r4 /* clear Exception Syndrome Reg */
mttcr r4 /* clear Timer Control Reg */
mtxer r4 /* clear Fixed-Point Exception Reg */
mtevpr r4 /* clear Exception Vector Prefix Reg */
addi r4,r0,0x1000 /* set ME bit (Machine Exceptions) */
oris r4,r4,0x0002 /* set CE bit (Critical Exceptions) */

// mtmsr r4 /* change MSR */  this command creates exception 0x200
                    (machine check exception)  so I need to comment it out,
                    anyway it still works without it.

addi r4,r0,(0xFFFF-0x10000) /* set r4 to 0xFFFFFFFF (status in the */
/* dbsr is cleared by setting bits to 1) */
mtdbsr r4 /* clear/reset the dbsr */
........---------------------------------------
how that can happen?
Seems everybody else is executing this code without problems

***

Another problem is with MMU on linux.
cpu crashes almost immediately at start.
when linux atempts to initialize MMU

.text:C0000018 turn_on_mmu:
.text:C0000018                 lis     r0, 2 # 0x21232
.text:C000001C                 ori     r0, r0, 0x1232 # 0x21232
.text:C0000020                 mtsrr1  r0
.text:C0000024                 lis     r0, (start_here >> 16) # 0xC0002250
.text:C0000028                 ori     r0, r0, (start_here & 0xFFFF)
.text:C000002C                 mtsrr0  r0
.text:C0000030                 rfi

then it should jump to start_here function

text:C0002250 start_here:
.text:C0002250                 lis     rtoc, (init_task >> 16) # 0xC00D7150
.text:000000200 .......
and and here it crashes, "Machine check exception" hapens.
looks like mmu is initialized incorectly, or it attempts to execute from
nonexsisting  memory,
I can view that virtual memory until first command execution, and then it
disaperars. seems cpu goes into r

I cant understand this, seems no board dependent code is even executed,
averything happerns very early in first attempt to initilaize MMU
(but if mmu is initialized from exeption handler code it works.)
everybody else is also runnig that code without problems,
because it is same on all linux kernels.
I have tested 2 boards and all behave in same way.
What can cause such behavior? Or these cpu have some defect?






More information about the U-Boot mailing list