* [U-Boot-Users] Stack Size for MPC8xx???
@ 2003-10-18 13:24 Steven Scholz
2003-10-18 20:43 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Steven Scholz @ 2003-10-18 13:24 UTC (permalink / raw)
To: u-boot
Hi there,
does someone know how big the stack is for an MPC8xx based boards?
I had this problem:
I started porting U-Boot to my new AT91RM9200 based board. After doing the flash
code I tried "saveenv". Simple reading, writing and erasing was working. But the
board crashed when doing "saveenv".
I found these lines in common/env_flash.c:
int saveenv(void)
{
...
#if defined(CFG_ENV_SECT_SIZE) && (CFG_ENV_SECT_SIZE > CFG_ENV_SIZE)
ulong flash_offset;
uchar env_buffer[CFG_ENV_SECT_SIZE];
#else
...
/* copy old contents to temporary buffer */
memcpy (env_buffer, (void *)flash_sect_addr, CFG_ENV_SECT_SIZE);
I have CFG_ENV_SECT_SIZE = 64K and CFG_ENV_SIZE=4K and realized that my stack
was far to small to save an 64KB flash sector.
The funny thing is that I never worried about that issue. And it never seems to
be a problem on our MPC8xx based boards...
Thanks.
--
Steven Scholz
imc Measurement & Control imc Me?systeme GmbH
Voltastr. 5 Voltastr. 5
13355 Berlin 13355 Berlin
Germany Deutschland
fon: +49 30 467090-0 Tel: 030 / 467090-0
fax: +49 30 4631576 fax: 030 / 4631576
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] Stack Size for MPC8xx???
2003-10-18 13:24 [U-Boot-Users] Stack Size for MPC8xx??? Steven Scholz
@ 2003-10-18 20:43 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2003-10-18 20:43 UTC (permalink / raw)
To: u-boot
Dear Steven,
in message <3F913F10.2010706@imc-berlin.de> you wrote:
>
> does someone know how big the stack is for an MPC8xx based boards?
This is board-dependend - how much RAM do you have?
On MPC8xx the stack grows downward, so it can become as big as
necessary as long as it does not colide with the exception vector
table or any data you put into RAM.
> I had this problem:
>
> I started porting U-Boot to my new AT91RM9200 based board. After doing the flash
...
> I have CFG_ENV_SECT_SIZE = 64K and CFG_ENV_SIZE=4K and realized that
> my stack
> was far to small to save an 64KB flash sector.
This is one of the consequences of the broken design we inherited
from ARMBoot.
> The funny thing is that I never worried about that issue. And it never se
> ems to
> be a problem on our MPC8xx based boards...
That's because PPC uses a different memory layout (as documented in
the README).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
There is a time in the tides of men, Which, taken at its flood, leads
on to success. On the other hand, don't count on it. - T. K. Lawson
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-18 20:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-18 13:24 [U-Boot-Users] Stack Size for MPC8xx??? Steven Scholz
2003-10-18 20:43 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.