1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2018, Google Inc.
4 * Written by Simon Glass <sjg@chromium.org>
10 #include <asm/state.h>
12 static int do_sb_handoff(cmd_tbl_t
*cmdtp
, int flag
, int argc
,
15 #if CONFIG_IS_ENABLED(HANDOFF)
17 printf("SPL handoff magic %lx\n", gd
->spl_handoff
->arch
.magic
);
19 printf("SPL handoff info not received\n");
23 printf("Command not supported\n");
29 static int do_sb_state(cmd_tbl_t
*cmdtp
, int flag
, int argc
,
32 struct sandbox_state
*state
;
34 state
= state_get_current();
40 static cmd_tbl_t cmd_sb_sub
[] = {
41 U_BOOT_CMD_MKENT(handoff
, 1, 0, do_sb_handoff
, "", ""),
42 U_BOOT_CMD_MKENT(state
, 1, 0, do_sb_state
, "", ""),
45 static int do_sb(cmd_tbl_t
*cmdtp
, int flag
, int argc
, char * const argv
[])
53 c
= find_cmd_tbl(argv
[0], cmd_sb_sub
, ARRAY_SIZE(cmd_sb_sub
));
55 return c
->cmd(cmdtp
, flag
, argc
, argv
);
62 "Sandbox status commands",
63 "handoff - Show handoff data received from SPL\n"
64 "sb state - Show sandbox state"