[U-Boot] [RFC][PATCH v2 17/19] arm cp15: setup mmu and enable dcache

Ben Gardiner bengardiner at nanometrics.ca
Fri Aug 6 18:14:37 CEST 2010


Hi Wolfgang,

On Fri, Aug 6, 2010 at 11:46 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Ben Gardiner,
>
> In message <AANLkTi=Tcf1m7UMqs6iQj47E7PxndjkEX1BwU8RGyVyu at mail.gmail.com> you wrote:
>>
>> First, for the 'shared ram' region which is 128k at 0x80000000 I tried:
>> #define CONFIG_SYS_INIT_SP_ADDR (0x80000000 + 128*1024 -1)
>
> The "-1" is probably a bad idea, as your stack will point to an odd
> address then. Try and make this "-8" instead. Or "-16".

Good point. Thank you.

But I think that the value loaded to sp is still wrong because of the
restrictions on immediate arguments in ARM instructions.

with (0x80000000 + 128*1024 -16):
---
c1080078 <call_board_init_f>:
c1080078:       e59fd328        ldr     sp, [pc, #808]  ; c10803a8 <fiq+0x48>
c108007c:       e3a00000        mov     r0, #0  ; 0x0
c1080080:       eb00017f        bl      c1080684 <board_init_f>

and with (0x80000000 + 128*1024 -8):
---
c1080078 <call_board_init_f>:
c1080078:       e59fd328        ldr     sp, [pc, #808]  ; c10803a8 <fiq+0x48>
c108007c:       e3a00000        mov     r0, #0  ; 0x0
c1080080:       eb00017f        bl      c1080684 <board_init_f>

and neither image is bootable.

>> Then for the 'ARM local RAM' which is 8k at 0xffff0000 I tried:
>> #define CONFIG_SYS_INIT_SP_ADDR (0xffff0000 + 8*1024 -1)
>
> Again, try "-8" instead. Or "-16".

doing so here yields unusable images also and the values assigned to
sp seem to be the same as above.

with (0xffff0000 + 8*1024 - 16):
---
c1080078 <call_board_init_f>:
c1080078:       e59fd328        ldr     sp, [pc, #808]  ; c10803a8 <fiq+0x48>
c108007c:       e3a00000        mov     r0, #0  ; 0x0
c1080080:       eb00017f        bl      c1080684 <board_init_f>

and with (0xffff0000 + 8*1024 - 8):
----
c1080078 <call_board_init_f>:
c1080078:       e59fd328        ldr     sp, [pc, #808]  ; c10803a8 <fiq+0x48>
c108007c:       e3a00000        mov     r0, #0  ; 0x0
c1080080:       eb00017f        bl      c1080684 <board_init_f>


Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca


More information about the U-Boot mailing list