* [PATCH] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap.
@ 2007-04-26 17:19 Scott Wood
2007-04-27 14:22 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Scott Wood @ 2007-04-26 17:19 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
The uppermost part of memory is where u-boot puts the stack, so don't
include that in the heap. It's not currently causing problems, as the
current code allocates from the bottom of the heap, but this will keep
things from potentially breaking if a future implementation were to
allocate from the top.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/boot/cuboot-83xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c
index 8f11d1e..6cbc20a 100644
--- a/arch/powerpc/boot/cuboot-83xx.c
+++ b/arch/powerpc/boot/cuboot-83xx.c
@@ -61,7 +61,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
loader_info.cmdline = (char *)r6;
loader_info.cmdline_len = r7 - r6;
- simple_alloc_init(_end, avail_ram, 32, 64);
+ simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
serial_console_init();
platform_ops.fixups = platform_fixups;
--
1.5.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap.
2007-04-26 17:19 [PATCH] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap Scott Wood
@ 2007-04-27 14:22 ` Kumar Gala
2007-04-27 16:38 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2007-04-27 14:22 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, paulus
On Apr 26, 2007, at 12:19 PM, Scott Wood wrote:
> The uppermost part of memory is where u-boot puts the stack, so don't
> include that in the heap. It's not currently causing problems, as the
> current code allocates from the bottom of the heap, but this will keep
> things from potentially breaking if a future implementation were to
> allocate from the top.
Why does it matter where u-boot puts it stack? Once control is
handed over I'd expect it not to matter.
- k
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/boot/cuboot-83xx.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/
> cuboot-83xx.c
> index 8f11d1e..6cbc20a 100644
> --- a/arch/powerpc/boot/cuboot-83xx.c
> +++ b/arch/powerpc/boot/cuboot-83xx.c
> @@ -61,7 +61,7 @@ void platform_init(unsigned long r3, unsigned
> long r4, unsigned long r5,
> loader_info.cmdline = (char *)r6;
> loader_info.cmdline_len = r7 - r6;
>
> - simple_alloc_init(_end, avail_ram, 32, 64);
> + simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
> ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
> serial_console_init();
> platform_ops.fixups = platform_fixups;
> --
> 1.5.0.3
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap.
2007-04-27 14:22 ` Kumar Gala
@ 2007-04-27 16:38 ` Scott Wood
0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2007-04-27 16:38 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
Kumar Gala wrote:
>
> On Apr 26, 2007, at 12:19 PM, Scott Wood wrote:
>
>> The uppermost part of memory is where u-boot puts the stack, so don't
>> include that in the heap. It's not currently causing problems, as the
>> current code allocates from the bottom of the heap, but this will keep
>> things from potentially breaking if a future implementation were to
>> allocate from the top.
>
>
> Why does it matter where u-boot puts it stack? Once control is handed
> over I'd expect it not to matter.
The bootwrapper uses the stack provided by u-boot (unless the platform
requests otherwise).
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-27 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 17:19 [PATCH] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap Scott Wood
2007-04-27 14:22 ` Kumar Gala
2007-04-27 16:38 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).