I modified the current u-boot code to store r2 in rpi.c board_init, but only 
get a zero value from the register.

It could be one of three issues:
1. My use of the c asm statementĀ  to store r2 is wrong (I've never done this 
before), assembler yes, c assembler no.
2. The compiler has consumed the value of r2 before getting to board_init
3. The pi firmware does not put the fdt value in r2.

asm statement to store r2 is asm("mov %%r2, %0" : "=r" (gd->bd->bpi_boot_parms) 
); 

In order to use up Marco's ATAG and FDT code.

What the earliest place where I can store the input r2 value?
Hopefully, I'm putting the r2 value into gd->bd->bpi_boot_parms in board_init, 
but it appear it is zero at that point.

Should I restrict the compiler's use of r2? (I'm reluctant to limit the 
compiler in that manner)?

Suggestion would be welcome.

ThanksĀ Duncan Hare

714 931 7952

   

   

   
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to