From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 10/12] ARM: add early malloc support needed by the decompressor
Date: Mon, 30 Jul 2012 11:30:09 +0200 [thread overview]
Message-ID: <20120730093009.GC19759@game.jcrosoft.org> (raw)
In-Reply-To: <20120730092044.GP30009@pengutronix.de>
On 11:20 Mon 30 Jul , Sascha Hauer wrote:
> On Mon, Jul 30, 2012 at 11:04:43AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > > > > /* 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;
> > > > > > > > +
> > > > > > >
> > > > > > > This assumes that the malloc area is directly before the stack. How
> > > > > > > about using __bss_stop or _end instead?
> > > > > >
> > > > > > it's just for early alloc and __bss_stop no so maybe we can use the same as
> > > > > > Malloc but we already use this for HEAD_TEXT_BASE
> > > > >
> > > > > _end is HEAD_TEXT_BASE + the space needed for the compressed
> > > > > image, so what's wrong with it?
> > > > the pbl image can be stored in a sram and link to fit there so _end could be
> > > > at the end of the sram
> > > >
> > > > so we can not use it.
> > > >
> > > > We need to put the early malloc in the sdram
> > >
> > > HEAD_TEXT_BASE is in sdram, because it's the same as MALLOC_BASE, so
> > > _end by definition also is in sdram.
> > yes but pbl fill the sram fully so in my case I put HEAD_TEXT_BASE is sram not
> > sdram so no space for the MALLOC and MALLOC_BASE is in sdram
>
> Ok, then the assumption that HEAD_TEXT_BASE is always in sdram is wrong.
> We can live with this until you add your at91 support. Nevertheless
> MALLOC_BASE always is in sdram, so I suggest to use the last 128k of the
> malloc space for early malloc:
>
> free_mem_ptr = MALLOC_BASE + MALLOC_SIZE - SZ_128K
ok fine by me
I resend the full patch series
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-07-30 9:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 18:31 [PATCH 00/12] Add Pre-Bootloader support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:32 ` [PATCH 01/12] kbuild: Init all relevant variables used in kbuild files so Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 02/12] kbuild: add pre-bootloader (pbl) target Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 03/12] Add pre-bootloader (pbl) image support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 04/12] pbl: discard unwind symbol if enable in barebox Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 05/12] Add compressed image support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 06/12] only compress default env in uncompressed images Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 07/12] ARM: Separate assembler functions into their own section Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 7:50 ` Sascha Hauer
2012-07-30 8:27 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 08/12] decompress_unlzo: define decompress_unlzo as decompress Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 7:56 ` Sascha Hauer
2012-07-30 8:06 ` Sascha Hauer
2012-07-27 18:33 ` [PATCH 09/12] decompressor: import malloc/free implementation for linux 3.4 Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 10/12] ARM: add early malloc support needed by the decompressor Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 8:02 ` Sascha Hauer
2012-07-30 8:19 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 8:30 ` Sascha Hauer
2012-07-30 8:49 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 8:59 ` Sascha Hauer
2012-07-30 9:04 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 9:20 ` Sascha Hauer
2012-07-30 9:30 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-07-27 18:33 ` [PATCH 11/12] compressed image: add gzip support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 12/12] at91: add lowlevel init to the pbl 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=20120730093009.GC19759@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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