mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>,
	barebox@lists.infradead.org
Subject: Re: [PATCH] arch: arm: imx: esdctl: limit ram to 1GB on imx93 in case OPTEE is enabled
Date: Thu, 1 May 2025 00:16:07 +0200	[thread overview]
Message-ID: <8332c117-709f-48be-ac9a-53efd5299c92@pengutronix.de> (raw)
In-Reply-To: <20250430-imx9optee-v1-1-3fcb0facfed8@pengutronix.de>

Hello Michael,

On 4/30/25 23:27, Michael Grzeschik wrote:
> In MX93 the ELE (Edge Lock Enclave) is limited to communicate with
> messages addressed under 1.5GB. The ELE can not reach the memory between
> (0xE0000000-0xFFFFFFFF).
> 
> So we limit the usable memory in case OPTEE is used.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
>  arch/arm/mach-imx/esdctl.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
> index 701ca0ac1f3..79f697d6288 100644
> --- a/arch/arm/mach-imx/esdctl.c
> +++ b/arch/arm/mach-imx/esdctl.c
> @@ -589,6 +589,15 @@ resource_size_t imx9_ddrc_sdram_size(void)
>  		mem += memory_sdram_size(cols, rows, banks, width);
>  	}
>  
> +	/* In MX93 the ELE is limited to comunicate with messages
> +	 * under 1.5GB address space. This limits the overal memory
> +	 * to be 1GB in case OPTEE is used.
> +	 */
> +	if (IS_ENABLED(CONFIG_PBL_OPTEE)) {
> +		if (mem > 0x40000000)
> +			mem = 0x40000000;
> +	}

Doesn't this affect the memory detected in barebox proper as well?
I think you want to add this to imx93_barebox_entry() only.

Cheers,
Ahmad

> +
>  	return mem;
>  }
>  
> 
> ---
> base-commit: 873b572763d38ab4100d218d0a3614f79b596077
> change-id: 20250430-imx9optee-31d2dfc926bf
> 
> Best regards,

-- 
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:[~2025-04-30 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 21:27 Michael Grzeschik
2025-04-30 22:16 ` Ahmad Fatoum [this message]

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=8332c117-709f-48be-ac9a-53efd5299c92@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.grzeschik@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