blob: 5e17a8350e647a778c2d33667d8c3e677b3185bc [file] [log] [blame]
Tamas Ban1d2ca4f2024-01-29 08:46:54 +01001/*
2 * Copyright (c) 2024, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef METADATA_H
8#define METADATA_H
9
Tamas Banc96425b2024-02-23 10:41:05 +010010/* Minimum measurement value size that can be requested to store */
11#define MEASUREMENT_VALUE_MIN_SIZE 32U
12/* Maximum measurement value size that can be requested to store */
13#define MEASUREMENT_VALUE_MAX_SIZE 64U
14/* Minimum signer id size that can be requested to store */
15#define SIGNER_ID_MIN_SIZE MEASUREMENT_VALUE_MIN_SIZE
16/* Maximum signer id size that can be requested to store */
17#define SIGNER_ID_MAX_SIZE MEASUREMENT_VALUE_MAX_SIZE
18/* The theoretical maximum image version is: "255.255.65535\0" */
19#define VERSION_MAX_SIZE 14U
20/* Example sw_type: "BL_2, BL_33, etc." */
21#define SW_TYPE_MAX_SIZE 32U
22
Tamas Ban1d2ca4f2024-01-29 08:46:54 +010023/*
24 * Images, measured during the boot process, have some associated metadata.
25 * One of these types of metadata is the image identifier strings. These macros
26 * define these strings. They are used across the different measured boot
27 * backends.
28 * Note that these strings follow the standardization recommendations
29 * defined in the Arm Server Base Security Guide (a.k.a. SBSG, Arm DEN 0086),
30 * where applicable. They should not be changed in the code.
31 * Where the SBSG does not make recommendations, we are free to choose any
32 * naming convention.
33 * The key thing is to choose meaningful strings so that when the measured boot
34 * metadata is used in attestation, the different components can be identified.
35 */
36#define MBOOT_BL2_IMAGE_STRING "BL_2"
37#define MBOOT_BL31_IMAGE_STRING "SECURE_RT_EL3"
38#if defined(SPD_opteed)
39#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_OPTEE"
40#elif defined(SPD_tspd)
41#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_TSPD"
42#elif defined(SPD_tlkd)
43#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_TLKD"
44#elif defined(SPD_trusty)
45#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_TRUSTY"
Tamas Banaca58982024-01-29 09:47:27 +010046#elif defined(SPD_spmd)
47#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_SPMD"
Tamas Ban1d2ca4f2024-01-29 08:46:54 +010048#else
49#define MBOOT_BL32_IMAGE_STRING "SECURE_RT_EL1_UNKNOWN"
50#endif /* SPD_opteed */
51#define MBOOT_BL32_EXTRA1_IMAGE_STRING "SECURE_RT_EL1_OPTEE_EXTRA1"
52#define MBOOT_BL32_EXTRA2_IMAGE_STRING "SECURE_RT_EL1_OPTEE_EXTRA2"
53#define MBOOT_BL33_IMAGE_STRING "BL_33"
54#define MBOOT_FW_CONFIG_STRING "FW_CONFIG"
55#define MBOOT_HW_CONFIG_STRING "HW_CONFIG"
56#define MBOOT_NT_FW_CONFIG_STRING "NT_FW_CONFIG"
57#define MBOOT_SCP_BL2_IMAGE_STRING "SYS_CTRL_2"
58#define MBOOT_SOC_FW_CONFIG_STRING "SOC_FW_CONFIG"
59#define MBOOT_STM32_STRING "STM32"
60#define MBOOT_TB_FW_CONFIG_STRING "TB_FW_CONFIG"
61#define MBOOT_TOS_FW_CONFIG_STRING "TOS_FW_CONFIG"
62#define MBOOT_RMM_IMAGE_STRING "RMM"
63#define MBOOT_SP1_STRING "SP1"
64#define MBOOT_SP2_STRING "SP2"
65#define MBOOT_SP3_STRING "SP3"
66#define MBOOT_SP4_STRING "SP4"
67#define MBOOT_SP5_STRING "SP5"
68#define MBOOT_SP6_STRING "SP6"
69#define MBOOT_SP7_STRING "SP7"
70#define MBOOT_SP8_STRING "SP8"
71
72#endif /* METADATA_H */