
Dear Michal,
In message 4D106994.10307@monstr.eu you wrote:
Maybe will be worth to take a look at monitor,malloc area and stack.
Microblaze uses: end of ram bd 0x40 gd 0x40 monitor area malloc area stack (grows down)
Is it OK to use this scheme?
Sure. You can basicly define this as you like; the general idea is described in the README; normally we will reserve (dynamically, i. e. as needed) space for PRAM, shared log buffer and/or video frame buffer at the upper end of memory, so I would locate bd and gd and the rest below that - but you don;t support these features so far for microblaze, then above is fine.
I just would use sizeof() instead of fixed sizes (which tend to be wrong sometimes ;-)
I can easily fix this to previous state but will be good to synchronize this across archs.
If you are looking for a reference, use arch/powerpc/lib/board.c, starting here:
394 /* 395 * Now that we have DRAM mapped and working, we can 396 * relocate the code and continue running from DRAM. 397 * 398 * Reserve memory at end of RAM for (top down in that order): 399 * - area that won't get touched by U-Boot and Linux (optional) 400 * - kernel log buffer 401 * - protected RAM 402 * - LCD framebuffer 403 * - monitor code 404 * - board info struct 405 */
Best regards,
Wolfgang Denk