Skip to contentSkip to conversation

configs: am62*_evm_a53_defconfig: Enable OP-TEE fTPM support

PATCH In review Shiva Tripathi 3 participants 5 messages Feb 23 – Feb 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: am62*_evm_a53_defconfig: Enable OP-TEE fTPM support

Enable firmware TPM (fTPM) support for AM62x, AM62Ax, and AM62Px SoCs by adding OP-TEE and TPM configuration options to the A53 defconfigs.

The AM62 family SoCs do not include an integrated hardware TPM. This patch enables the Microsoft fTPM Trusted Application running in OP-TEE's secure world to provide TPM 2.0 functionality, with persistent storage backed by the eMMC RPMB partition.

This enables TPM 2.0 functionality in U-Boot and provides the foundation for measured boot and disk encryption use cases.

---
 configs/am62ax_evm_a53_defconfig | 9 +++++++++
 configs/am62px_evm_a53_defconfig | 9 +++++++++
 configs/am62x_evm_a53_defconfig  | 9 +++++++++
 3 files changed, 27 insertions(+)
configs/am62ax_evm_a53_defconfig +9 -0
index 167ba7ff8df..b14f19968a3 100644
@@ -99,5 +99,14 @@ CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
 #include <configs/am62x_a53_usbdfu.config>
configs/am62px_evm_a53_defconfig +9 -0
index aa241a73c3f..2cd572cd5c7 100644
@@ -148,6 +148,15 @@ CONFIG_SPL_USB_HOST=y
 CONFIG_SPL_USB_STORAGE=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_EFI_SET_TIME=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
 #include <configs/k3_efi_capsule.config>
 #include <configs/am62x_a53_usbdfu.config>
configs/am62x_evm_a53_defconfig +9 -0
index 281fa3fea15..3221a9b8f2b 100644
@@ -138,6 +138,15 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_EFI_SET_TIME=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
 #include <configs/k3_efi_capsule.config>
 #include <configs/am62x_a53_usbdfu.config>
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Shiva Tripathi

Enable firmware TPM (fTPM) support for AM62x, AM62Ax, and AM62Px SoCs by adding OP-TEE and TPM configuration options to the A53 defconfigs.

The AM62 family SoCs do not include an integrated hardware TPM. This

No K3 SoC integrates a full TPM, so why do this only for AM62? And why only the TI EVMs? *All* K3 SoCs and *all* boards based on them can make use of OP-TEE's fTPM, so why not move this to a common location in the Kconfig files. That way you don't need to add all this in every single defconfig.

For instance the CONFIG_CMD_* ones can be added to TI_COMMON_CMD_OPTIONS,

config TI_COMMON_CMD_OPTIONS
imply CMD_MMC_RPMB if SUPPORT_EMMC_RPMB
etc..

Andrew

Quoted 73 lines

patch enables the Microsoft fTPM Trusted Application running in OP-TEE's secure world to provide TPM 2.0 functionality, with persistent storage backed by the eMMC RPMB partition.

This enables TPM 2.0 functionality in U-Boot and provides the foundation for measured boot and disk encryption use cases.

---
  configs/am62ax_evm_a53_defconfig | 9 +++++++++
  configs/am62px_evm_a53_defconfig | 9 +++++++++
  configs/am62x_evm_a53_defconfig  | 9 +++++++++
  3 files changed, 27 insertions(+)
configs/am62ax_evm_a53_defconfig +9 -0
index 167ba7ff8df..b14f19968a3 100644
@@ -99,5 +99,14 @@ CONFIG_SYSRESET=y
  CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
  #include <configs/am62x_a53_usbdfu.config>
configs/am62px_evm_a53_defconfig +9 -0
index aa241a73c3f..2cd572cd5c7 100644
@@ -148,6 +148,15 @@ CONFIG_SPL_USB_HOST=y
  CONFIG_SPL_USB_STORAGE=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
  #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>
configs/am62x_evm_a53_defconfig +9 -0
index 281fa3fea15..3221a9b8f2b 100644
@@ -138,6 +138,15 @@ CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y
 
  #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>
#2 lore raw
Quoted 12 lines · Andrew Davis
Quoted 4 lines · Shiva Tripathi

Enable firmware TPM (fTPM) support for AM62x, AM62Ax, and AM62Px SoCs by adding OP-TEE and TPM configuration options to the A53 defconfigs.

The AM62 family SoCs do not include an integrated hardware TPM. This

No K3 SoC integrates a full TPM, so why do this only for AM62? And why only the TI EVMs? *All* K3 SoCs and *all* boards based on them can make use of OP-TEE's fTPM, so why not move this to a common location in the Kconfig files. That way you don't need to add all this in every single defconfig.

Quoted 7 lines

For instance the CONFIG_CMD_* ones can be added to TI_COMMON_CMD_OPTIONS,

config TI_COMMON_CMD_OPTIONS
    imply CMD_MMC_RPMB if SUPPORT_EMMC_RPMB
etc..

Andrew

Thanks for the review. Yes fTPM can be enabled for all K3 SoCs. I will send an updated version of the patch with suggested changes.

Regards,
Shiva

Quoted 75 lines
Quoted 74 lines

patch enables the Microsoft fTPM Trusted Application running in OP-TEE's secure world to provide TPM 2.0 functionality, with persistent storage backed by the eMMC RPMB partition.

This enables TPM 2.0 functionality in U-Boot and provides the foundation for measured boot and disk encryption use cases.

---
  configs/am62ax_evm_a53_defconfig | 9 +++++++++
  configs/am62px_evm_a53_defconfig | 9 +++++++++
  configs/am62x_evm_a53_defconfig  | 9 +++++++++

  3 files changed, 27 insertions(+)
configs/ renamed from configs/am62ax_evm_a53_defconfig +0 -0

am62ax_evm_a53_defconfig
index 167ba7ff8df..b14f19968a3 100644

configs/am62ax_evm_a53_defconfig +0 -0
@@ -99,5 +99,14 @@ CONFIG_SYSRESET=y

  CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384

configs/am62ax_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62px_evm_a53_defconfig +0 -0

am62px_evm_a53_defconfig
index aa241a73c3f..2cd572cd5c7 100644

configs/am62px_evm_a53_defconfig +0 -0
@@ -148,6 +148,15 @@ CONFIG_SPL_USB_HOST=y

  CONFIG_SPL_USB_STORAGE=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62px_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62x_evm_a53_defconfig +0 -0

am62x_evm_a53_defconfig
index 281fa3fea15..3221a9b8f2b 100644

configs/am62x_evm_a53_defconfig +0 -0
@@ -138,6 +138,15 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62x_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>

#3 lore raw
Quoted 17 lines · Shiva Tripathi
Quoted 14 lines · Andrew Davis
Quoted 4 lines · Shiva Tripathi

Enable firmware TPM (fTPM) support for AM62x, AM62Ax, and AM62Px SoCs by adding OP-TEE and TPM configuration options to the A53 defconfigs.

The AM62 family SoCs do not include an integrated hardware TPM. This

No K3 SoC integrates a full TPM, so why do this only for AM62? And why only the TI EVMs? *All* K3 SoCs and *all* boards based on them can make use of OP-TEE's fTPM, so why not move this to a common location in the Kconfig files. That way you don't need to add all this in every single defconfig.

For instance the CONFIG_CMD_* ones can be added to TI_COMMON_CMD_OPTIONS,

Quoted 8 lines
Quoted 5 lines

config TI_COMMON_CMD_OPTIONS
    imply CMD_MMC_RPMB if SUPPORT_EMMC_RPMB
etc..

Andrew

Thanks for the review. Yes fTPM can be enabled for all K3 SoCs. I will send an updated version of the patch with suggested changes.

AFAIK , for fTPM you need eMMC.
Please don't enable for board not having eMMC eg AM68.

Quoted 79 lines

Regards,
Shiva

Quoted 75 lines
Quoted 74 lines

patch enables the Microsoft fTPM Trusted Application running in OP-TEE's secure world to provide TPM 2.0 functionality, with persistent storage backed by the eMMC RPMB partition.

This enables TPM 2.0 functionality in U-Boot and provides the foundation for measured boot and disk encryption use cases.

---
  configs/am62ax_evm_a53_defconfig | 9 +++++++++
  configs/am62px_evm_a53_defconfig | 9 +++++++++
  configs/am62x_evm_a53_defconfig  | 9 +++++++++

  3 files changed, 27 insertions(+)
configs/ renamed from configs/am62ax_evm_a53_defconfig +0 -0

am62ax_evm_a53_defconfig
index 167ba7ff8df..b14f19968a3 100644

