]>
Commit | Line | Data |
---|---|---|
47151e4b | 1 | /* |
2 | * Copyright 2015 Freescale Semiconductor, Inc. | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0+ | |
5 | */ | |
6 | ||
7 | #include <common.h> | |
8 | #include <command.h> | |
9 | #include <fsl_validate.h> | |
10 | ||
98cb0efd | 11 | static int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc, |
12 | char * const argv[]) | |
13 | { | |
14 | printf("Core is entering spin loop.\n"); | |
15 | loop: | |
16 | goto loop; | |
17 | ||
18 | return 0; | |
19 | } | |
20 | ||
47151e4b | 21 | static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc, |
22 | char * const argv[]) | |
23 | { | |
24 | if (argc < 2) | |
25 | return cmd_usage(cmdtp); | |
26 | ||
27 | return fsl_secboot_validate(cmdtp, flag, argc, argv); | |
28 | } | |
29 | ||
30 | /***************************************************/ | |
31 | static char esbc_validate_help_text[] = | |
32 | "esbc_validate hdr_addr <hash_val> - Validates signature using\n" | |
33 | " RSA verification\n" | |
34 | " $hdr_addr Address of header of the image\n" | |
35 | " to be validated.\n" | |
36 | " $hash_val -Optional\n" | |
37 | " It provides Hash of public/srk key to be\n" | |
38 | " used to verify signature.\n"; | |
39 | ||
40 | U_BOOT_CMD( | |
41 | esbc_validate, 3, 0, do_esbc_validate, | |
42 | "Validates signature on a given image using RSA verification", | |
43 | esbc_validate_help_text | |
44 | ); | |
98cb0efd | 45 | |
46 | U_BOOT_CMD( | |
47 | esbc_halt, 1, 0, do_esbc_halt, | |
48 | "Put the core in spin loop ", | |
49 | "" | |
50 | ); |