blob: 4b78aef7cfd20fb2693c1d087bfa6a073468c02d [file] [log] [blame]
Svyatoslav Ryhelf8700e42023-02-14 19:35:38 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef _BCT_H_
4#define _BCT_H_
5
6/*
7 * Defines the BCT parametres for T20
8 */
9#define BCT_LENGTH 0xFE0
10#define BCT_HASH 0x10
11#define EBT_ALIGNMENT 0x10
12
13/*
14 * Defines the CMAC-AES-128 hash length in 32 bit words. (128 bits = 4 words)
15 */
16#define NVBOOT_CMAC_AES_HASH_LENGTH 4
17
18/*
19 * Defines the maximum number of bootloader descriptions in the BCT.
20 */
21#define NVBOOT_MAX_BOOTLOADERS 4
22
23struct nv_bootloader_info {
24 u32 version;
25 u32 start_blk;
26 u32 start_page;
27 u32 length;
28 u32 load_addr;
29 u32 entry_point;
30 u32 attribute;
31 u32 crypto_hash[NVBOOT_CMAC_AES_HASH_LENGTH];
32};
33
34struct nvboot_config_table {
35 u32 unused0[4];
36 u32 boot_data_version;
37 u32 unused1[668];
38 struct nv_bootloader_info bootloader[NVBOOT_MAX_BOOTLOADERS];
39 u32 unused2[508];
40};
41
42#endif /* _BCT_H_ */