
Robert Schwebel robert@schwebel.de schreibt:
The boards I have ported use the memory layout which is documented in the README. Unfortunately, due to historical reasons the old ARMboot code uses another scheme and nobody had the time to fix this "the right way".
Hi Robert,
even the relatively new (added sometime after 0.4.0) ARM925T code uses the old scheme...
I fully agree, though, that the documented scheme is better (having the stack grow downwards towards the code can lead to interesting side- effects ;-)
It seems to be causing a certain amount of grief (and dirty workarounds, like e.g. in board/wepep250/wepep250.c lines 43..53) that cpu/pxa/start.S places stack (and heap) below the code instead of above.
My -ptx patches have a hack for this, but I agree with Wolfgang that somebody should fix it correctly instead of applying workarounds...
AFAICT, cpu/pxa/cpu.c just needs to set
_armboot_real_end = TEXT_BASE - CFG_MALLOC_LEN;
in cpu_init(), then no further "würgarounds" are needed for PXA boards.
After that, it's not too much work to fix the other ARMs, since the entire magic plays in cpu/.../
Or did I miss something?
Cheers Anders