diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fb_fsl.h | 5 | ||||
-rw-r--r-- | include/fsl_avb.h | 6 | ||||
-rw-r--r-- | include/interface/storage/storage.h | 3 | ||||
-rw-r--r-- | include/trusty/rpmb.h | 10 |
4 files changed, 19 insertions, 5 deletions
diff --git a/include/fb_fsl.h b/include/fb_fsl.h index 8e2f1c487a..a0018169ef 100644 --- a/include/fb_fsl.h +++ b/include/fb_fsl.h @@ -86,9 +86,10 @@ #ifdef CONFIG_IMX_TRUSTY_OS #ifndef CONFIG_AVB_ATX -#define FASTBOOT_SET_RPMB_KEY "set-rpmb-key" -#define FASTBOOT_SET_RPMB_RANDOM_KEY "set-rpmb-random-key" +#define FASTBOOT_SET_RPMB_STAGED_KEY "set-rpmb-staged-key" +#define FASTBOOT_SET_RPMB_HARDWARE_KEY "set-rpmb-hardware-key" #define FASTBOOT_SET_VBMETA_PUBLIC_KEY "set-public-key" +#define FASTBOOT_ERASE_RPMB "erase-rpmb" #endif #define FASTBOOT_SET_CA_RESP "at-set-ca-response" diff --git a/include/fsl_avb.h b/include/fsl_avb.h index 0eaa842cf1..9c7cfe059d 100644 --- a/include/fsl_avb.h +++ b/include/fsl_avb.h @@ -172,10 +172,10 @@ AvbIOResult fsl_get_random(AvbAtxOps* atx_ops, int avb_atx_fuse_perm_attr(uint8_t *staged_buffer, uint32_t size); /* Initialize rpmb key with the staged key */ -int fastboot_set_rpmb_key(uint8_t *staged_buf, uint32_t key_size); +int fastboot_set_rpmb_staged_key(uint8_t *staged_buf, uint32_t key_size); -/* Initialize rpmb key with random key which is generated by caam rng */ -int fastboot_set_rpmb_random_key(void); +/* Initialize rpmb key with hardware key which is derived from BKEK */ +int fastboot_set_rpmb_hardware_key(void); /* Generate ATX unlock challenge */ int avb_atx_get_unlock_challenge(struct AvbAtxOps* atx_ops, diff --git a/include/interface/storage/storage.h b/include/interface/storage/storage.h index e4f7f83656..4d524984e6 100644 --- a/include/interface/storage/storage.h +++ b/include/interface/storage/storage.h @@ -56,6 +56,9 @@ enum storage_cmd { /* transaction support */ STORAGE_END_TRANSACTION = 9 << STORAGE_REQ_SHIFT, + + STORAGE_RPMB_KEY_SET = 12 << STORAGE_REQ_SHIFT, + STORAGE_RPMB_ERASE_ALL = 13 << STORAGE_REQ_SHIFT, }; /** diff --git a/include/trusty/rpmb.h b/include/trusty/rpmb.h index e29a608a4b..810b8a1d7f 100644 --- a/include/trusty/rpmb.h +++ b/include/trusty/rpmb.h @@ -75,4 +75,14 @@ void *rpmb_storage_get_ctx(void); */ void rpmb_storage_put_ctx(void *dev); +/* + * Set rpmb key by secure side. + */ +int storage_set_rpmb_key(void); + +/* + * Erase rpmb storage by secure side. + */ +int storage_erase_rpmb(void); + #endif /* TRUSTY_RPMB_H_ */ |