1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2018, Google Inc.
10 #include <asm/global_data.h>
11 #include <asm/state.h>
13 static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
16 #if CONFIG_IS_ENABLED(HANDOFF)
17 struct spl_handoff *handoff = handoff_get();
20 printf("SPL handoff magic %lx\n", handoff->arch.magic);
22 printf("SPL handoff info not received\n");
26 printf("Command not supported\n");
32 static int do_sb_state(struct cmd_tbl *cmdtp, int flag, int argc,
35 struct sandbox_state *state;
37 state = state_get_current();
43 static struct cmd_tbl cmd_sb_sub[] = {
44 U_BOOT_CMD_MKENT(handoff, 1, 0, do_sb_handoff, "", ""),
45 U_BOOT_CMD_MKENT(state, 1, 0, do_sb_state, "", ""),
48 static int do_sb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
56 c = find_cmd_tbl(argv[0], cmd_sb_sub, ARRAY_SIZE(cmd_sb_sub));
58 return c->cmd(cmdtp, flag, argc, argv);
65 "Sandbox status commands",
66 "handoff - Show handoff data received from SPL\n"
67 "sb state - Show sandbox state"