diff options
author | zhang sanshan <sanshan.zhang@nxp.com> | 2017-05-15 10:45:07 +0800 |
---|---|---|
committer | Chen Guoyin <guoyin.chen@nxp.com> | 2017-07-10 15:08:53 +0800 |
commit | 1c79796a523255af5d012fa3cbc5400131b3b8b9 (patch) | |
tree | 671d094845bc787fca67f158f73084db3ee80f49 /lib/avb/fsl/fsl_avbkey.h | |
parent | 893ec7807779aa34ce49866f03e49c592fff9543 (diff) | |
download | u-boot-imx-1c79796a523255af5d012fa3cbc5400131b3b8b9.zip u-boot-imx-1c79796a523255af5d012fa3cbc5400131b3b8b9.tar.gz u-boot-imx-1c79796a523255af5d012fa3cbc5400131b3b8b9.tar.bz2 |
MA-9409-1 enable avb on android things.
Fix issue for API changed from v2017.
porting below patch from v2016.
commit 44834fd12f60a090e3d10ab6f84a75460894d49d
Change-Id: Ifaf0b86dd29648f9150646f00f54502676df9013
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Diffstat (limited to 'lib/avb/fsl/fsl_avbkey.h')
-rw-r--r-- | lib/avb/fsl/fsl_avbkey.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/avb/fsl/fsl_avbkey.h b/lib/avb/fsl/fsl_avbkey.h new file mode 100644 index 0000000..b671f03 --- /dev/null +++ b/lib/avb/fsl/fsl_avbkey.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __FSL_AVBKEY_H__ +#define __FSL_AVBKEY_H__ + + +#define CAAM_PAD 48 + +#define AVB_PUBKY_FLAG 0xABAB +#define AVB_PUBKY_OFFSET 0x1000 + +#define AVB_RBIDX_FLAG 0xCDCD +#define AVB_RBIDX_START 0x2000 +#define AVB_RBIDX_ALIGN 0x1000 +#define AVB_RBIDX_LEN 0x08 +#define AVB_RBIDX_INITVAL 0 + + +#define AVB_KBLB_MAGIC "\0KBLB!" +#define AVB_KBLB_MAGIC_LEN 6 + + +struct kblb_tag { + uint32_t flag; + uint32_t offset; + uint32_t len; +}; +typedef struct kblb_tag kblb_tag_t; + +struct kblb_hdr { + /* avbkey partition magic */ + char magic[AVB_KBLB_MAGIC_LEN]; + /* public key keyblb tag */ + kblb_tag_t pubk_tag; + /* rollback index keyblb tag */ + kblb_tag_t rbk_tags[AVB_MAX_NUMBER_OF_ROLLBACK_INDEX_LOCATIONS]; +}; +typedef struct kblb_hdr kblb_hdr_t; + +#endif |