configs/am62ax_evm_a53_defconfig +0 -0
@@ -99,5 +99,14 @@ CONFIG_SYSRESET=y

  CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384

configs/am62ax_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62px_evm_a53_defconfig +0 -0

am62px_evm_a53_defconfig
index aa241a73c3f..2cd572cd5c7 100644

configs/am62px_evm_a53_defconfig +0 -0
@@ -148,6 +148,15 @@ CONFIG_SPL_USB_HOST=y

  CONFIG_SPL_USB_STORAGE=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62px_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62x_evm_a53_defconfig +0 -0

am62x_evm_a53_defconfig
index 281fa3fea15..3221a9b8f2b 100644

configs/am62x_evm_a53_defconfig +0 -0
@@ -138,6 +138,15 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62x_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>

#4 lore raw
Quoted 24 lines · Udit
Quoted 21 lines · Shiva Tripathi
Quoted 18 lines · Andrew Davis
Quoted 4 lines · Shiva Tripathi

Enable firmware TPM (fTPM) support for AM62x, AM62Ax, and AM62Px SoCs by adding OP-TEE and TPM configuration options to the A53 defconfigs.

The AM62 family SoCs do not include an integrated hardware TPM. This

No K3 SoC integrates a full TPM, so why do this only for AM62? And why only the TI EVMs? *All* K3 SoCs and *all* boards based on them can make use of OP-TEE's fTPM, so why not move this to a common location in the Kconfig files. That way you don't need to add all this in every single defconfig.

For instance the CONFIG_CMD_* ones can be added to TI_COMMON_CMD_OPTIONS,

config TI_COMMON_CMD_OPTIONS
    imply CMD_MMC_RPMB if SUPPORT_EMMC_RPMB
etc..

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Andrew

Thanks for the review. Yes fTPM can be enabled for all K3 SoCs. I will send an updated version of the patch with suggested changes.

AFAIK , for fTPM you need eMMC.
Please don't enable for board not having eMMC eg AM68.

I have sent the V2 patch with a conditional check on MMC. Please review.

Quoted 81 lines
Quoted 80 lines

Regards,
Shiva

Quoted 75 lines
Quoted 74 lines

patch enables the Microsoft fTPM Trusted Application running in OP-TEE's secure world to provide TPM 2.0 functionality, with persistent storage backed by the eMMC RPMB partition.

This enables TPM 2.0 functionality in U-Boot and provides the foundation for measured boot and disk encryption use cases.

---
  configs/am62ax_evm_a53_defconfig | 9 +++++++++
  configs/am62px_evm_a53_defconfig | 9 +++++++++
  configs/am62x_evm_a53_defconfig  | 9 +++++++++

  3 files changed, 27 insertions(+)
configs/ renamed from configs/am62ax_evm_a53_defconfig +0 -0

am62ax_evm_a53_defconfig
index 167ba7ff8df..b14f19968a3 100644

configs/am62ax_evm_a53_defconfig +0 -0
@@ -99,5 +99,14 @@ CONFIG_SYSRESET=y

  CONFIG_SPL_SYSRESET=y
  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384

configs/am62ax_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62px_evm_a53_defconfig +0 -0

am62px_evm_a53_defconfig
index aa241a73c3f..2cd572cd5c7 100644

configs/am62px_evm_a53_defconfig +0 -0
@@ -148,6 +148,15 @@ CONFIG_SPL_USB_HOST=y

  CONFIG_SPL_USB_STORAGE=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62px_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>

configs/ renamed from configs/am62x_evm_a53_defconfig +0 -0

am62x_evm_a53_defconfig
index 281fa3fea15..3221a9b8f2b 100644

configs/am62x_evm_a53_defconfig +0 -0
@@ -138,6 +138,15 @@ CONFIG_SPL_SYSRESET=y

  CONFIG_SYSRESET_TI_SCI=y
  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
  CONFIG_EFI_SET_TIME=y

configs/am62x_evm_a53_defconfig +9 -0
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_TPM=y
+CONFIG_TPM_V2=y
+CONFIG_CMD_TPM=y
+CONFIG_TPM2_FTPM_TEE=y
+CONFIG_CMD_OPTEE_RPMB=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_CMD_MMC_RPMB=y

    #include <configs/k3_efi_capsule.config>
  #include <configs/am62x_a53_usbdfu.config>