U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] imx95_evk: Initialize the ELE RNG context
@ 2025-11-13  8:21 alice.guo
  2025-11-28  9:08 ` 回复: " Alice Guo (OSS)
  2025-11-29 21:22 ` Fabio Estevam
  0 siblings, 2 replies; 6+ messages in thread
From: alice.guo @ 2025-11-13  8:21 UTC (permalink / raw)
  To: u-boot, uboot-imx, sbabic, festevam, trini
  Cc: ye.li, peng.fan, ji.luo, alice.guo

From: Ji Luo <ji.luo@nxp.com>

OP-TEE requires a trusted RNG. This is provided by ELE on i.MX95. Start
the initialization of the ELE RNG context before OP-TEE startup to allow
OP-TEE to derive RNG later.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
 board/freescale/imx95_evk/spl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/board/freescale/imx95_evk/spl.c b/board/freescale/imx95_evk/spl.c
index 3d64097b4c7..48b47d2aed9 100644
--- a/board/freescale/imx95_evk/spl.c
+++ b/board/freescale/imx95_evk/spl.c
@@ -7,6 +7,7 @@
 #include <asm/arch/mu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/sections.h>
 #include <hang.h>
 #include <init.h>
@@ -32,7 +33,13 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 
 void spl_board_init(void)
 {
+	int ret;
+
 	puts("Normal Boot\n");
+
+	ret = ele_start_rng();
+	if (ret)
+		printf("Fail to start RNG: %d\n", ret);
 }
 
 void board_init_f(ulong dummy)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* 回复: [PATCH v1] imx95_evk: Initialize the ELE RNG context
  2025-11-13  8:21 [PATCH v1] imx95_evk: Initialize the ELE RNG context alice.guo
@ 2025-11-28  9:08 ` Alice Guo (OSS)
  2025-11-28 11:00   ` Fabio Estevam
  2025-11-29 21:22 ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Alice Guo (OSS) @ 2025-11-28  9:08 UTC (permalink / raw)
  To: Alice Guo (OSS), u-boot@lists.denx.de, dl-uboot-imx,
	sbabic@nabladev.com, festevam@gmail.com, trini@konsulko.com
  Cc: Ye Li, Peng Fan, Ji Luo, Alice Guo

> -----邮件原件-----
> 发件人: U-Boot <u-boot-bounces@lists.denx.de> 代表
> alice.guo@oss.nxp.com
> 发送时间: 2025年11月13日 16:22
> 收件人: u-boot@lists.denx.de; dl-uboot-imx <uboot-imx@nxp.com>;
> sbabic@nabladev.com; festevam@gmail.com; trini@konsulko.com
> 抄送: Ye Li <ye.li@nxp.com>; Peng Fan <peng.fan@nxp.com>; Ji Luo
> <ji.luo@nxp.com>; Alice Guo <alice.guo@nxp.com>
> 主题: [PATCH v1] imx95_evk: Initialize the ELE RNG context
> 
> From: Ji Luo <ji.luo@nxp.com>
> 
> OP-TEE requires a trusted RNG. This is provided by ELE on i.MX95. Start the
> initialization of the ELE RNG context before OP-TEE startup to allow OP-TEE to
> derive RNG later.
> 
> Signed-off-by: Ji Luo <ji.luo@nxp.com>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
> ---
>  board/freescale/imx95_evk/spl.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/board/freescale/imx95_evk/spl.c b/board/freescale/imx95_evk/spl.c
> index 3d64097b4c7..48b47d2aed9 100644
> --- a/board/freescale/imx95_evk/spl.c
> +++ b/board/freescale/imx95_evk/spl.c
> @@ -7,6 +7,7 @@
>  #include <asm/arch/mu.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/mach-imx/boot_mode.h>
> +#include <asm/mach-imx/ele_api.h>
>  #include <asm/sections.h>
>  #include <hang.h>
>  #include <init.h>
> @@ -32,7 +33,13 @@ int spl_board_boot_device(enum boot_device
> boot_dev_spl)
> 
>  void spl_board_init(void)
>  {
> +	int ret;
> +
>  	puts("Normal Boot\n");
> +
> +	ret = ele_start_rng();
> +	if (ret)
> +		printf("Fail to start RNG: %d\n", ret);
>  }
> 
>  void board_init_f(ulong dummy)
> --
> 2.43.0

Gentle ping: Any comments on this patch?

