mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/5] ARM: cpu: uncompress: increase early malloc pool to 256K
Date: Wed, 13 Jul 2022 12:09:21 +0200	[thread overview]
Message-ID: <20220713100922.1880282-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220713100922.1880282-1-a.fatoum@pengutronix.de>

struct ZSTD_DCtx_s, the zstd workspace, has a size of 161320 bytes, which
is more than our early malloc pool of 128K can allocate. Double the pool
size, so we can uncompress a zstd barebox proper in PBL.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/barebox-arm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 8240cce9bf5b..8795c89d515b 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -125,7 +125,7 @@ static inline unsigned long arm_mem_ttb(unsigned long membase,
 static inline unsigned long arm_mem_early_malloc(unsigned long membase,
 						 unsigned long endmem)
 {
-	return arm_mem_ttb(membase, endmem) - SZ_128K;
+	return arm_mem_ttb(membase, endmem) - SZ_256K;
 }
 
 static inline unsigned long arm_mem_early_malloc_end(unsigned long membase,
-- 
2.30.2




  parent reply	other threads:[~2022-07-13 10:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 10:09 [PATCH 0/5] lib: zstd: allow use in PBL and shell Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 1/5] lib: zstd: adopt Linux directory structure Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 2/5] lib: zstd: sync with Linux Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 3/5] decompressor: define macros for non-PBL case as well Ahmad Fatoum
2022-07-13 10:09 ` Ahmad Fatoum [this message]
2022-07-13 10:09 ` [PATCH 5/5] lib: uncompress: add general zstd support Ahmad Fatoum
2022-07-14  8:45   ` Sascha Hauer
2022-07-14  8:54     ` Ahmad Fatoum
2022-07-14  9:20       ` Sascha Hauer

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=20220713100922.1880282-5-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH 4/5] ARM: cpu: uncompress: increase early malloc pool to 256K' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox