Skip to contentSkip to conversation

add optee support for broadcom NS3 soc

PATCH New Rayagonda Kokatanur 2 participants 5 messages Jul 15, 2020 – Jul 29, 2020 TEE

lore
Share & tools
lore
#0 lore raw

v5 cover add optee support for broadcom NS3 soc

This is fourth patch set series prepared on top of third patch set ("add FIT image support for broadcom NS3 soc").

This patch adds optee support.

Changes from v4:
-Address review comments from Simon,
Add blank line before return.

Changes from v3:
-Address review comments from Simon,
Rearrange code and remove while loop,
Add comments for function.

Changes from v2:
-Address review comments from Simon,
Remove own return code and use standard error code. Take out common lines from different functions and move them into common static function.
Remove include <common.h> as its not required. Move functions with printf from header file into c file.

-Address slef review comments,
Remove optee dt node as this file is no longer in sync with linux.

Changes from v1:
-Address review comments from Thomas Fitzsimmons,
Expand the bnxt full form.

-Address review comments from Simon Glass,
Move c file from board/broadcom/bcmns3/chimp_optee.c to drivers/tee/broadcom,
Move header file from include/brcm/chimp.h to include/broadcom/chimp.h

Rayagonda Kokatanur (1):
configs: ns3: enable tee and optee driver

Vikas Gupta (1):
drivers: tee: broadcom: add optee based bnxt fw load driver

 configs/bcm_ns3_defconfig          |   5 +-
 drivers/tee/Kconfig                |   1 +
 drivers/tee/Makefile               |   1 +
 drivers/tee/broadcom/Kconfig       |   7 ++
 drivers/tee/broadcom/Makefile      |   3 +
 drivers/tee/broadcom/chimp_optee.c | 183 +++++++++++++++++++++++++++++
 include/broadcom/chimp.h           |  43 +++++++
 7 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 drivers/tee/broadcom/Kconfig
 create mode 100644 drivers/tee/broadcom/Makefile
 create mode 100644 drivers/tee/broadcom/chimp_optee.c
 create mode 100644 include/broadcom/chimp.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/2 drivers: tee: broadcom: add optee based bnxt fw load driver

From: Vikas Gupta <[email protected]>

Add optee based bnxt fw load driver.
bnxt is Broadcom NetXtreme controller Ethernet card. This driver is used to load bnxt firmware binary using OpTEE.

---
Changes from v4:
-Address review comments from Simon,
Add blank line before return.

Changes from v3:
-Address review comments from Simon,
Rearrange code and remove while loop,
Add comments for function.

Changes from v2:
-Address review comments from Simon,
Remove own return code and use standard error code. Take out common lines from different functions and move them into common static function.
Remove include <common.h> as its not required. Move functions with printf from header file into c file.

 drivers/tee/Kconfig                |   1 +
 drivers/tee/Makefile               |   1 +
 drivers/tee/broadcom/Kconfig       |   7 ++
 drivers/tee/broadcom/Makefile      |   3 +
 drivers/tee/broadcom/chimp_optee.c | 183 +++++++++++++++++++++++++++++
 include/broadcom/chimp.h           |  43 +++++++
 6 files changed, 238 insertions(+)
 create mode 100644 drivers/tee/broadcom/Kconfig
 create mode 100644 drivers/tee/broadcom/Makefile
 create mode 100644 drivers/tee/broadcom/chimp_optee.c
 create mode 100644 include/broadcom/chimp.h
drivers/tee/Kconfig +1 -0
index 5c0c89043f..5ca5a0836c 100644
@@ -29,6 +29,7 @@ config SANDBOX_TEE
 	  "avb" commands.
 
 source "drivers/tee/optee/Kconfig"
+source "drivers/tee/broadcom/Kconfig"
 
 endmenu
 
drivers/tee/Makefile +1 -0
index f72c68c09f..5c8ffdbce8 100644
@@ -3,3 +3,4 @@
 obj-y += tee-uclass.o
 obj-$(CONFIG_SANDBOX) += sandbox.o
 obj-$(CONFIG_OPTEE) += optee/
+obj-y += broadcom/
drivers/tee/broadcom/Kconfig new file +7 -0
new file mode 100644
index 0000000000..ce95072d4e
@@ -0,0 +1,7 @@
+config CHIMP_OPTEE
+	bool "Enable secure ChiMP firmware loading"
+	depends on OPTEE
+	default y
+	help
+	  This driver is used to load bnxt firmware binary using OpTEE.
+	  bnxt is Broadcom NetXtreme controller Ethernet card.
drivers/tee/broadcom/Makefile new file +3 -0
new file mode 100644
index 0000000000..cb3cef16df
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y += chimp_optee.o
drivers/tee/broadcom/chimp_optee.c new file +183 -0

183 lines not on this page · raw message

include/broadcom/chimp.h new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

PATCH v5 1/2 drivers: tee: broadcom: add optee based bnxt fw load driver

Quoted 9 lines · Rayagonda Kokatanur

From: Vikas Gupta <[email protected]>

Add optee based bnxt fw load driver.
bnxt is Broadcom NetXtreme controller Ethernet card. This driver is used to load bnxt firmware binary using OpTEE.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200729/78f65b93/attachment.sig>
#3 lore raw

PATCH v5 2/2 configs: ns3: enable tee and optee driver

In reply to Rayagonda Kokatanur

Enable tee and optee drivers.

---
 configs/bcm_ns3_defconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configs/bcm_ns3_defconfig +4 -1
index 0e078f3244..72015c6596 100644
@@ -4,12 +4,12 @@ CONFIG_TARGET_BCMNS3=y
 CONFIG_SYS_TEXT_BASE=0xFF000000
 CONFIG_ENV_SIZE=0x80000
 CONFIG_NR_DRAM_BANKS=2
-CONFIG_OF_BOARD_SETUP=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_SIGNATURE_MAX_SIZE=0x20000000
 CONFIG_FIT_VERBOSE=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_LOGLEVEL=7
 CONFIG_SILENT_CONSOLE=y
 CONFIG_SILENT_U_BOOT_ONLY=y
@@ -42,6 +42,9 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+# CONFIG_OPTEE_TA_AVB is not set
 CONFIG_WDT=y
 CONFIG_WDT_SP805=y
 CONFIG_FAT_WRITE=y
Signature · 1 line
2.17.1
#4 lore raw

PATCH v5 2/2 configs: ns3: enable tee and optee driver

Quoted 5 lines · Rayagonda Kokatanur

Enable tee and optee drivers.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200729/7eece67d/attachment.sig>