diff options
author | Winter Wang <wente.wang@nxp.com> | 2016-11-30 18:57:06 +0800 |
---|---|---|
committer | Winter Wang <wente.wang@nxp.com> | 2016-12-08 17:15:24 +0800 |
commit | 5ce3ba13de1fa4e9bac264b464fde3714d36dd82 (patch) | |
tree | ca35c06b18edef06a54ecb84ca303bd340455a41 /include/fsl_avb.h | |
parent | ba84ac09dd524a2a855be2f3a104f9584f4637e7 (diff) | |
download | u-boot-imx-5ce3ba13de1fa4e9bac264b464fde3714d36dd82.zip u-boot-imx-5ce3ba13de1fa4e9bac264b464fde3714d36dd82.tar.gz u-boot-imx-5ce3ba13de1fa4e9bac264b464fde3714d36dd82.tar.bz2 |
MA-9077 libavb: fsl: use rpmb
use rpmb to store public key/rollback index for avb.
rpmb's key will be generated by caam hw rng , then
caam encrypted and programmed to fuse;
CONFIG_AVB_FUSE need to be set.
Change-Id: Ic0c534420299b450f7aa11f1a2616c5fcf06513b
Signed-off-by: Winter Wang <wente.wang@nxp.com>
Diffstat (limited to 'include/fsl_avb.h')
-rw-r--r-- | include/fsl_avb.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/fsl_avb.h b/include/fsl_avb.h index bcd2536..c8155a4 100644 --- a/include/fsl_avb.h +++ b/include/fsl_avb.h @@ -85,7 +85,7 @@ AvbIOResult fsl_write_ab_metadata(AvbABOps* ab_ops, const struct AvbABData* data * If AVB_IO_RESULT_OK is returned then |out_is_trusted| is set - * true if trusted or false if untrusted. */ -AvbIOResult fsl_validate_vbmeta_public_key(AvbOps* ops, +AvbIOResult fsl_validate_vbmeta_public_key_rpmb(AvbOps* ops, const uint8_t* public_key_data, size_t public_key_length, bool* out_is_trusted); @@ -99,7 +99,7 @@ AvbIOResult fsl_validate_vbmeta_public_key(AvbOps* ops, * one or four) so may error out if |rollback_index_slot| exceeds * this number. */ -AvbIOResult fsl_read_rollback_index(AvbOps* ops, size_t rollback_index_slot, +AvbIOResult fsl_read_rollback_index_rpmb(AvbOps* ops, size_t rollback_index_slot, uint64_t* out_rollback_index); /* Sets the rollback index corresponding to the slot given by @@ -111,7 +111,7 @@ AvbIOResult fsl_read_rollback_index(AvbOps* ops, size_t rollback_index_slot, * one or four) so may error out if |rollback_index_slot| exceeds * this number. */ -AvbIOResult fsl_write_rollback_index(AvbOps* ops, size_t rollback_index_slot, +AvbIOResult fsl_write_rollback_index_rpmb(AvbOps* ops, size_t rollback_index_slot, uint64_t rollback_index); /* Gets whether the device is unlocked. The value is returned in @@ -159,13 +159,13 @@ int get_slotvar_avb(AvbABOps *ab_ops, char *cmd, char *buffer, size_t size); * used in the switch from LOCK to UNLOCK * return 0 if success, non 0 if fail. * */ -int rbkidx_erase(const char * kblb_part); +int rbkidx_erase(void); -/* init the avbkey partition, include the header/public key/rollback index +/* init the avbkey in rpmb partition, include the header/public key/rollback index * for public key/rollback index part, use caam to do encrypt * return 0 if success, non 0 if fail. * */ -int avbkeyblb_init(uint8_t *plainkey, uint32_t keylen, const char *kblb_part /*"avbkey"*/); +int avbkey_init(uint8_t *plainkey, uint32_t keylen); /* read a/b metadata to get curr slot * return slot suffix '_a'/'_b' or NULL */ |