Dear Marek, In message <03720507-5ea4-0fb9-0549-37df3128b...@denx.de> you wrote: > > The IMX thing is odd indeed and raises a bigger question -- what is the > "right" amount of stack to reserve ?
In the original U-Boot design (which is still documented in the README, see section "Memory Management", start reading at "typical memory configuration") The stack was located below the lowest reserved address range, so it could grow downward, only limited by available memory size. And yes, it was the responsibility of the user to make sure not to overwrite it for example by loading images at too high addresses or running "mw" with unsuitable address or size. What I want to point out is: there are probably a number of areas in U-Boot which are based on this assumption, as reserving buffers or the like on the stack is a much cheaper operation with much less potential for memory leaks etc. than using malloc(). Any assumption that a stack size of 4 kB or 16 kB or such will be sufficient is ... optimistic at best. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de On the subject of C program indentation: "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." - Blair P. Houghton