[U-Boot-Users] sdram byte ordinary erron after relocation

flab zsuly at hotmail.com
Wed Nov 17 17:00:06 CET 2004


Hello everyone,
I am porting U-Boot to my ppc850 board, and my program crashes after
relocation to ram.
I used an SDRAM driver which works normally in VxWorks. But when I call the
relocate_code() funtion, there is an error of byte ordinary. If I write a
number to memory, the higher 16 bits exchange position with lower 16 bits.
For an example, if I write 0x2705,1956 to sdram, then I get 0x1956,2705 when
I read the memory address. But I can read or write flash correctly.

I read chapter 13.2.3 of the guild file. There is an argument related to my
problem.
>Argument:
>But my board ran fine with bootloader XYZ and/or operating system ABC.

>Answer:
>Double-check your configuration that you claim runs properly...

>Are you sure the SDRAM is initialized using the same init sequence and
values?
>Are you sure the memory controlling registers are set the same?
>Are you sure your other configuration uses caches and/or DMA? If it
doesn't, it isn't a valid comparison.

I checked these issues, and I am sure that the init sequence and memory
controlling registers are as same as the VxWorks'. But also, BDI2000 can
read or write memory exactly with same init sequence. The only difference is
my VxWorks system didn't use DMA function.

At first, I am doubltful of wrong endian mode. Then I checked correlated
register. MSR register is 0x1002 and DC_CST register is 0. I think it should
be right.
This problem puzzled me so much, and any clue given to me will be
apreciated!

Best regards,
Kenny Lew




More information about the U-Boot mailing list