"plat/arm/common/arm_io_storage.c" did not exist on "375f538a797a89a5f49aab1be70e86df4511c05a"
tbb_cert.c 4.45 KB
Newer Older
1
/*
2
 * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

7
8
9
#include "tbbr/tbb_cert.h"
#include "tbbr/tbb_ext.h"
#include "tbbr/tbb_key.h"
10
11
12
13
14

/*
 * Certificates used in the chain of trust
 *
 * The order of the certificates must follow the enumeration specified in
15
16
 * tbb_cert.h. All certificates are self-signed, so the issuer certificate
 * field points to itself.
17
 */
18
static cert_t tbb_certs[] = {
19
20
21
	[TRUSTED_BOOT_FW_CERT] = {
		.id = TRUSTED_BOOT_FW_CERT,
		.opt = "tb-fw-cert",
22
		.help_msg = "Trusted Boot FW Certificate (output file)",
23
		.fn = NULL,
24
		.cn = "Trusted Boot FW Certificate",
25
		.key = ROT_KEY,
26
		.issuer = TRUSTED_BOOT_FW_CERT,
27
		.ext = {
28
			TRUSTED_FW_NVCOUNTER_EXT,
29
			TRUSTED_BOOT_FW_HASH_EXT
30
		},
31
		.num_ext = 2
32
	},
33
	[TRUSTED_KEY_CERT] = {
34
		.id = TRUSTED_KEY_CERT,
35
		.opt = "trusted-key-cert",
36
		.help_msg = "Trusted Key Certificate (output file)",
37
38
		.fn = NULL,
		.cn = "Trusted Key Certificate",
39
40
41
		.key = ROT_KEY,
		.issuer = TRUSTED_KEY_CERT,
		.ext = {
42
			TRUSTED_FW_NVCOUNTER_EXT,
43
44
			TRUSTED_WORLD_PK_EXT,
			NON_TRUSTED_WORLD_PK_EXT
45
		},
46
		.num_ext = 3
47
	},
48
49
50
	[SCP_FW_KEY_CERT] = {
		.id = SCP_FW_KEY_CERT,
		.opt = "scp-fw-key-cert",
51
		.help_msg = "SCP Firmware Key Certificate (output file)",
52
		.fn = NULL,
53
		.cn = "SCP Firmware Key Certificate",
54
		.key = TRUSTED_WORLD_KEY,
55
		.issuer = SCP_FW_KEY_CERT,
56
		.ext = {
57
			TRUSTED_FW_NVCOUNTER_EXT,
58
			SCP_FW_CONTENT_CERT_PK_EXT
59
		},
60
		.num_ext = 2
61
	},
62
63
64
	[SCP_FW_CONTENT_CERT] = {
		.id = SCP_FW_CONTENT_CERT,
		.opt = "scp-fw-cert",
65
		.help_msg = "SCP Firmware Content Certificate (output file)",
66
		.fn = NULL,
67
68
69
		.cn = "SCP Firmware Content Certificate",
		.key = SCP_FW_CONTENT_CERT_KEY,
		.issuer = SCP_FW_CONTENT_CERT,
70
		.ext = {
71
			TRUSTED_FW_NVCOUNTER_EXT,
72
			SCP_FW_HASH_EXT
73
		},
74
		.num_ext = 2
75
	},
76
77
78
	[SOC_FW_KEY_CERT] = {
		.id = SOC_FW_KEY_CERT,
		.opt = "soc-fw-key-cert",
79
		.help_msg = "SoC Firmware Key Certificate (output file)",
80
		.fn = NULL,
81
		.cn = "SoC Firmware Key Certificate",
82
		.key = TRUSTED_WORLD_KEY,
83
		.issuer = SOC_FW_KEY_CERT,
84
		.ext = {
85
			TRUSTED_FW_NVCOUNTER_EXT,
86
			SOC_FW_CONTENT_CERT_PK_EXT
87
		},
88
		.num_ext = 2
89
	},
90
91
92
	[SOC_FW_CONTENT_CERT] = {
		.id = SOC_FW_CONTENT_CERT,
		.opt = "soc-fw-cert",
93
		.help_msg = "SoC Firmware Content Certificate (output file)",
94
		.fn = NULL,
95
96
97
		.cn = "SoC Firmware Content Certificate",
		.key = SOC_FW_CONTENT_CERT_KEY,
		.issuer = SOC_FW_CONTENT_CERT,
98
		.ext = {
99
			TRUSTED_FW_NVCOUNTER_EXT,
100
			SOC_AP_FW_HASH_EXT
101
		},
102
		.num_ext = 2
103
	},
104
105
106
	[TRUSTED_OS_FW_KEY_CERT] = {
		.id = TRUSTED_OS_FW_KEY_CERT,
		.opt = "tos-fw-key-cert",
107
		.help_msg = "Trusted OS Firmware Key Certificate (output file)",
108
		.fn = NULL,
109
		.cn = "Trusted OS Firmware Key Certificate",
110
		.key = TRUSTED_WORLD_KEY,
111
		.issuer = TRUSTED_OS_FW_KEY_CERT,
112
		.ext = {
113
			TRUSTED_FW_NVCOUNTER_EXT,
114
			TRUSTED_OS_FW_CONTENT_CERT_PK_EXT
115
		},
116
		.num_ext = 2
117
	},
118
119
120
	[TRUSTED_OS_FW_CONTENT_CERT] = {
		.id = TRUSTED_OS_FW_CONTENT_CERT,
		.opt = "tos-fw-cert",
121
		.help_msg = "Trusted OS Firmware Content Certificate (output file)",
122
		.fn = NULL,
123
124
125
		.cn = "Trusted OS Firmware Content Certificate",
		.key = TRUSTED_OS_FW_CONTENT_CERT_KEY,
		.issuer = TRUSTED_OS_FW_CONTENT_CERT,
126
		.ext = {
127
			TRUSTED_FW_NVCOUNTER_EXT,
128
129
130
			TRUSTED_OS_FW_HASH_EXT,
			TRUSTED_OS_FW_EXTRA1_HASH_EXT,
			TRUSTED_OS_FW_EXTRA2_HASH_EXT
131
		},
132
		.num_ext = 4
133
	},
134
135
136
	[NON_TRUSTED_FW_KEY_CERT] = {
		.id = NON_TRUSTED_FW_KEY_CERT,
		.opt = "nt-fw-key-cert",
137
		.help_msg = "Non-Trusted Firmware Key Certificate (output file)",
138
		.fn = NULL,
139
		.cn = "Non-Trusted Firmware Key Certificate",
140
		.key = NON_TRUSTED_WORLD_KEY,
141
		.issuer = NON_TRUSTED_FW_KEY_CERT,
142
		.ext = {
143
			NON_TRUSTED_FW_NVCOUNTER_EXT,
144
			NON_TRUSTED_FW_CONTENT_CERT_PK_EXT
145
		},
146
		.num_ext = 2
147
	},
148
149
150
	[NON_TRUSTED_FW_CONTENT_CERT] = {
		.id = NON_TRUSTED_FW_CONTENT_CERT,
		.opt = "nt-fw-cert",
151
		.help_msg = "Non-Trusted Firmware Content Certificate (output file)",
152
		.fn = NULL,
153
154
155
		.cn = "Non-Trusted Firmware Content Certificate",
		.key = NON_TRUSTED_FW_CONTENT_CERT_KEY,
		.issuer = NON_TRUSTED_FW_CONTENT_CERT,
156
		.ext = {
157
			NON_TRUSTED_FW_NVCOUNTER_EXT,
158
			NON_TRUSTED_WORLD_BOOTLOADER_HASH_EXT
159
		},
160
		.num_ext = 2
161
162
163
164
	},
	[FWU_CERT] = {
		.id = FWU_CERT,
		.opt = "fwu-cert",
165
		.help_msg = "Firmware Update Certificate (output file)",
166
		.fn = NULL,
167
		.cn = "Firmware Update Certificate",
168
169
170
		.key = ROT_KEY,
		.issuer = FWU_CERT,
		.ext = {
171
172
173
			SCP_FWU_CFG_HASH_EXT,
			AP_FWU_CFG_HASH_EXT,
			FWU_HASH_EXT
174
175
		},
		.num_ext = 3
176
177
	}
};
178
179

REGISTER_COT(tbb_certs);