Skip to contentSkip to conversation

cmd: optee_rpmb command for read/write of rpmb from optee

PATCH New Gaurav Jain 1 participant 1 message Sep 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: optee_rpmb command for read/write of rpmb from optee

From: Ruchika Gupta <[email protected]>

Enable "optee_rpmb" command to write/read named persistent values created on RPMB by opening session with OPTEE AVB TA. This provides easy test for establishing a session with OPTEE TA and storage of persistent data in MMC RPMB.

It includes following subcommands:

optee_rpmb read_pvalue - read persistent values on rpmb via OPTEE AVB TA optee_rpmb write_pvalue - write persistent values on rpmb via OPTEE AVB TA

---
 cmd/Kconfig      |   8 ++
 cmd/Makefile     |   1 +
 cmd/optee_rpmb.c | 272 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 281 insertions(+)
 create mode 100644 cmd/optee_rpmb.c
cmd/Kconfig +8 -0
index 0761dbb746..f2b631bce3 100644
@@ -1162,6 +1162,14 @@ config CMD_CLONE
 	  initial flashing by external block device without network
 	  or usb support.
 
+config CMD_OPTEE_RPMB
+	bool "Enable read/write support on RPMB via OPTEE"
+	depends on SUPPORT_EMMC_RPMB && OPTEE
+	help
+	  Enable the commands for reading, writing persistent named values
+	  in the Replay Protection Memory Block partition in eMMC by
+	  using Persistent Objects in OPTEE
+
 config CMD_MTD
 	bool "mtd"
 	depends on MTD
cmd/Makefile +1 -0
index 3a9c9747c9..acb048d7bf 100644
@@ -96,6 +96,7 @@ obj-$(CONFIG_CMD_MII) += mii.o
 obj-$(CONFIG_CMD_MDIO) += mdio.o
 obj-$(CONFIG_CMD_MISC) += misc.o
 obj-$(CONFIG_CMD_MMC) += mmc.o
+obj-$(CONFIG_CMD_OPTEE_RPMB) += optee_rpmb.o
 obj-$(CONFIG_MP) += mp.o
 obj-$(CONFIG_CMD_MTD) += mtd.o
 obj-$(CONFIG_CMD_MTDPARTS) += mtdparts.o
cmd/optee_rpmb.c new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
2.17.1