| // SPDX-License-Identifier: GPL-2.0+ |
| * Renesas Solutions Corp. |
| * Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> |
| * Linux SuperH zImage loading and boot |
| int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc, |
| ulong (*zboot_entry)(int, char * const []) = NULL; |
| unsigned char *param = NULL; |
| /* argv[1] holds the address of the zImage */ |
| /* argv[2] holds the address of zero page */ |
| zboot_entry = (ulong (*)(int, char * const []))hextoul(s0, |
| param = (unsigned char *)hextoul(s1, NULL); |
| /* Linux kernel command line */ |
| cmdline = (char *)param + COMMAND_LINE; |
| bootargs = env_get("bootargs"); |
| /* cppcheck-suppress nullPointer */ |
| memset(param, 0, 0x1000); |
| strcpy(cmdline, bootargs); |
| zimageboot, 3, 0, do_sh_zimageboot, |
| "Boot zImage for Renesas SH", |