]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/freescale/common/cmd_esbc_validate.c
Merge branch 'master' of git://www.denx.de/git/u-boot-socfpga
[people/ms/u-boot.git] / board / freescale / common / cmd_esbc_validate.c
CommitLineData
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 11static 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");
15loop:
16 goto loop;
17
18 return 0;
19}
20
47151e4b 21static 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/***************************************************/
31static 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
40U_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
46U_BOOT_CMD(
47 esbc_halt, 1, 0, do_esbc_halt,
48 "Put the core in spin loop ",
49 ""
50);