blob: d6e16c29ed32f781d1cc86a6cddd6537021d127b [file] [log] [blame]
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +09001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2013, Google Inc.
4 */
5
6#ifdef USE_HOSTCC
7#include "mkimage.h"
8#include <time.h>
9#else
10#include <common.h>
Simon Glass0f2af882020-05-10 11:40:05 -060011#include <log.h>
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090012#include <malloc.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060013#include <asm/global_data.h>
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090014DECLARE_GLOBAL_DATA_PTR;
15#endif /* !USE_HOSTCC*/
Masahiro Yamada6dd10522020-04-16 18:30:18 +090016#include <fdt_region.h>
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090017#include <image.h>
18#include <u-boot/rsa.h>
Alexandru Gagniucdb182c42021-02-19 12:45:10 -060019#include <u-boot/hash-checksum.h>
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090020
21#define IMAGE_MAX_HASHED_NODES 100
22
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090023/**
24 * fit_region_make_list() - Make a list of image regions
25 *
26 * Given a list of fdt_regions, create a list of image_regions. This is a
27 * simple conversion routine since the FDT and image code use different
28 * structures.
29 *
30 * @fit: FIT image
31 * @fdt_regions: Pointer to FDT regions
32 * @count: Number of FDT regions
33 * @region: Pointer to image regions, which must hold @count records. If
34 * region is NULL, then (except for an SPL build) the array will be
35 * allocated.
36 * @return: Pointer to image regions
37 */
38struct image_region *fit_region_make_list(const void *fit,
39 struct fdt_region *fdt_regions,
40 int count,
41 struct image_region *region)
42{
43 int i;
44
45 debug("Hash regions:\n");
46 debug("%10s %10s\n", "Offset", "Size");
47
48 /*
49 * Use malloc() except in SPL (to save code size). In SPL the caller
50 * must allocate the array.
51 */
Simon Glassc0cabbc2021-09-25 19:43:39 -060052 if (!IS_ENABLED(CONFIG_SPL_BUILD) && !region)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090053 region = calloc(sizeof(*region), count);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090054 if (!region)
55 return NULL;
56 for (i = 0; i < count; i++) {
57 debug("%10x %10x\n", fdt_regions[i].offset,
58 fdt_regions[i].size);
59 region[i].data = fit + fdt_regions[i].offset;
60 region[i].size = fdt_regions[i].size;
61 }
62
63 return region;
64}
65
66static int fit_image_setup_verify(struct image_sign_info *info,
67 const void *fit, int noffset,
68 int required_keynode, char **err_msgp)
69{
Jan Kiszka27beec22022-01-14 10:21:17 +010070 const char *algo_name;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090071 const char *padding_name;
72
Simon Glassc0cabbc2021-09-25 19:43:39 -060073 if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) {
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090074 *err_msgp = "Total size too large";
75 return 1;
76 }
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090077 if (fit_image_hash_get_algo(fit, noffset, &algo_name)) {
78 *err_msgp = "Can't get hash algo property";
79 return -1;
80 }
81
82 padding_name = fdt_getprop(fit, noffset, "padding", NULL);
83 if (!padding_name)
84 padding_name = RSA_DEFAULT_PADDING_NAME;
85
86 memset(info, '\0', sizeof(*info));
Tom Rini7357a352020-04-07 11:58:44 -040087 info->keyname = fdt_getprop(fit, noffset, FIT_KEY_HINT, NULL);
Hannu Lounentoe2b1e1f2021-10-18 08:49:03 +030088 info->fit = fit;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +090089 info->node_offset = noffset;
90 info->name = algo_name;
91 info->checksum = image_get_checksum_algo(algo_name);
92 info->crypto = image_get_crypto_algo(algo_name);
93 info->padding = image_get_padding_algo(padding_name);
94 info->fdt_blob = gd_fdt_blob();
95 info->required_keynode = required_keynode;
96 printf("%s:%s", algo_name, info->keyname);
97
98 if (!info->checksum || !info->crypto || !info->padding) {
99 *err_msgp = "Unknown signature algorithm";
100 return -1;
101 }
102
103 return 0;
104}
105
106int fit_image_check_sig(const void *fit, int noffset, const void *data,
107 size_t size, int required_keynode, char **err_msgp)
108{
109 struct image_sign_info info;
110 struct image_region region;
111 uint8_t *fit_value;
112 int fit_value_len;
113
114 *err_msgp = NULL;
115 if (fit_image_setup_verify(&info, fit, noffset, required_keynode,
116 err_msgp))
117 return -1;
118
119 if (fit_image_hash_get_value(fit, noffset, &fit_value,
120 &fit_value_len)) {
121 *err_msgp = "Can't get hash value property";
122 return -1;
123 }
124
125 region.data = data;
126 region.size = size;
127
128 if (info.crypto->verify(&info, &region, 1, fit_value, fit_value_len)) {
129 *err_msgp = "Verification failed";
130 return -1;
131 }
132
133 return 0;
134}
135
136static int fit_image_verify_sig(const void *fit, int image_noffset,
137 const char *data, size_t size,
Simon Glass4c5ff062021-11-12 12:28:08 -0700138 const void *key_blob, int key_offset)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900139{
140 int noffset;
141 char *err_msg = "";
142 int verified = 0;
143 int ret;
144
145 /* Process all hash subnodes of the component image node */
146 fdt_for_each_subnode(noffset, fit, image_noffset) {
147 const char *name = fit_get_name(fit, noffset, NULL);
148
Simon Glass44338902021-02-15 17:08:06 -0700149 /*
150 * We don't support this since libfdt considers names with the
151 * name root but different @ suffix to be equal
152 */
153 if (strchr(name, '@')) {
154 err_msg = "Node name contains @";
155 goto error;
156 }
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900157 if (!strncmp(name, FIT_SIG_NODENAME,
158 strlen(FIT_SIG_NODENAME))) {
159 ret = fit_image_check_sig(fit, noffset, data,
160 size, -1, &err_msg);
161 if (ret) {
162 puts("- ");
163 } else {
164 puts("+ ");
165 verified = 1;
166 break;
167 }
168 }
169 }
170
171 if (noffset == -FDT_ERR_TRUNCATED || noffset == -FDT_ERR_BADSTRUCTURE) {
172 err_msg = "Corrupted or truncated tree";
173 goto error;
174 }
175
176 return verified ? 0 : -EPERM;
177
178error:
179 printf(" error!\n%s for '%s' hash node in '%s' image node\n",
180 err_msg, fit_get_name(fit, noffset, NULL),
181 fit_get_name(fit, image_noffset, NULL));
182 return -1;
183}
184
185int fit_image_verify_required_sigs(const void *fit, int image_noffset,
186 const char *data, size_t size,
Simon Glass4c5ff062021-11-12 12:28:08 -0700187 const void *key_blob, int *no_sigsp)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900188{
189 int verify_count = 0;
190 int noffset;
Simon Glass4c5ff062021-11-12 12:28:08 -0700191 int key_node;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900192
193 /* Work out what we need to verify */
194 *no_sigsp = 1;
Simon Glass4c5ff062021-11-12 12:28:08 -0700195 key_node = fdt_subnode_offset(key_blob, 0, FIT_SIG_NODENAME);
196 if (key_node < 0) {
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900197 debug("%s: No signature node found: %s\n", __func__,
Simon Glass4c5ff062021-11-12 12:28:08 -0700198 fdt_strerror(key_node));
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900199 return 0;
200 }
201
Simon Glass4c5ff062021-11-12 12:28:08 -0700202 fdt_for_each_subnode(noffset, key_blob, key_node) {
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900203 const char *required;
204 int ret;
205
Simon Glass4c5ff062021-11-12 12:28:08 -0700206 required = fdt_getprop(key_blob, noffset, FIT_KEY_REQUIRED,
Tom Rini7357a352020-04-07 11:58:44 -0400207 NULL);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900208 if (!required || strcmp(required, "image"))
209 continue;
210 ret = fit_image_verify_sig(fit, image_noffset, data, size,
Simon Glass4c5ff062021-11-12 12:28:08 -0700211 key_blob, noffset);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900212 if (ret) {
213 printf("Failed to verify required signature '%s'\n",
Simon Glass4c5ff062021-11-12 12:28:08 -0700214 fit_get_name(key_blob, noffset, NULL));
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900215 return ret;
216 }
217 verify_count++;
218 }
219
220 if (verify_count)
221 *no_sigsp = 0;
222
223 return 0;
224}
225
Tom Rini7357a352020-04-07 11:58:44 -0400226/**
227 * fit_config_check_sig() - Check the signature of a config
228 *
Simon Glasse3b21782021-11-12 12:28:09 -0700229 * Here we are looking at a particular signature that needs verification (here
230 * signature-1):
231 *
232 * configurations {
233 * default = "conf-1";
234 * conf-1 {
235 * kernel = "kernel-1";
236 * fdt = "fdt-1";
237 * signature-1 {
238 * algo = "sha1,rsa2048";
239 * value = <...conf 1 signature...>;
240 * };
241 * };
242 *
Tom Rini7357a352020-04-07 11:58:44 -0400243 * @fit: FIT to check
Simon Glasse3b21782021-11-12 12:28:09 -0700244 * @noffset: Offset of the signature node being checked (e.g.
245 * /configurations/conf-1/signature-1)
246 * @conf_noffset: Offset of configuration node (e.g. /configurations/conf-1)
247 * @required_keynode: Offset in @key_blob of the required key node,
Tom Rini7357a352020-04-07 11:58:44 -0400248 * if any. If this is given, then the configuration wil not
249 * pass verification unless that key is used. If this is
250 * -1 then any signature will do.
Tom Rini7357a352020-04-07 11:58:44 -0400251 * @err_msgp: In the event of an error, this will be pointed to a
252 * help error string to display to the user.
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +0100253 * Return: 0 if all verified ok, <0 on error
Tom Rini7357a352020-04-07 11:58:44 -0400254 */
Simon Glasse3b21782021-11-12 12:28:09 -0700255static int fit_config_check_sig(const void *fit, int noffset, int conf_noffset,
256 int required_keynode, char **err_msgp)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900257{
John Keeping741fc332021-04-20 19:19:44 +0100258 static char * const exc_prop[] = {
259 "data",
260 "data-size",
261 "data-position",
262 "data-offset"
263 };
264
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900265 const char *prop, *end, *name;
266 struct image_sign_info info;
267 const uint32_t *strings;
Tom Rini7357a352020-04-07 11:58:44 -0400268 const char *config_name;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900269 uint8_t *fit_value;
270 int fit_value_len;
Tom Rini7357a352020-04-07 11:58:44 -0400271 bool found_config;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900272 int max_regions;
273 int i, prop_len;
274 char path[200];
275 int count;
276
Tom Rini7357a352020-04-07 11:58:44 -0400277 config_name = fit_get_name(fit, conf_noffset, NULL);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900278 debug("%s: fdt=%p, conf='%s', sig='%s'\n", __func__, gd_fdt_blob(),
279 fit_get_name(fit, noffset, NULL),
280 fit_get_name(gd_fdt_blob(), required_keynode, NULL));
281 *err_msgp = NULL;
282 if (fit_image_setup_verify(&info, fit, noffset, required_keynode,
283 err_msgp))
284 return -1;
285
286 if (fit_image_hash_get_value(fit, noffset, &fit_value,
287 &fit_value_len)) {
288 *err_msgp = "Can't get hash value property";
289 return -1;
290 }
291
292 /* Count the number of strings in the property */
293 prop = fdt_getprop(fit, noffset, "hashed-nodes", &prop_len);
294 end = prop ? prop + prop_len : prop;
295 for (name = prop, count = 0; name < end; name++)
296 if (!*name)
297 count++;
298 if (!count) {
299 *err_msgp = "Can't get hashed-nodes property";
300 return -1;
301 }
302
303 if (prop && prop_len > 0 && prop[prop_len - 1] != '\0') {
304 *err_msgp = "hashed-nodes property must be null-terminated";
305 return -1;
306 }
307
308 /* Add a sanity check here since we are using the stack */
309 if (count > IMAGE_MAX_HASHED_NODES) {
310 *err_msgp = "Number of hashed nodes exceeds maximum";
311 return -1;
312 }
313
314 /* Create a list of node names from those strings */
315 char *node_inc[count];
316
317 debug("Hash nodes (%d):\n", count);
Tom Rini7357a352020-04-07 11:58:44 -0400318 found_config = false;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900319 for (name = prop, i = 0; name < end; name += strlen(name) + 1, i++) {
320 debug(" '%s'\n", name);
321 node_inc[i] = (char *)name;
Tom Rini7357a352020-04-07 11:58:44 -0400322 if (!strncmp(FIT_CONFS_PATH, name, strlen(FIT_CONFS_PATH)) &&
323 name[sizeof(FIT_CONFS_PATH) - 1] == '/' &&
324 !strcmp(name + sizeof(FIT_CONFS_PATH), config_name)) {
325 debug(" (found config node %s)", config_name);
326 found_config = true;
327 }
328 }
329 if (!found_config) {
330 *err_msgp = "Selected config not in hashed nodes";
331 return -1;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900332 }
333
334 /*
335 * Each node can generate one region for each sub-node. Allow for
336 * 7 sub-nodes (hash-1, signature-1, etc.) and some extra.
337 */
338 max_regions = 20 + count * 7;
339 struct fdt_region fdt_regions[max_regions];
340
341 /* Get a list of regions to hash */
342 count = fdt_find_regions(fit, node_inc, count,
343 exc_prop, ARRAY_SIZE(exc_prop),
344 fdt_regions, max_regions - 1,
345 path, sizeof(path), 0);
346 if (count < 0) {
347 *err_msgp = "Failed to hash configuration";
348 return -1;
349 }
350 if (count == 0) {
351 *err_msgp = "No data to hash";
352 return -1;
353 }
354 if (count >= max_regions - 1) {
355 *err_msgp = "Too many hash regions";
356 return -1;
357 }
358
359 /* Add the strings */
360 strings = fdt_getprop(fit, noffset, "hashed-strings", NULL);
361 if (strings) {
362 /*
363 * The strings region offset must be a static 0x0.
364 * This is set in tool/image-host.c
365 */
366 fdt_regions[count].offset = fdt_off_dt_strings(fit);
367 fdt_regions[count].size = fdt32_to_cpu(strings[1]);
368 count++;
369 }
370
371 /* Allocate the region list on the stack */
372 struct image_region region[count];
373
374 fit_region_make_list(fit, fdt_regions, count, region);
375 if (info.crypto->verify(&info, region, count, fit_value,
376 fit_value_len)) {
377 *err_msgp = "Verification failed";
378 return -1;
379 }
380
381 return 0;
382}
383
Simon Glass4c5ff062021-11-12 12:28:08 -0700384/**
385 * fit_config_verify_key() - Verify that a configuration is signed with a key
386 *
387 * Here we are looking at a particular configuration that needs verification:
388 *
389 * configurations {
390 * default = "conf-1";
391 * conf-1 {
392 * kernel = "kernel-1";
393 * fdt = "fdt-1";
394 * signature-1 {
395 * algo = "sha1,rsa2048";
396 * value = <...conf 1 signature...>;
397 * };
398 * };
399 *
400 * We must check each of the signature subnodes of conf-1. Hopefully one of them
401 * will match the key at key_offset.
402 *
403 * @fit: FIT to check
404 * @conf_noffset: Offset of the configuration node to check (e.g.
405 * /configurations/conf-1)
406 * @key_blob: Blob containing the keys to check against
407 * @key_offset: Offset of the key to check within @key_blob
408 * @return 0 if OK, -EPERM if any signatures did not verify, or the
409 * configuration node has an invalid name
410 */
411static int fit_config_verify_key(const void *fit, int conf_noffset,
412 const void *key_blob, int key_offset)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900413{
414 int noffset;
Alexandru Gagniuc72fdd3a2021-01-11 08:46:58 -0600415 char *err_msg = "No 'signature' subnode found";
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900416 int verified = 0;
417 int ret;
418
419 /* Process all hash subnodes of the component conf node */
420 fdt_for_each_subnode(noffset, fit, conf_noffset) {
421 const char *name = fit_get_name(fit, noffset, NULL);
422
423 if (!strncmp(name, FIT_SIG_NODENAME,
424 strlen(FIT_SIG_NODENAME))) {
Simon Glasse3b21782021-11-12 12:28:09 -0700425 ret = fit_config_check_sig(fit, noffset, conf_noffset,
426 key_offset, &err_msg);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900427 if (ret) {
428 puts("- ");
429 } else {
430 puts("+ ");
431 verified = 1;
432 break;
433 }
434 }
435 }
436
437 if (noffset == -FDT_ERR_TRUNCATED || noffset == -FDT_ERR_BADSTRUCTURE) {
438 err_msg = "Corrupted or truncated tree";
439 goto error;
440 }
441
Tom Rini7357a352020-04-07 11:58:44 -0400442 if (verified)
443 return 0;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900444
445error:
446 printf(" error!\n%s for '%s' hash node in '%s' config node\n",
447 err_msg, fit_get_name(fit, noffset, NULL),
448 fit_get_name(fit, conf_noffset, NULL));
Tom Rini7357a352020-04-07 11:58:44 -0400449 return -EPERM;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900450}
451
Simon Glass4c5ff062021-11-12 12:28:08 -0700452/**
453 * fit_config_verify_required_keys() - verify any required signatures for config
454 *
455 * This looks through all the signatures we expect and verifies that at least
456 * all the required ones are valid signatures for the configuration
457 *
458 * @fit: FIT to check
459 * @conf_noffset: Offset of the configuration node to check (e.g.
460 * /configurations/conf-1)
461 * @key_blob: Blob containing the keys to check against
462 * @return 0 if OK, -EPERM if any signatures did not verify, or the
463 * configuration node has an invalid name
464 */
465static int fit_config_verify_required_keys(const void *fit, int conf_noffset,
466 const void *key_blob)
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900467{
Simon Glass44338902021-02-15 17:08:06 -0700468 const char *name = fit_get_name(fit, conf_noffset, NULL);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900469 int noffset;
Simon Glass4c5ff062021-11-12 12:28:08 -0700470 int key_node;
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700471 int verified = 0;
472 int reqd_sigs = 0;
473 bool reqd_policy_all = true;
474 const char *reqd_mode;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900475
Simon Glass44338902021-02-15 17:08:06 -0700476 /*
477 * We don't support this since libfdt considers names with the
478 * name root but different @ suffix to be equal
479 */
480 if (strchr(name, '@')) {
481 printf("Configuration node '%s' contains '@'\n", name);
482 return -EPERM;
483 }
484
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900485 /* Work out what we need to verify */
Simon Glass4c5ff062021-11-12 12:28:08 -0700486 key_node = fdt_subnode_offset(key_blob, 0, FIT_SIG_NODENAME);
487 if (key_node < 0) {
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900488 debug("%s: No signature node found: %s\n", __func__,
Simon Glass4c5ff062021-11-12 12:28:08 -0700489 fdt_strerror(key_node));
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900490 return 0;
491 }
492
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700493 /* Get required-mode policy property from DTB */
Simon Glass4c5ff062021-11-12 12:28:08 -0700494 reqd_mode = fdt_getprop(key_blob, key_node, "required-mode", NULL);
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700495 if (reqd_mode && !strcmp(reqd_mode, "any"))
496 reqd_policy_all = false;
497
498 debug("%s: required-mode policy set to '%s'\n", __func__,
499 reqd_policy_all ? "all" : "any");
500
Simon Glass4c5ff062021-11-12 12:28:08 -0700501 /*
502 * The algorithm here is a little convoluted due to how we want it to
503 * work. Here we work through each of the signature nodes in the
504 * public-key area. These are in the U-Boot control devicetree. Each
505 * node was created by signing a configuration, so we check if it is
506 * 'required' and if so, request that it be verified.
507 */
508 fdt_for_each_subnode(noffset, key_blob, key_node) {
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900509 const char *required;
510 int ret;
511
Simon Glass4c5ff062021-11-12 12:28:08 -0700512 required = fdt_getprop(key_blob, noffset, FIT_KEY_REQUIRED,
Tom Rini7357a352020-04-07 11:58:44 -0400513 NULL);
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900514 if (!required || strcmp(required, "conf"))
515 continue;
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700516
517 reqd_sigs++;
518
Simon Glass4c5ff062021-11-12 12:28:08 -0700519 ret = fit_config_verify_key(fit, conf_noffset, key_blob,
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900520 noffset);
521 if (ret) {
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700522 if (reqd_policy_all) {
523 printf("Failed to verify required signature '%s'\n",
Simon Glass4c5ff062021-11-12 12:28:08 -0700524 fit_get_name(key_blob, noffset, NULL));
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700525 return ret;
526 }
527 } else {
528 verified++;
529 if (!reqd_policy_all)
530 break;
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900531 }
532 }
533
Thirupathaiah Annapureddy77564b02020-08-16 23:01:09 -0700534 if (reqd_sigs && !verified) {
535 printf("Failed to verify 'any' of the required signature(s)\n");
536 return -EPERM;
537 }
538
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900539 return 0;
540}
541
542int fit_config_verify(const void *fit, int conf_noffset)
543{
Simon Glass4c5ff062021-11-12 12:28:08 -0700544 return fit_config_verify_required_keys(fit, conf_noffset,
AKASHI Takahiro2223c7d2020-02-21 15:12:55 +0900545 gd_fdt_blob());
546}