blob: ade1e2ea926246a9fb4800070d9510572c0c05d5 [file] [log] [blame]
Heinrich Schuchardtf7d6b072018-12-26 17:20:35 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * The 'exception' command can be used for testing exception handling.
4 *
5 * Copyright (c) 2018, Heinrich Schuchardt <xypron.glpk@gmx.de>
6 */
7
8#include <common.h>
9#include <command.h>
10
11static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
12 char * const argv[])
13{
14 asm volatile (".word 0xffff\n");
15 return CMD_RET_FAILURE;
16}
17
18static cmd_tbl_t cmd_sub[] = {
19 U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
20 "", ""),
21};
22
23static char exception_help_text[] =
24 "<ex>\n"
25 " The following exceptions are available:\n"
26 " undefined - undefined instruction\n"
27 ;
28
29#include <exception.h>