1 // SPDX-License-Identifier: GPL-2.0+
4 * Renesas Solutions Corp.
5 * Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
9 * Linux SuperH zImage loading and boot
14 #include <asm/zimage.h>
16 int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
18 ulong (*zboot_entry)(int, char * const []) = NULL;
20 unsigned char *param = NULL;
27 /* argv[1] holds the address of the zImage */
29 /* argv[2] holds the address of zero page */
36 zboot_entry = (ulong (*)(int, char * const []))simple_strtoul(s0, NULL, 16);
40 param = (unsigned char*)simple_strtoul(s1, NULL, 16);
42 /* Linux kernel command line */
43 cmdline = (char *)param + COMMAND_LINE;
44 bootargs = env_get("bootargs");
47 /* cppcheck-suppress nullPointer */
48 memset(param, 0, 0x1000);
51 strcpy(cmdline, bootargs);
61 zimageboot, 3, 0, do_sh_zimageboot,
62 "Boot zImage for Renesas SH",