mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/7] ARM: add early malloc support needed by the decompressor
Date: Sun, 22 Jul 2012 16:02:46 +0200	[thread overview]
Message-ID: <1342965768-3796-5-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1342965768-3796-1-git-send-email-plagnioj@jcrosoft.com>

This is not needed by lzo but by gunzip, xz and others.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/cpu/start.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 18c5c83..8ab6fdc 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -28,6 +28,9 @@
 #include <asm-generic/memory_layout.h>
 #include <asm/sections.h>
 
+unsigned long free_mem_ptr;
+unsigned long free_mem_end_ptr;
+
 #ifdef CONFIG_IMAGE_COMPRESSION
 void __naked __section(.text_head_entry) compressed_start(void)
 {
@@ -158,6 +161,10 @@ void __naked __section(.text_ll_return) board_init_lowlevel_return(void)
 	/* clear bss */
 	memset(__bss_start, 0, __bss_stop - __bss_start);
 
+	/* set 128 KiB before the STACK_BASE - 16 address for early malloc */
+	free_mem_ptr = STACK_BASE - 0x20000 - 16;
+	free_mem_end_ptr = STACK_BASE - 16;
+
 	/* flush I-cache before jumping to the copied binary */
 	__asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0" : : "r" (0));
 
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-07-22 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-22 13:03 [PATCH 0/7] compressed image update Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02 ` [PATCH 1/7] stddev: make it selectable via Kconfig Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02   ` [PATCH 2/7] decompress_unlzo: define decompress_unlzo as decompress Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02   ` [PATCH 3/7] compressed image: factorise compressor type Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02   ` [PATCH 4/7] decompressor: import malloc/free implementation for linux 3.4 Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-07-22 14:02   ` [PATCH 6/7] compressed: allow to link only what is needed Jean-Christophe PLAGNIOL-VILLARD
2012-07-22 14:02   ` [PATCH 7/7] compressed image: add gzip support Jean-Christophe PLAGNIOL-VILLARD
2012-07-23  4:20 [PATCH 0/7 V2] compressed image update Jean-Christophe PLAGNIOL-VILLARD
2012-07-23  4:25 ` [PATCH 1/7] stddev: make it selectable via Kconfig Jean-Christophe PLAGNIOL-VILLARD
2012-07-23  4:26   ` [PATCH 5/7] ARM: add early malloc support needed by the decompressor Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342965768-3796-5-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox