All of lore.kernel.org
 help / color / mirror / Atom feed
* imx7 issues with Secure and Non-Secure boot mode
@ 2024-03-07  9:26 Emanuele Ghidoli
  2024-03-18 16:11 ` Emanuele Ghidoli
  2024-03-18 22:23 ` Marek Vasut
  0 siblings, 2 replies; 3+ messages in thread
From: Emanuele Ghidoli @ 2024-03-07  9:26 UTC (permalink / raw)
  To: Bryan O'Donoghue, Breno Matheus Lima, Fabio Estevam, u-boot,
	Peng Fan
  Cc: Marek Vasut, Tobias Junghans, igor.opaniuk, Francesco Dolcini

Hello,

I'm currently facing issues with our board, Colibri-imx7,
regarding its behavior in different boot modes:

- Secure Mode (bootm_boot_mode=sec in U-Boot):
  When running Linux in secure mode, the idle time management does not function
  properly. The following error message is displayed during boot: 
  "CPUidle arm: CPU 0 failed to init idle CPU ops".

- Non-Secure Mode (bootm_boot_mode=nonsec in U-Boot):
  In non-secure mode, the caam_jr fails to initialize correctly,
  preventing the utilization of the hardware random number generation. 
  The error message shown during boot is: 
  "caam_jr 30901000.jr: failed to flush job ring before reset".

I have conducted tests using both mainline and 6.1 stable versions,
with consistent results.

I have also reviewed the following threads for potential solutions:

 - https://lore.kernel.org/u-boot/2536787.mZni4QDSI2@crypto/
 - https://lore.kernel.org/u-boot/CAByghJZn8d91uFr5JXSR=jXcfU4engZP_=buOk7MNNjaVeigLA@mail.gmail.com/
 - https://lore.kernel.org/all/20220608170223.1536594-1-festevam@denx.de/T/

The first thread leave me thinking the only solution is to use OPTEE,
but the last email is without any answer.
So, I am considering the utilization of OPTEE, as it seems it might address 
the issues discussed in the threads.
Could this configuration potentially resolve my current issues?

Your advice would be greatly appreciated.

Kind regards,

Emanuele Ghidoli

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

* Re: imx7 issues with Secure and Non-Secure boot mode
  2024-03-07  9:26 imx7 issues with Secure and Non-Secure boot mode Emanuele Ghidoli
@ 2024-03-18 16:11 ` Emanuele Ghidoli
  2024-03-18 22:23 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Emanuele Ghidoli @ 2024-03-18 16:11 UTC (permalink / raw)
  To: Fabio Estevam, u-boot, Breno Matheus Lima, Bryan O'Donoghue
  Cc: Marek Vasut, Tobias Junghans, igor.opaniuk, Francesco Dolcini, Peng Fan

On 07/03/2024 10:26, Emanuele Ghidoli wrote:
> Hello,
> 
> I'm currently facing issues with our board, Colibri-imx7,
> regarding its behavior in different boot modes:
> 
> - Secure Mode (bootm_boot_mode=sec in U-Boot):
>   When running Linux in secure mode, the idle time management does not function
>   properly. The following error message is displayed during boot: 
>   "CPUidle arm: CPU 0 failed to init idle CPU ops".
> 
> - Non-Secure Mode (bootm_boot_mode=nonsec in U-Boot):
>   In non-secure mode, the caam_jr fails to initialize correctly,
>   preventing the utilization of the hardware random number generation. 
>   The error message shown during boot is: 
>   "caam_jr 30901000.jr: failed to flush job ring before reset".
> 
> I have conducted tests using both mainline and 6.1 stable versions,
> with consistent results.
> 
> I have also reviewed the following threads for potential solutions:
> 
>  - https://lore.kernel.org/u-boot/2536787.mZni4QDSI2@crypto/
>  - https://lore.kernel.org/u-boot/CAByghJZn8d91uFr5JXSR=jXcfU4engZP_=buOk7MNNjaVeigLA@mail.gmail.com/
>  - https://lore.kernel.org/all/20220608170223.1536594-1-festevam@denx.de/T/
> 
> The first thread leave me thinking the only solution is to use OPTEE,
> but the last email is without any answer.
> So, I am considering the utilization of OPTEE, as it seems it might address 
> the issues discussed in the threads.
> Could this configuration potentially resolve my current issues?
> 
> Your advice would be greatly appreciated.
> 
> Kind regards,
> 
> Emanuele Ghidoli
Hello,
we are willing to use iMX7 without OP-TEE.

I saw that this patch was reverted, cause it is supposed that OPTEE is always used on iMX7:
22191ac35344 ("drivers/crypto/fsl: assign job-rings to non-TrustZone")

What do you think if I propose a slightly different version where 
I put the modifications conditionally under an U-Boot config?

Kind regards,
Emanuele

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

* Re: imx7 issues with Secure and Non-Secure boot mode
  2024-03-07  9:26 imx7 issues with Secure and Non-Secure boot mode Emanuele Ghidoli
  2024-03-18 16:11 ` Emanuele Ghidoli
@ 2024-03-18 22:23 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2024-03-18 22:23 UTC (permalink / raw)
  To: Emanuele Ghidoli, Bryan O'Donoghue, Breno Matheus Lima,
	Fabio Estevam, u-boot, Peng Fan
  Cc: Tobias Junghans, igor.opaniuk, Francesco Dolcini

On 3/7/24 10:26 AM, Emanuele Ghidoli wrote:
> Hello,
> 
> I'm currently facing issues with our board, Colibri-imx7,
> regarding its behavior in different boot modes:
> 
> - Secure Mode (bootm_boot_mode=sec in U-Boot):
>    When running Linux in secure mode, the idle time management does not function
>    properly. The following error message is displayed during boot:
>    "CPUidle arm: CPU 0 failed to init idle CPU ops".
> 
> - Non-Secure Mode (bootm_boot_mode=nonsec in U-Boot):
>    In non-secure mode, the caam_jr fails to initialize correctly,
>    preventing the utilization of the hardware random number generation.
>    The error message shown during boot is:
>    "caam_jr 30901000.jr: failed to flush job ring before reset".
> 
> I have conducted tests using both mainline and 6.1 stable versions,
> with consistent results.
> 
> I have also reviewed the following threads for potential solutions:
> 
>   - https://lore.kernel.org/u-boot/2536787.mZni4QDSI2@crypto/
>   - https://lore.kernel.org/u-boot/CAByghJZn8d91uFr5JXSR=jXcfU4engZP_=buOk7MNNjaVeigLA@mail.gmail.com/
>   - https://lore.kernel.org/all/20220608170223.1536594-1-festevam@denx.de/T/
> 
> The first thread leave me thinking the only solution is to use OPTEE,
> but the last email is without any answer.
> So, I am considering the utilization of OPTEE, as it seems it might address
> the issues discussed in the threads.
> Could this configuration potentially resolve my current issues?
> 
> Your advice would be greatly appreciated.

Have a look at U-Boot

1f908b1898bd ("ARM: imx8m: Deduplicate CAAM init with arch_misc_init() 
call")

Do you call this CAAM initialization on your machine ?

If not, try it, does it have any impact ?

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

end of thread, other threads:[~2024-03-18 22:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-07  9:26 imx7 issues with Secure and Non-Secure boot mode Emanuele Ghidoli
2024-03-18 16:11 ` Emanuele Ghidoli
2024-03-18 22:23 ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.