2018-05-07 06:58:06 +09:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2002-11-18 09:14:45 +09:00
|
|
|
/*
|
2011-12-05 21:09:23 +09:00
|
|
|
* Copyright (c) 2011 The Chromium OS Authors.
|
2002-11-18 09:14:45 +09:00
|
|
|
* (C) Copyright 2002
|
2011-08-05 01:45:45 +09:00
|
|
|
* Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
|
2002-11-18 09:14:45 +09:00
|
|
|
*/
|
|
|
|
|
2003-06-28 06:31:46 +09:00
|
|
|
/*
|
2011-04-13 18:43:26 +09:00
|
|
|
* Linux x86 zImage and bzImage loading
|
2003-06-28 06:31:46 +09:00
|
|
|
*
|
|
|
|
* based on the procdure described in
|
2002-11-18 09:14:45 +09:00
|
|
|
* linux/Documentation/i386/boot.txt
|
|
|
|
*/
|
|
|
|
|
2020-11-05 01:59:13 +09:00
|
|
|
#define LOG_CATEGORY LOGC_BOOT
|
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
#include <common.h>
|
2020-05-11 02:40:03 +09:00
|
|
|
#include <command.h>
|
2019-08-02 00:46:50 +09:00
|
|
|
#include <env.h>
|
2019-11-15 04:57:42 +09:00
|
|
|
#include <irq_func.h>
|
2020-11-05 01:59:13 +09:00
|
|
|
#include <log.h>
|
2018-03-27 10:06:54 +09:00
|
|
|
#include <malloc.h>
|
2020-04-09 07:57:36 +09:00
|
|
|
#include <acpi/acpi_table.h>
|
2002-11-18 09:14:45 +09:00
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
#include <asm/zimage.h>
|
|
|
|
#include <asm/byteorder.h>
|
2014-10-20 12:11:20 +09:00
|
|
|
#include <asm/bootm.h>
|
2010-04-23 23:05:49 +09:00
|
|
|
#include <asm/bootparam.h>
|
2012-10-24 03:04:34 +09:00
|
|
|
#ifdef CONFIG_SYS_COREBOOT
|
|
|
|
#include <asm/arch/timestamp.h>
|
|
|
|
#endif
|
2012-10-24 03:04:37 +09:00
|
|
|
#include <linux/compiler.h>
|
2020-11-05 01:59:14 +09:00
|
|
|
#include <linux/ctype.h>
|
2018-03-27 10:06:54 +09:00
|
|
|
#include <linux/libfdt.h>
|
2002-11-18 09:14:45 +09:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Memory lay-out:
|
2003-06-28 06:31:46 +09:00
|
|
|
*
|
2002-11-18 09:14:45 +09:00
|
|
|
* relative to setup_base (which is 0x90000 currently)
|
2003-06-28 06:31:46 +09:00
|
|
|
*
|
|
|
|
* 0x0000-0x7FFF Real mode kernel
|
2002-11-18 09:14:45 +09:00
|
|
|
* 0x8000-0x8FFF Stack and heap
|
|
|
|
* 0x9000-0x90FF Kernel command line
|
|
|
|
*/
|
2011-11-08 11:33:15 +09:00
|
|
|
#define DEFAULT_SETUP_BASE 0x90000
|
|
|
|
#define COMMAND_LINE_OFFSET 0x9000
|
|
|
|
#define HEAP_END_OFFSET 0x8e00
|
2002-11-18 09:14:45 +09:00
|
|
|
|
2011-11-08 11:33:15 +09:00
|
|
|
#define COMMAND_LINE_SIZE 2048
|
2002-11-18 09:14:45 +09:00
|
|
|
|
2020-09-06 05:50:38 +09:00
|
|
|
/**
|
|
|
|
* struct zboot_state - Current state of the boot
|
|
|
|
*
|
|
|
|
* @bzimage_addr: Address of the bzImage to boot
|
|
|
|
* @bzimage_size: Size of the bzImage, or 0 to detect this
|
|
|
|
* @initrd_addr: Address of the initial ramdisk, or 0 if none
|
|
|
|
* @initrd_size: Size of the initial ramdisk, or 0 if none
|
|
|
|
* @load_address: Address where the bzImage is moved before booting, either
|
|
|
|
* BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR
|
2020-09-06 05:50:44 +09:00
|
|
|
* @base_ptr: Pointer to the boot parameters, typically at address
|
|
|
|
* DEFAULT_SETUP_BASE
|
2020-09-06 05:50:51 +09:00
|
|
|
* @cmdline: Address of 'override' command line, or 0 to use the one in the
|
|
|
|
* setup block
|
2020-09-06 05:50:38 +09:00
|
|
|
*/
|
|
|
|
struct zboot_state {
|
|
|
|
ulong bzimage_addr;
|
|
|
|
ulong bzimage_size;
|
|
|
|
ulong initrd_addr;
|
|
|
|
ulong initrd_size;
|
|
|
|
ulong load_address;
|
2020-09-06 05:50:44 +09:00
|
|
|
struct boot_params *base_ptr;
|
2020-09-06 05:50:51 +09:00
|
|
|
ulong cmdline;
|
2020-09-06 05:50:38 +09:00
|
|
|
} state;
|
|
|
|
|
2020-09-06 05:50:43 +09:00
|
|
|
enum {
|
|
|
|
ZBOOT_STATE_START = BIT(0),
|
2020-09-06 05:50:46 +09:00
|
|
|
ZBOOT_STATE_LOAD = BIT(1),
|
2020-09-06 05:50:47 +09:00
|
|
|
ZBOOT_STATE_SETUP = BIT(2),
|
|
|
|
ZBOOT_STATE_INFO = BIT(3),
|
|
|
|
ZBOOT_STATE_GO = BIT(4),
|
2020-09-06 05:50:43 +09:00
|
|
|
|
2020-09-06 05:50:50 +09:00
|
|
|
/* This one doesn't execute automatically, so stop the count before 5 */
|
|
|
|
ZBOOT_STATE_DUMP = BIT(5),
|
2020-09-06 05:50:47 +09:00
|
|
|
ZBOOT_STATE_COUNT = 5,
|
2020-09-06 05:50:43 +09:00
|
|
|
};
|
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
static void build_command_line(char *command_line, int auto_boot)
|
|
|
|
{
|
|
|
|
char *env_command_line;
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
command_line[0] = '\0';
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2017-08-04 03:22:12 +09:00
|
|
|
env_command_line = env_get("bootargs");
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* set console= argument if we use a serial console */
|
2011-11-08 11:33:15 +09:00
|
|
|
if (!strstr(env_command_line, "console=")) {
|
2017-08-04 03:22:12 +09:00
|
|
|
if (!strcmp(env_get("stdout"), "serial")) {
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* We seem to use serial console */
|
2003-06-28 06:31:46 +09:00
|
|
|
sprintf(command_line, "console=ttyS0,%s ",
|
2017-08-04 03:22:12 +09:00
|
|
|
env_get("baudrate"));
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-11-08 11:33:15 +09:00
|
|
|
if (auto_boot)
|
2002-11-18 09:14:45 +09:00
|
|
|
strcat(command_line, "auto ");
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-11-08 11:33:15 +09:00
|
|
|
if (env_command_line)
|
2002-11-18 09:14:45 +09:00
|
|
|
strcat(command_line, env_command_line);
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
printf("Kernel command line: \"%s\"\n", command_line);
|
|
|
|
}
|
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
static int kernel_magic_ok(struct setup_header *hdr)
|
2002-11-18 09:14:45 +09:00
|
|
|
{
|
2010-04-23 23:05:49 +09:00
|
|
|
if (KERNEL_MAGIC != hdr->boot_flag) {
|
2011-12-05 21:09:23 +09:00
|
|
|
printf("Error: Invalid Boot Flag "
|
|
|
|
"(found 0x%04x, expected 0x%04x)\n",
|
|
|
|
hdr->boot_flag, KERNEL_MAGIC);
|
2002-11-18 09:14:45 +09:00
|
|
|
return 0;
|
2010-04-23 23:05:49 +09:00
|
|
|
} else {
|
|
|
|
printf("Valid Boot Flag\n");
|
2011-12-05 21:09:26 +09:00
|
|
|
return 1;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2011-12-05 21:09:26 +09:00
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2020-09-06 05:50:40 +09:00
|
|
|
static int get_boot_protocol(struct setup_header *hdr, bool verbose)
|
2011-12-05 21:09:26 +09:00
|
|
|
{
|
|
|
|
if (hdr->header == KERNEL_V2_MAGIC) {
|
2020-09-06 05:50:40 +09:00
|
|
|
if (verbose)
|
|
|
|
printf("Magic signature found\n");
|
2011-12-05 21:09:26 +09:00
|
|
|
return hdr->version;
|
2002-11-18 09:14:45 +09:00
|
|
|
} else {
|
|
|
|
/* Very old kernel */
|
2020-09-06 05:50:40 +09:00
|
|
|
if (verbose)
|
|
|
|
printf("Magic signature not found\n");
|
2011-12-05 21:09:26 +09:00
|
|
|
return 0x0100;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2011-12-05 21:09:26 +09:00
|
|
|
}
|
|
|
|
|
2018-03-27 10:06:54 +09:00
|
|
|
static int setup_device_tree(struct setup_header *hdr, const void *fdt_blob)
|
|
|
|
{
|
2020-09-06 05:50:40 +09:00
|
|
|
int bootproto = get_boot_protocol(hdr, false);
|
2018-03-27 10:06:54 +09:00
|
|
|
struct setup_data *sd;
|
|
|
|
int size;
|
|
|
|
|
|
|
|
if (bootproto < 0x0209)
|
|
|
|
return -ENOTSUPP;
|
|
|
|
|
|
|
|
if (!fdt_blob)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
size = fdt_totalsize(fdt_blob);
|
|
|
|
if (size < 0)
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
size += sizeof(struct setup_data);
|
|
|
|
sd = (struct setup_data *)malloc(size);
|
|
|
|
if (!sd) {
|
|
|
|
printf("Not enough memory for DTB setup data\n");
|
|
|
|
return -ENOMEM;
|
|
|
|
}
|
|
|
|
|
|
|
|
sd->next = hdr->setup_data;
|
|
|
|
sd->type = SETUP_DTB;
|
|
|
|
sd->len = fdt_totalsize(fdt_blob);
|
|
|
|
memcpy(sd->data, fdt_blob, sd->len);
|
|
|
|
hdr->setup_data = (unsigned long)sd;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:40 +09:00
|
|
|
static const char *get_kernel_version(struct boot_params *params,
|
|
|
|
void *kernel_base)
|
|
|
|
{
|
|
|
|
struct setup_header *hdr = ¶ms->hdr;
|
|
|
|
int bootproto;
|
2020-11-05 01:59:14 +09:00
|
|
|
const char *s, *end;
|
2020-09-06 05:50:40 +09:00
|
|
|
|
|
|
|
bootproto = get_boot_protocol(hdr, false);
|
|
|
|
if (bootproto < 0x0200 || hdr->setup_sects < 15)
|
|
|
|
return NULL;
|
|
|
|
|
2020-11-05 01:59:14 +09:00
|
|
|
/* sanity-check the kernel version in case it is missing */
|
|
|
|
for (s = kernel_base + hdr->kernel_version + 0x200, end = s + 0x100; *s;
|
|
|
|
s++) {
|
|
|
|
if (!isprint(*s))
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:40 +09:00
|
|
|
return kernel_base + hdr->kernel_version + 0x200;
|
|
|
|
}
|
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
struct boot_params *load_zimage(char *image, unsigned long kernel_size,
|
2014-10-10 23:21:56 +09:00
|
|
|
ulong *load_addressp)
|
2011-12-05 21:09:26 +09:00
|
|
|
{
|
|
|
|
struct boot_params *setup_base;
|
2020-09-06 05:50:40 +09:00
|
|
|
const char *version;
|
2011-12-05 21:09:26 +09:00
|
|
|
int setup_size;
|
|
|
|
int bootproto;
|
|
|
|
int big_image;
|
|
|
|
|
|
|
|
struct boot_params *params = (struct boot_params *)image;
|
|
|
|
struct setup_header *hdr = ¶ms->hdr;
|
|
|
|
|
|
|
|
/* base address for real-mode segment */
|
|
|
|
setup_base = (struct boot_params *)DEFAULT_SETUP_BASE;
|
|
|
|
|
|
|
|
if (!kernel_magic_ok(hdr))
|
|
|
|
return 0;
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* determine size of setup */
|
2010-04-23 23:05:49 +09:00
|
|
|
if (0 == hdr->setup_sects) {
|
2020-11-05 01:59:15 +09:00
|
|
|
log_warning("Setup Sectors = 0 (defaulting to 4)\n");
|
2002-11-18 09:14:45 +09:00
|
|
|
setup_size = 5 * 512;
|
|
|
|
} else {
|
2010-04-23 23:05:49 +09:00
|
|
|
setup_size = (hdr->setup_sects + 1) * 512;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2020-11-05 01:59:15 +09:00
|
|
|
log_debug("Setup Size = 0x%8.8lx\n", (ulong)setup_size);
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2011-11-08 11:33:15 +09:00
|
|
|
if (setup_size > SETUP_MAX_SIZE)
|
2002-11-18 09:14:45 +09:00
|
|
|
printf("Error: Setup is too large (%d bytes)\n", setup_size);
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
/* determine boot protocol version */
|
2020-09-06 05:50:40 +09:00
|
|
|
bootproto = get_boot_protocol(hdr, true);
|
2011-12-05 21:09:26 +09:00
|
|
|
|
2020-11-05 01:59:15 +09:00
|
|
|
log_debug("Using boot protocol version %x.%02x\n",
|
|
|
|
(bootproto & 0xff00) >> 8, bootproto & 0xff);
|
2011-12-05 21:09:26 +09:00
|
|
|
|
2020-09-06 05:50:40 +09:00
|
|
|
version = get_kernel_version(params, image);
|
|
|
|
if (version)
|
|
|
|
printf("Linux kernel version %s\n", version);
|
|
|
|
else
|
|
|
|
printf("Setup Sectors < 15 - Cannot print kernel version\n");
|
2011-12-05 21:09:26 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* Determine image type */
|
2011-11-08 11:33:15 +09:00
|
|
|
big_image = (bootproto >= 0x0200) &&
|
|
|
|
(hdr->loadflags & BIG_KERNEL_FLAG);
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2010-04-23 23:05:49 +09:00
|
|
|
/* Determine load address */
|
2011-12-05 21:09:23 +09:00
|
|
|
if (big_image)
|
2014-10-10 23:21:56 +09:00
|
|
|
*load_addressp = BZIMAGE_LOAD_ADDR;
|
2011-12-05 21:09:23 +09:00
|
|
|
else
|
2014-10-10 23:21:56 +09:00
|
|
|
*load_addressp = ZIMAGE_LOAD_ADDR;
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-12-05 21:09:24 +09:00
|
|
|
printf("Building boot_params at 0x%8.8lx\n", (ulong)setup_base);
|
|
|
|
memset(setup_base, 0, sizeof(*setup_base));
|
|
|
|
setup_base->hdr = params->hdr;
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
if (bootproto >= 0x0204)
|
|
|
|
kernel_size = hdr->syssize * 16;
|
|
|
|
else
|
|
|
|
kernel_size -= setup_size;
|
2003-06-28 06:31:46 +09:00
|
|
|
|
|
|
|
if (bootproto == 0x0100) {
|
2011-11-08 11:33:15 +09:00
|
|
|
/*
|
|
|
|
* A very old kernel MUST have its real-mode code
|
|
|
|
* loaded at 0x90000
|
|
|
|
*/
|
2017-01-16 23:03:35 +09:00
|
|
|
if ((ulong)setup_base != 0x90000) {
|
2002-11-18 09:14:45 +09:00
|
|
|
/* Copy the real-mode kernel */
|
2011-11-08 11:33:15 +09:00
|
|
|
memmove((void *)0x90000, setup_base, setup_size);
|
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* Copy the command line */
|
2011-11-08 11:33:15 +09:00
|
|
|
memmove((void *)0x99000,
|
2011-12-05 21:09:23 +09:00
|
|
|
(u8 *)setup_base + COMMAND_LINE_OFFSET,
|
2011-11-08 11:33:15 +09:00
|
|
|
COMMAND_LINE_SIZE);
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-11-08 11:33:15 +09:00
|
|
|
/* Relocated */
|
2011-12-05 21:09:23 +09:00
|
|
|
setup_base = (struct boot_params *)0x90000;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
/* It is recommended to clear memory up to the 32K mark */
|
2011-12-05 21:09:23 +09:00
|
|
|
memset((u8 *)0x90000 + setup_size, 0,
|
|
|
|
SETUP_MAX_SIZE - setup_size);
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
if (big_image) {
|
|
|
|
if (kernel_size > BZIMAGE_MAX_SIZE) {
|
|
|
|
printf("Error: bzImage kernel too big! "
|
|
|
|
"(size: %ld, max: %d)\n",
|
|
|
|
kernel_size, BZIMAGE_MAX_SIZE);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
} else if ((kernel_size) > ZIMAGE_MAX_SIZE) {
|
|
|
|
printf("Error: zImage kernel too big! (size: %ld, max: %d)\n",
|
|
|
|
kernel_size, ZIMAGE_MAX_SIZE);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-10-10 23:21:56 +09:00
|
|
|
printf("Loading %s at address %lx (%ld bytes)\n",
|
|
|
|
big_image ? "bzImage" : "zImage", *load_addressp, kernel_size);
|
2011-12-05 21:09:26 +09:00
|
|
|
|
2014-10-10 23:21:56 +09:00
|
|
|
memmove((void *)*load_addressp, image + setup_size, kernel_size);
|
2011-12-05 21:09:26 +09:00
|
|
|
|
|
|
|
return setup_base;
|
|
|
|
}
|
|
|
|
|
|
|
|
int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
|
2020-09-06 05:50:51 +09:00
|
|
|
ulong initrd_addr, ulong initrd_size, ulong cmdline_force)
|
2011-12-05 21:09:26 +09:00
|
|
|
{
|
|
|
|
struct setup_header *hdr = &setup_base->hdr;
|
2020-09-06 05:50:40 +09:00
|
|
|
int bootproto = get_boot_protocol(hdr, false);
|
2011-12-05 21:09:26 +09:00
|
|
|
|
2020-11-05 01:59:13 +09:00
|
|
|
log_debug("Setup E820 entries\n");
|
2011-12-05 21:09:26 +09:00
|
|
|
setup_base->e820_entries = install_e820_map(
|
|
|
|
ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map);
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
if (bootproto == 0x0100) {
|
|
|
|
setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
|
|
|
|
setup_base->screen_info.cl_offset = COMMAND_LINE_OFFSET;
|
|
|
|
}
|
2002-11-18 09:14:45 +09:00
|
|
|
if (bootproto >= 0x0200) {
|
2020-09-06 05:50:41 +09:00
|
|
|
hdr->type_of_loader = 0x80; /* U-Boot version 0 */
|
2002-11-18 09:14:45 +09:00
|
|
|
if (initrd_addr) {
|
2011-12-05 21:09:23 +09:00
|
|
|
printf("Initial RAM disk at linear address "
|
|
|
|
"0x%08lx, size %ld bytes\n",
|
2002-11-18 09:14:45 +09:00
|
|
|
initrd_addr, initrd_size);
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2010-04-23 23:05:49 +09:00
|
|
|
hdr->ramdisk_image = initrd_addr;
|
|
|
|
hdr->ramdisk_size = initrd_size;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2002-11-18 09:14:45 +09:00
|
|
|
if (bootproto >= 0x0201) {
|
2010-04-23 23:05:49 +09:00
|
|
|
hdr->heap_end_ptr = HEAP_END_OFFSET;
|
|
|
|
hdr->loadflags |= HEAP_FLAG;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
2003-06-28 06:31:46 +09:00
|
|
|
|
2014-10-20 12:11:21 +09:00
|
|
|
if (cmd_line) {
|
2020-11-05 01:59:13 +09:00
|
|
|
log_debug("Setup cmdline\n");
|
2014-10-20 12:11:21 +09:00
|
|
|
if (bootproto >= 0x0202) {
|
|
|
|
hdr->cmd_line_ptr = (uintptr_t)cmd_line;
|
|
|
|
} else if (bootproto >= 0x0200) {
|
|
|
|
setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
|
|
|
|
setup_base->screen_info.cl_offset =
|
|
|
|
(uintptr_t)cmd_line - (uintptr_t)setup_base;
|
|
|
|
|
|
|
|
hdr->setup_move_size = 0x9100;
|
|
|
|
}
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2014-10-20 12:11:21 +09:00
|
|
|
/* build command line at COMMAND_LINE_OFFSET */
|
2020-09-06 05:50:51 +09:00
|
|
|
if (cmdline_force)
|
|
|
|
strcpy(cmd_line, (char *)cmdline_force);
|
|
|
|
else
|
|
|
|
build_command_line(cmd_line, auto_boot);
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:39 +09:00
|
|
|
if (IS_ENABLED(CONFIG_INTEL_MID) && bootproto >= 0x0207)
|
2018-01-11 02:40:14 +09:00
|
|
|
hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
|
|
|
|
|
2020-09-06 05:50:39 +09:00
|
|
|
if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE))
|
|
|
|
setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr();
|
2019-09-14 00:42:00 +09:00
|
|
|
|
2020-11-05 01:59:13 +09:00
|
|
|
log_debug("Setup devicetree\n");
|
2018-03-27 10:06:54 +09:00
|
|
|
setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0));
|
2015-07-06 17:31:36 +09:00
|
|
|
setup_video(&setup_base->screen_info);
|
|
|
|
|
2020-09-06 05:50:39 +09:00
|
|
|
if (IS_ENABLED(CONFIG_EFI_STUB))
|
|
|
|
setup_efi_info(&setup_base->efi_info);
|
2018-08-24 00:24:10 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
return 0;
|
2002-11-18 09:14:45 +09:00
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:43 +09:00
|
|
|
static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
2010-04-23 23:05:49 +09:00
|
|
|
{
|
2020-09-06 05:50:43 +09:00
|
|
|
const char *s;
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2020-09-06 05:50:38 +09:00
|
|
|
memset(&state, '\0', sizeof(state));
|
2011-12-05 21:09:23 +09:00
|
|
|
if (argc >= 2) {
|
2010-10-07 18:03:19 +09:00
|
|
|
/* argv[1] holds the address of the bzImage */
|
|
|
|
s = argv[1];
|
2011-12-05 21:09:23 +09:00
|
|
|
} else {
|
2017-08-04 03:22:12 +09:00
|
|
|
s = env_get("fileaddr");
|
2011-12-05 21:09:23 +09:00
|
|
|
}
|
2010-10-07 18:03:19 +09:00
|
|
|
|
|
|
|
if (s)
|
2020-09-06 05:50:38 +09:00
|
|
|
state.bzimage_addr = simple_strtoul(s, NULL, 16);
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2011-12-05 21:09:27 +09:00
|
|
|
if (argc >= 3) {
|
2010-10-07 18:03:19 +09:00
|
|
|
/* argv[2] holds the size of the bzImage */
|
2020-09-06 05:50:38 +09:00
|
|
|
state.bzimage_size = simple_strtoul(argv[2], NULL, 16);
|
2011-12-05 21:09:27 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
if (argc >= 4)
|
2020-09-06 05:50:38 +09:00
|
|
|
state.initrd_addr = simple_strtoul(argv[3], NULL, 16);
|
2011-12-05 21:09:27 +09:00
|
|
|
if (argc >= 5)
|
2020-09-06 05:50:38 +09:00
|
|
|
state.initrd_size = simple_strtoul(argv[4], NULL, 16);
|
2020-09-06 05:50:49 +09:00
|
|
|
if (argc >= 6) {
|
|
|
|
/*
|
|
|
|
* When the base_ptr is passed in, we assume that the image is
|
|
|
|
* already loaded at the address given by argv[1] and therefore
|
|
|
|
* the original bzImage is somewhere else, or not accessible.
|
|
|
|
* In any case, we don't need access to the bzImage since all
|
|
|
|
* the processing is assumed to be done.
|
|
|
|
*
|
|
|
|
* So set the base_ptr to the given address, use this arg as the
|
|
|
|
* load address and set bzimage_addr to 0 so we know that it
|
|
|
|
* cannot be proceesed (or processed again).
|
|
|
|
*/
|
|
|
|
state.base_ptr = (void *)simple_strtoul(argv[5], NULL, 16);
|
|
|
|
state.load_address = state.bzimage_addr;
|
|
|
|
state.bzimage_addr = 0;
|
|
|
|
}
|
2020-09-06 05:50:51 +09:00
|
|
|
if (argc >= 7)
|
|
|
|
state.cmdline = simple_strtoul(argv[6], NULL, 16);
|
2010-04-23 23:05:49 +09:00
|
|
|
|
2020-09-06 05:50:46 +09:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
|
|
|
{
|
|
|
|
struct boot_params *base_ptr;
|
|
|
|
|
2020-09-06 05:50:49 +09:00
|
|
|
if (state.base_ptr) {
|
|
|
|
struct boot_params *from = (struct boot_params *)state.base_ptr;
|
|
|
|
|
|
|
|
base_ptr = (struct boot_params *)DEFAULT_SETUP_BASE;
|
2020-11-05 01:59:15 +09:00
|
|
|
log_debug("Building boot_params at 0x%8.8lx\n",
|
|
|
|
(ulong)base_ptr);
|
2020-09-06 05:50:49 +09:00
|
|
|
memset(base_ptr, '\0', sizeof(*base_ptr));
|
|
|
|
base_ptr->hdr = from->hdr;
|
|
|
|
} else {
|
|
|
|
base_ptr = load_zimage((void *)state.bzimage_addr, state.bzimage_size,
|
|
|
|
&state.load_address);
|
|
|
|
if (!base_ptr) {
|
|
|
|
puts("## Kernel loading failed ...\n");
|
|
|
|
return CMD_RET_FAILURE;
|
|
|
|
}
|
2010-04-23 23:05:49 +09:00
|
|
|
}
|
2020-09-06 05:50:44 +09:00
|
|
|
state.base_ptr = base_ptr;
|
2020-09-06 05:50:48 +09:00
|
|
|
if (env_set_hex("zbootbase", (ulong)base_ptr) ||
|
|
|
|
env_set_hex("zbootaddr", state.load_address))
|
|
|
|
return CMD_RET_FAILURE;
|
2020-09-06 05:50:38 +09:00
|
|
|
|
2020-09-06 05:50:47 +09:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
|
|
|
{
|
|
|
|
struct boot_params *base_ptr = state.base_ptr;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if (!base_ptr) {
|
|
|
|
printf("base is not set: use 'zboot load' first\n");
|
|
|
|
return CMD_RET_FAILURE;
|
|
|
|
}
|
|
|
|
ret = setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET,
|
2020-09-06 05:50:51 +09:00
|
|
|
0, state.initrd_addr, state.initrd_size,
|
|
|
|
state.cmdline);
|
2020-09-06 05:50:47 +09:00
|
|
|
if (ret) {
|
2014-10-10 23:21:59 +09:00
|
|
|
puts("Setting up boot parameters failed ...\n");
|
2020-09-06 05:50:47 +09:00
|
|
|
return CMD_RET_FAILURE;
|
2011-12-05 21:09:26 +09:00
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:44 +09:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:45 +09:00
|
|
|
static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
|
|
|
{
|
|
|
|
printf("Kernel loaded at %08lx, setup_base=%p\n",
|
|
|
|
state.load_address, state.base_ptr);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:44 +09:00
|
|
|
static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2020-09-06 05:50:42 +09:00
|
|
|
disable_interrupts();
|
2020-09-06 05:50:44 +09:00
|
|
|
|
2011-12-05 21:09:26 +09:00
|
|
|
/* we assume that the kernel is in place */
|
2020-09-06 05:50:44 +09:00
|
|
|
ret = boot_linux_kernel((ulong)state.base_ptr, state.load_address,
|
|
|
|
false);
|
|
|
|
printf("Kernel returned! (err=%d)\n", ret);
|
|
|
|
|
|
|
|
return CMD_RET_FAILURE;
|
2010-04-23 23:05:49 +09:00
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:50 +09:00
|
|
|
static void print_num(const char *name, ulong value)
|
|
|
|
{
|
|
|
|
printf("%-20s: %lx\n", name, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void print_num64(const char *name, u64 value)
|
|
|
|
{
|
|
|
|
printf("%-20s: %llx\n", name, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *const e820_type_name[E820_COUNT] = {
|
|
|
|
[E820_RAM] = "RAM",
|
|
|
|
[E820_RESERVED] = "Reserved",
|
|
|
|
[E820_ACPI] = "ACPI",
|
|
|
|
[E820_NVS] = "ACPI NVS",
|
|
|
|
[E820_UNUSABLE] = "Unusable",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char *const bootloader_id[] = {
|
|
|
|
"LILO",
|
|
|
|
"Loadlin",
|
|
|
|
"bootsect-loader",
|
|
|
|
"Syslinux",
|
|
|
|
"Etherboot/gPXE/iPXE",
|
|
|
|
"ELILO",
|
|
|
|
"undefined",
|
|
|
|
"GRUB",
|
|
|
|
"U-Boot",
|
|
|
|
"Xen",
|
|
|
|
"Gujin",
|
|
|
|
"Qemu",
|
|
|
|
"Arcturus Networks uCbootloader",
|
|
|
|
"kexec-tools",
|
|
|
|
"Extended",
|
|
|
|
"Special",
|
|
|
|
"Reserved",
|
|
|
|
"Minimal Linux Bootloader",
|
|
|
|
"OVMF UEFI virtualization stack",
|
|
|
|
};
|
|
|
|
|
|
|
|
struct flag_info {
|
|
|
|
uint bit;
|
|
|
|
const char *name;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct flag_info load_flags[] = {
|
|
|
|
{ LOADED_HIGH, "loaded-high" },
|
|
|
|
{ QUIET_FLAG, "quiet" },
|
|
|
|
{ KEEP_SEGMENTS, "keep-segments" },
|
|
|
|
{ CAN_USE_HEAP, "can-use-heap" },
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct flag_info xload_flags[] = {
|
|
|
|
{ XLF_KERNEL_64, "64-bit-entry" },
|
|
|
|
{ XLF_CAN_BE_LOADED_ABOVE_4G, "can-load-above-4gb" },
|
|
|
|
{ XLF_EFI_HANDOVER_32, "32-efi-handoff" },
|
|
|
|
{ XLF_EFI_HANDOVER_64, "64-efi-handoff" },
|
|
|
|
{ XLF_EFI_KEXEC, "kexec-efi-runtime" },
|
|
|
|
};
|
|
|
|
|
|
|
|
static void print_flags(struct flag_info *flags, int count, uint value)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
printf("%-20s:", "");
|
|
|
|
for (i = 0; i < count; i++) {
|
|
|
|
uint mask = flags[i].bit;
|
|
|
|
|
|
|
|
if (value & mask)
|
|
|
|
printf(" %s", flags[i].name);
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void show_loader(struct setup_header *hdr)
|
|
|
|
{
|
|
|
|
bool version_valid = false;
|
|
|
|
int type, version;
|
|
|
|
const char *name;
|
|
|
|
|
|
|
|
type = hdr->type_of_loader >> 4;
|
|
|
|
version = hdr->type_of_loader & 0xf;
|
|
|
|
if (type == 0xe)
|
|
|
|
type = 0x10 + hdr->ext_loader_type;
|
|
|
|
version |= hdr->ext_loader_ver << 4;
|
|
|
|
if (!hdr->type_of_loader) {
|
|
|
|
name = "pre-2.00 bootloader";
|
|
|
|
} else if (hdr->type_of_loader == 0xff) {
|
|
|
|
name = "unknown";
|
|
|
|
} else if (type < ARRAY_SIZE(bootloader_id)) {
|
|
|
|
name = bootloader_id[type];
|
|
|
|
version_valid = true;
|
|
|
|
} else {
|
|
|
|
name = "undefined";
|
|
|
|
}
|
|
|
|
printf("%20s %s", "", name);
|
|
|
|
if (version_valid)
|
|
|
|
printf(", version %x", version);
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|
|
|
{
|
|
|
|
struct boot_params *base_ptr = state.base_ptr;
|
|
|
|
struct setup_header *hdr;
|
|
|
|
const char *version;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (argc > 1)
|
|
|
|
base_ptr = (void *)simple_strtoul(argv[1], NULL, 16);
|
|
|
|
if (!base_ptr) {
|
|
|
|
printf("No zboot setup_base\n");
|
|
|
|
return CMD_RET_FAILURE;
|
|
|
|
}
|
|
|
|
printf("Setup located at %p:\n\n", base_ptr);
|
|
|
|
print_num64("ACPI RSDP addr", base_ptr->acpi_rsdp_addr);
|
|
|
|
|
|
|
|
printf("E820: %d entries\n", base_ptr->e820_entries);
|
|
|
|
if (base_ptr->e820_entries) {
|
|
|
|
printf("%18s %16s %s\n", "Addr", "Size", "Type");
|
|
|
|
for (i = 0; i < base_ptr->e820_entries; i++) {
|
|
|
|
struct e820_entry *entry = &base_ptr->e820_map[i];
|
|
|
|
|
|
|
|
printf("%12llx %10llx %s\n", entry->addr, entry->size,
|
|
|
|
entry->type < E820_COUNT ?
|
|
|
|
e820_type_name[entry->type] :
|
|
|
|
simple_itoa(entry->type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
hdr = &base_ptr->hdr;
|
|
|
|
print_num("Setup sectors", hdr->setup_sects);
|
|
|
|
print_num("Root flags", hdr->root_flags);
|
|
|
|
print_num("Sys size", hdr->syssize);
|
|
|
|
print_num("RAM size", hdr->ram_size);
|
|
|
|
print_num("Video mode", hdr->vid_mode);
|
|
|
|
print_num("Root dev", hdr->root_dev);
|
|
|
|
print_num("Boot flag", hdr->boot_flag);
|
|
|
|
print_num("Jump", hdr->jump);
|
|
|
|
print_num("Header", hdr->header);
|
|
|
|
if (hdr->header == KERNEL_V2_MAGIC)
|
|
|
|
printf("%-20s %s\n", "", "Kernel V2");
|
|
|
|
else
|
|
|
|
printf("%-20s %s\n", "", "Ancient kernel, using version 100");
|
|
|
|
print_num("Version", hdr->version);
|
|
|
|
print_num("Real mode switch", hdr->realmode_swtch);
|
|
|
|
print_num("Start sys", hdr->start_sys);
|
|
|
|
print_num("Kernel version", hdr->kernel_version);
|
|
|
|
version = get_kernel_version(base_ptr, (void *)state.bzimage_addr);
|
|
|
|
if (version)
|
|
|
|
printf(" @%p: %s\n", version, version);
|
|
|
|
print_num("Type of loader", hdr->type_of_loader);
|
|
|
|
show_loader(hdr);
|
|
|
|
print_num("Load flags", hdr->loadflags);
|
|
|
|
print_flags(load_flags, ARRAY_SIZE(load_flags), hdr->loadflags);
|
|
|
|
print_num("Setup move size", hdr->setup_move_size);
|
|
|
|
print_num("Code32 start", hdr->code32_start);
|
|
|
|
print_num("Ramdisk image", hdr->ramdisk_image);
|
|
|
|
print_num("Ramdisk size", hdr->ramdisk_size);
|
|
|
|
print_num("Bootsect kludge", hdr->bootsect_kludge);
|
|
|
|
print_num("Heap end ptr", hdr->heap_end_ptr);
|
|
|
|
print_num("Ext loader ver", hdr->ext_loader_ver);
|
|
|
|
print_num("Ext loader type", hdr->ext_loader_type);
|
|
|
|
print_num("Command line ptr", hdr->cmd_line_ptr);
|
|
|
|
if (hdr->cmd_line_ptr) {
|
|
|
|
printf(" ");
|
|
|
|
/* Use puts() to avoid limits from CONFIG_SYS_PBSIZE */
|
2020-09-06 05:50:51 +09:00
|
|
|
puts((char *)(ulong)hdr->cmd_line_ptr);
|
2020-09-06 05:50:50 +09:00
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
print_num("Initrd addr max", hdr->initrd_addr_max);
|
|
|
|
print_num("Kernel alignment", hdr->kernel_alignment);
|
|
|
|
print_num("Relocatable kernel", hdr->relocatable_kernel);
|
|
|
|
print_num("Min alignment", hdr->min_alignment);
|
|
|
|
if (hdr->min_alignment)
|
|
|
|
printf("%-20s: %x\n", "", 1 << hdr->min_alignment);
|
|
|
|
print_num("Xload flags", hdr->xloadflags);
|
|
|
|
print_flags(xload_flags, ARRAY_SIZE(xload_flags), hdr->xloadflags);
|
|
|
|
print_num("Cmdline size", hdr->cmdline_size);
|
|
|
|
print_num("Hardware subarch", hdr->hardware_subarch);
|
|
|
|
print_num64("HW subarch data", hdr->hardware_subarch_data);
|
|
|
|
print_num("Payload offset", hdr->payload_offset);
|
|
|
|
print_num("Payload length", hdr->payload_length);
|
|
|
|
print_num64("Setup data", hdr->setup_data);
|
|
|
|
print_num64("Pref address", hdr->pref_address);
|
|
|
|
print_num("Init size", hdr->init_size);
|
|
|
|
print_num("Handover offset", hdr->handover_offset);
|
|
|
|
if (get_boot_protocol(hdr, false) >= 0x215)
|
|
|
|
print_num("Kernel info offset", hdr->kernel_info_offset);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:43 +09:00
|
|
|
/* Note: This defines the complete_zboot() function */
|
|
|
|
U_BOOT_SUBCMDS(zboot,
|
2020-09-06 05:50:51 +09:00
|
|
|
U_BOOT_CMD_MKENT(start, 8, 1, do_zboot_start, "", ""),
|
2020-09-06 05:50:46 +09:00
|
|
|
U_BOOT_CMD_MKENT(load, 1, 1, do_zboot_load, "", ""),
|
2020-09-06 05:50:47 +09:00
|
|
|
U_BOOT_CMD_MKENT(setup, 1, 1, do_zboot_setup, "", ""),
|
2020-09-06 05:50:45 +09:00
|
|
|
U_BOOT_CMD_MKENT(info, 1, 1, do_zboot_info, "", ""),
|
2020-09-06 05:50:44 +09:00
|
|
|
U_BOOT_CMD_MKENT(go, 1, 1, do_zboot_go, "", ""),
|
2020-09-06 05:50:50 +09:00
|
|
|
U_BOOT_CMD_MKENT(dump, 2, 1, do_zboot_dump, "", ""),
|
2020-09-06 05:50:43 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
int do_zboot_states(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[], int state_mask)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < ZBOOT_STATE_COUNT; i++) {
|
|
|
|
struct cmd_tbl *cmd = &zboot_subcmds[i];
|
|
|
|
int mask = 1 << i;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if (mask & state_mask) {
|
|
|
|
ret = cmd->cmd(cmd, flag, argc, argv);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int do_zboot_parent(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[], int *repeatable)
|
|
|
|
{
|
|
|
|
/* determine if we have a sub command */
|
|
|
|
if (argc > 1) {
|
|
|
|
char *endp;
|
|
|
|
|
|
|
|
simple_strtoul(argv[1], &endp, 16);
|
|
|
|
/*
|
|
|
|
* endp pointing to nul means that argv[1] was just a valid
|
|
|
|
* number, so pass it along to the normal processing
|
|
|
|
*/
|
|
|
|
if (*endp)
|
|
|
|
return do_zboot(cmdtp, flag, argc, argv, repeatable);
|
|
|
|
}
|
|
|
|
|
2020-09-06 05:50:44 +09:00
|
|
|
do_zboot_states(cmdtp, flag, argc, argv, ZBOOT_STATE_START |
|
2020-09-06 05:50:47 +09:00
|
|
|
ZBOOT_STATE_LOAD | ZBOOT_STATE_SETUP |
|
|
|
|
ZBOOT_STATE_INFO | ZBOOT_STATE_GO);
|
2020-09-06 05:50:43 +09:00
|
|
|
|
|
|
|
return CMD_RET_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
U_BOOT_CMDREP_COMPLETE(
|
2020-09-06 05:50:51 +09:00
|
|
|
zboot, 8, do_zboot_parent, "Boot bzImage",
|
|
|
|
"[addr] [size] [initrd addr] [initrd size] [setup] [cmdline]\n"
|
2011-12-05 21:09:27 +09:00
|
|
|
" addr - The optional starting address of the bzimage.\n"
|
|
|
|
" If not set it defaults to the environment\n"
|
|
|
|
" variable \"fileaddr\".\n"
|
|
|
|
" size - The optional size of the bzimage. Defaults to\n"
|
|
|
|
" zero.\n"
|
|
|
|
" initrd addr - The address of the initrd image to use, if any.\n"
|
|
|
|
" initrd size - The size of the initrd image to use, if any.\n"
|
2020-09-06 05:50:49 +09:00
|
|
|
" setup - The address of the kernel setup region, if this\n"
|
|
|
|
" is not at addr\n"
|
2020-09-06 05:50:51 +09:00
|
|
|
" cmdline - The address of the kernel command line, to\n"
|
|
|
|
" override U-Boot's normal cmdline generation\n"
|
2020-09-06 05:50:43 +09:00
|
|
|
"\n"
|
|
|
|
"Sub-commands to do part of the zboot sequence:\n"
|
2020-09-06 05:50:44 +09:00
|
|
|
"\tstart [addr [arg ...]] - specify arguments\n"
|
2020-09-06 05:50:46 +09:00
|
|
|
"\tload - load OS image\n"
|
2020-09-06 05:50:47 +09:00
|
|
|
"\tsetup - set up table\n"
|
2020-09-06 05:50:45 +09:00
|
|
|
"\tinfo - show summary info\n"
|
2020-09-06 05:50:50 +09:00
|
|
|
"\tgo - start OS\n"
|
|
|
|
"\tdump [addr] - dump info (optional address of boot params)",
|
2020-09-06 05:50:43 +09:00
|
|
|
complete_zboot
|
2010-04-23 23:05:49 +09:00
|
|
|
);
|