mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 8/9] ARM: Rockchip: Use compressed OP-TEE binary
Date: Wed, 18 Mar 2026 09:10:04 +0100	[thread overview]
Message-ID: <abpd3Od9RpAaiF0q@pengutronix.de> (raw)
In-Reply-To: <20260316-compressed-firmware-v1-8-d9712142881e@pengutronix.de>

On Mon, Mar 16, 2026 at 06:21:21PM +0100, Sascha Hauer wrote:
> Rockchip images are often size constraint due to the ROM limiting the
> maximum image size to 2MiB, at least when redundant copies on SD/eMMC
> are desired. For this reason use the compressed variant of the OP-TEE
> image.
> 
> FIXME: Uncompress address currently hardcoded.

This comment is not true anymore. In the current patch I use the memory
directly behind the image aligned up to the next 1MiB boundary.

> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/mach-rockchip/atf.c | 26 ++++++++++++++++++++------
>  1 file changed, 20 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c
> index 0d26dfb740..2ba7f074ce 100644
> --- a/arch/arm/mach-rockchip/atf.c
> +++ b/arch/arm/mach-rockchip/atf.c
> @@ -8,6 +8,7 @@
>  #include <asm/atf_common.h>
>  #include <asm/barebox-arm.h>
>  #include <asm-generic/memory_layout.h>
> +#include <asm-generic/sections.h>
>  #include <mach/rockchip/dmc.h>
>  #include <mach/rockchip/rockchip.h>
>  #include <mach/rockchip/bootrom.h>
> @@ -29,7 +30,12 @@ static void rk_scratch_save_optee_hdr(const struct optee_header *hdr)
>  	rk_scratch->optee_hdr = *hdr;
>  }
>  
> -static unsigned long load_elf64_image_phdr(const void *elf)
> +static void *free_mem(void)
> +{
> +	return (void *)PTR_ALIGN(&__image_end, SZ_1M);
> +}
> +
> +static unsigned long load_elf64_image_phdr(struct fwobj *bl31)

This last line should be changed in the next patch, not this one.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2026-03-18  8:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 17:21 [PATCH 0/9] Firmware: support compressing firmware files Sascha Hauer
2026-03-16 17:21 ` [PATCH 1/9] ARM: socfpga: Drop unnecessary select USE_COMPRESSED_DTB Sascha Hauer
2026-03-16 17:21 ` [PATCH 2/9] ARM: radxa-rock5: Use compressed DTB Sascha Hauer
2026-03-16 17:21 ` [PATCH 3/9] ARM: Rockchip: Simplify retrieval of SoC specific addresses Sascha Hauer
2026-03-16 17:21 ` [PATCH 4/9] firmware: Move firmware assembly generation to scripts/gen-fw-s Sascha Hauer
2026-03-16 17:21 ` [PATCH 5/9] firmware: Use struct fwobj for get_builtin_firmware APIs Sascha Hauer
2026-03-16 17:21 ` [PATCH 6/9] firmware: Add compressed firmware symbols for PBL Sascha Hauer
2026-03-19 14:19   ` [PATCH] fixup! " Sascha Hauer
2026-03-20  8:54   ` Sascha Hauer
2026-03-16 17:21 ` [PATCH 7/9] firmware: Add fwobj_uncompress() for decompressing firmware in PBL Sascha Hauer
2026-03-16 17:21 ` [PATCH 8/9] ARM: Rockchip: Use compressed OP-TEE binary Sascha Hauer
2026-03-18  8:10   ` Sascha Hauer [this message]
2026-03-16 17:21 ` [PATCH 9/9] ARM: Rockchip: Use compressed TF-A binary Sascha Hauer
2026-03-19  6:53 ` [PATCH 0/9] Firmware: support compressing firmware files 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=abpd3Od9RpAaiF0q@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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