blob: 8bbe85bb3ba616574881da7d13b311c1d61ed105 [file] [log] [blame]
gaurav ranac3a50422015-02-27 09:45:35 +05301/*
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
gaurav ranaf79323c2015-03-10 14:08:50 +053011static 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
gaurav ranac3a50422015-02-27 09:45:35 +053021static 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);
gaurav ranaf79323c2015-03-10 14:08:50 +053045
46U_BOOT_CMD(
47 esbc_halt, 1, 0, do_esbc_halt,
48 "Put the core in spin loop ",
49 ""
50);