summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-06-22 10:18:01 +0800
committerJi Luo <ji.luo@nxp.com>2019-07-17 11:45:19 +0800
commit827f6a10e4a1ca3dc4c3844cff3e97f5dcd35857 (patch)
tree7d94d2131097fa7a58df9c9a109ecc3a4a2e25da /include
parent7a18b1643d7cd7c454b653e8cf1db83043824764 (diff)
MA-15017 Add new command to generate bkek from trusty
Add new command to generate bkek from trusty. Test: generate and dump bkek. Change-Id: I6b2a30b87c755eecd00ced7c53cfb86e432040de Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/interface/hwcrypto/hwcrypto.h10
-rw-r--r--include/trusty/hwcrypto.h8
2 files changed, 18 insertions, 0 deletions
diff --git a/include/interface/hwcrypto/hwcrypto.h b/include/interface/hwcrypto/hwcrypto.h
index 270c57910a2..4579d8c2e78 100644
--- a/include/interface/hwcrypto/hwcrypto.h
+++ b/include/interface/hwcrypto/hwcrypto.h
@@ -39,6 +39,7 @@ enum hwcrypto_command {
HWCRYPTO_HASH = (1 << HWCRYPTO_REQ_SHIFT),
HWCRYPTO_ENCAP_BLOB = (2 << HWCRYPTO_REQ_SHIFT),
HWCRYPTO_GEN_RNG = (3 << HWCRYPTO_REQ_SHIFT),
+ HWCRYPTO_GEN_BKEK = (4 << HWCRYPTO_REQ_SHIFT),
};
/**
@@ -105,4 +106,13 @@ typedef struct hwcrypto_rng_msg {
uint32_t buf;
uint32_t len;
}hwcrypto_rng_msg;
+
+/**
+ * @buf: physical start address of the output bkek buf.
+ * @len: size of required rng.
+ */
+typedef struct hwcrypto_bkek_msg {
+ uint32_t buf;
+ uint32_t len;
+}hwcrypto_bkek_msg;
#endif /* TRUSTY_INTERFACE_HWCRYPTO_H_ */
diff --git a/include/trusty/hwcrypto.h b/include/trusty/hwcrypto.h
index 9a510a889d7..d6837d6f840 100644
--- a/include/trusty/hwcrypto.h
+++ b/include/trusty/hwcrypto.h
@@ -74,4 +74,12 @@ int hwcrypto_gen_blob(uint32_t plain_pa,
* @len: size of required rng.
* */
int hwcrypto_gen_rng(uint32_t buf, uint32_t len);
+
+/* Send request to secure side to generate bkek with caam.
+ * Returns one of trusty_err.
+ *
+ * @buf: physical start address of the output rng buf.
+ * @len: size of required rng.
+ * */
+int hwcrypto_gen_bkek(uint32_t buf, uint32_t len);
#endif /* TRUSTY_HWCRYPTO_H_ */