Best regards,
Alice Guo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] imx95_evk: Initialize the ELE RNG context
  2025-11-28  9:08 ` 回复: " Alice Guo (OSS)
@ 2025-11-28 11:00   ` Fabio Estevam
  2025-11-28 11:42     ` Francesco Dolcini
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2025-11-28 11:00 UTC (permalink / raw)
  To: Alice Guo (OSS)
  Cc: u-boot@lists.denx.de, dl-uboot-imx, sbabic@nabladev.com,
	trini@konsulko.com, Ye Li, Peng Fan, Ji Luo, Alice Guo

Hi Alice,

On Fri, Nov 28, 2025 at 6:08 AM Alice Guo (OSS) <alice.guo@oss.nxp.com> wrote:

> Gentle ping: Any comments on this patch?

It looks good to me.

I plan to queue it for u-boot-imx/next soon.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] imx95_evk: Initialize the ELE RNG context
  2025-11-28 11:00   ` Fabio Estevam
@ 2025-11-28 11:42     ` Francesco Dolcini
  2025-11-28 16:27       ` Ye Li
  0 siblings, 1 reply; 6+ messages in thread
From: Francesco Dolcini @ 2025-11-28 11:42 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Alice Guo (OSS), u-boot@lists.denx.de, dl-uboot-imx,
	sbabic@nabladev.com, trini@konsulko.com, Ye Li, Peng Fan, Ji Luo,
	Alice Guo

On Fri, Nov 28, 2025 at 08:00:16AM -0300, Fabio Estevam wrote:
> Hi Alice,
> 
> On Fri, Nov 28, 2025 at 6:08 AM Alice Guo (OSS) <alice.guo@oss.nxp.com> wrote:
> 
> > Gentle ping: Any comments on this patch?
> 
> It looks good to me.
> 
> I plan to queue it for u-boot-imx/next soon.

Fabio, Alice,

Is this something that should be more generic? I assume every i.MX95
board should have the same.

I was looking at this and thinking that we should do the same on our
SMARC i.MX95 board, but at the same time having this code duplicated in
all the different board files does not seem that a good idea.

Francesco



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] imx95_evk: Initialize the ELE RNG context
  2025-11-28 11:42     ` Francesco Dolcini
@ 2025-11-28 16:27       ` Ye Li
  0 siblings, 0 replies; 6+ messages in thread
From: Ye Li @ 2025-11-28 16:27 UTC (permalink / raw)
  To: Francesco Dolcini, Fabio Estevam
  Cc: Alice Guo (OSS), u-boot@lists.denx.de, dl-uboot-imx,
	sbabic@nabladev.com, trini@konsulko.com, Ye Li, Peng Fan, Ji Luo,
	Alice Guo


On 11/28/2025 7:42 PM, Francesco Dolcini wrote:
> On Fri, Nov 28, 2025 at 08:00:16AM -0300, Fabio Estevam wrote:
>> Hi Alice,
>>
>> On Fri, Nov 28, 2025 at 6:08 AM Alice Guo (OSS) <alice.guo@oss.nxp.com> wrote:
>>
>>> Gentle ping: Any comments on this patch?
>>
>> It looks good to me.
>>
>> I plan to queue it for u-boot-imx/next soon.
> 
> Fabio, Alice,
> 
> Is this something that should be more generic? I assume every i.MX95
> board should have the same.
> 
> I was looking at this and thinking that we should do the same on our
> SMARC i.MX95 board, but at the same time having this code duplicated in
> all the different board files does not seem that a good idea.
> 
> Francesco
> 
> 
Hi Francesco,

start rng depends on use case like when and which SW component to use 
rng. It could be placed in OEI, SM, M7 image, not must in A55 SPL.

Best regards,
Ye Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] imx95_evk: Initialize the ELE RNG context
  2025-11-13  8:21 [PATCH v1] imx95_evk: Initialize the ELE RNG context alice.guo
  2025-11-28  9:08 ` 回复: " Alice Guo (OSS)
@ 2025-11-29 21:22 ` Fabio Estevam
  1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2025-11-29 21:22 UTC (permalink / raw)
  To: alice.guo
  Cc: u-boot, uboot-imx, sbabic, trini, ye.li, peng.fan, ji.luo,
	alice.guo

On Thu, Nov 13, 2025 at 5:22 AM <alice.guo@oss.nxp.com> wrote:
>
> From: Ji Luo <ji.luo@nxp.com>
>
> OP-TEE requires a trusted RNG. This is provided by ELE on i.MX95. Start
> the initialization of the ELE RNG context before OP-TEE startup to allow
> OP-TEE to derive RNG later.
>
> Signed-off-by: Ji Luo <ji.luo@nxp.com>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>

Applied to u-boot-imx/next, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-29 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13  8:21 [PATCH v1] imx95_evk: Initialize the ELE RNG context alice.guo
2025-11-28  9:08 ` 回复: " Alice Guo (OSS)
2025-11-28 11:00   ` Fabio Estevam
2025-11-28 11:42     ` Francesco Dolcini
2025-11-28 16:27       ` Ye Li
2025-11-29 21:22 ` Fabio Estevam

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