Skip to contentSkip to conversation

optee-os: Enable OP-TEE TRNG in AM62X

PATCH Superseded Kamlesh Gurudasani 4 participants 5 messages Nov 6, 2023 – Nov 7, 2023

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 optee-os: Enable OP-TEE TRNG in AM62X

Enable TRNG in AM62X, as bugs related to TRNG has been fixed now.

---
 meta-ti-bsp/recipes-security/optee/optee-os-ti.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +1 -1
index 91b66a36..d1c15cb2 100644
@@ -6,7 +6,7 @@ inherit ti-secdev
 
 EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
 
-EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
+EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1"
 EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
 EXTRA_OEMAKE:append:am62axx = " CFG_TEE_CORE_LOG_LEVEL=1"
 

---
base-commit: d5e768e29b3f8091cbdedb702ff4185f73af4f3d
change-id: 20231106-enable-trng-e56f79d668e8

Best regards,

Signature · 1 line
Kamlesh Gurudasani <[email protected]>
#1 lore raw
Quoted 1 line · Kamlesh Gurudasani

Enable TRNG in AM62X, as bugs related to TRNG has been fixed now.

Can you provide more details on what fixed TRNG ? Assuming its something specific inside OPTEE 4.0 version.

Quoted 11 lines
---
  meta-ti-bsp/recipes-security/optee/optee-os-ti.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +0 -0
index 91b66a36..d1c15cb2 100644

meta-ti-bsp/recipes-security/optee/optee-os-ti.inc inherit ti-secdev · line 10

Quoted 6 lines
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +1 -1
@@ -6,7 +6,7 @@ inherit ti-secdev
 
  EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
 
-EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
+EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1"
  EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"

How about doing the same for am62p ?

Quoted 8 lines
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +0 -1
  EXTRA_OEMAKE:append:am62axx = " CFG_TEE_CORE_LOG_LEVEL=1"
 
 
---

base-commit: d5e768e29b3f8091cbdedb702ff4185f73af4f3d
change-id: 20231106-enable-trng-e56f79d668e8

Best regards,

#2 lore raw

"Bajjuri, Praneeth" <[email protected]> writes:

...

Quoted 10 lines
Quoted 10 lines
---
  meta-ti-bsp/recipes-security/optee/optee-os-ti.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +0 -0
index 91b66a36..d1c15cb2 100644
@@ -6,7 +6,7 @@ inherit ti-secdev
 
Quoted 7 lines

meta-ti-bsp/recipes-security/optee/optee-os-ti.inc inherit ti-secdev · line 10

Quoted 5 lines
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +1 -1
  EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
 
-EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
+EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1"
  EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"

How about doing the same for am62p ?

@vibhore, Considering instabilities with AM62a, let me know if I should enable it for AM62p. Will send v2 accordingly.

-Kamlesh

#3 lore raw

On 13:45-20231107, Kamlesh Gurudasani wrote:
Hi Kamlesh,

Quoted 15 lines

"Bajjuri, Praneeth" <[email protected]> writes:

...

Quoted 12 lines
Quoted 12 lines
---
  meta-ti-bsp/recipes-security/optee/optee-os-ti.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +0 -0
index 91b66a36..d1c15cb2 100644
@@ -6,7 +6,7 @@ inherit ti-secdev
 
  EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
 
Quoted 7 lines
Quoted 5 lines

meta-ti-bsp/recipes-security/optee/optee-os-ti.inc inherit ti-secdev · line 10

Quoted 3 lines
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +1 -1
-EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
+EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1"
  EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"

How about doing the same for am62p ?

@vibhore, Considering instabilities with AM62a, let me know if I should enable it for AM62p. Will send v2 accordingly.

As discussed offline, the instabilities we are seeing on AM62a are only after a Deep Sleep cycle. The system is stable unless LPM is tried. Also, AM62p does not have Deep Sleep support. So, I do not have any objections to having TRNG support enabled for AM62p.

Regards,
Vibhore

#4 lore raw
Quoted 25 lines · Vibhore Vardhan

On 13:45-20231107, Kamlesh Gurudasani wrote:
Hi Kamlesh,

Quoted 22 lines

"Bajjuri, Praneeth" <[email protected]> writes:

...

Quoted 10 lines
Quoted 10 lines
---
   meta-ti-bsp/recipes-security/optee/optee-os-ti.inc | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +0 -0
index 91b66a36..d1c15cb2 100644
@@ -6,7 +6,7 @@ inherit ti-secdev
 
Quoted 7 lines

meta-ti-bsp/recipes-security/optee/optee-os-ti.inc inherit ti-secdev · line 10

Quoted 5 lines
meta-ti-bsp/recipes-security/optee/optee-os-ti.inc +1 -1
   EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
 
-EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
+EXTRA_OEMAKE:append:am62xx = " CFG_TEE_CORE_LOG_LEVEL=1"
   EXTRA_OEMAKE:append:am62pxx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"

How about doing the same for am62p ?

@vibhore, Considering instabilities with AM62a, let me know if I should enable it for AM62p. Will send v2 accordingly.

When you send the V2 series, can you base the commit off of the kirkstone-wip branch. I have applied some changes to the file you are changing above (renamed it in this case) so your patch would not apply currently. Thanks.

Quoted 7 lines

As discussed offline, the instabilities we are seeing on AM62a are only after a Deep Sleep cycle. The system is stable unless LPM is tried. Also, AM62p does not have Deep Sleep support. So, I do not have any objections to having TRNG support enabled for AM62p.

Regards,
Vibhore

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS