1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
13 #define BOOTM_ERR_RESET (-1)
14 #define BOOTM_ERR_OVERLAP (-2)
15 #define BOOTM_ERR_UNIMPLEMENTED (-3)
18 * Continue booting an OS image; caller already has:
19 * - copied image header to global variable `header'
20 * - checked header magic number, checksums (both header & image),
21 * - verified image architecture (PPC) and type (KERNEL or MULTI),
22 * - loaded (first part of) image to header load address,
23 * - disabled interrupts.
25 * @flag: Flags indicating what to do (BOOTM_STATE_...)
26 * @argc: Number of arguments. Note that the arguments are shifted down
27 * so that 0 is the first argument not processed by U-Boot, and
28 * argc is adjusted accordingly. This avoids confusion as to how
29 * many arguments are available for the OS.
30 * @images: Pointers to os/initrd/fdt
31 * @return 1 on error. On success the OS boots so this function does
34 typedef int boot_os_fn(int flag, int argc, char * const argv[],
35 bootm_headers_t *images);
37 extern boot_os_fn do_bootm_linux;
38 extern boot_os_fn do_bootm_vxworks;
40 int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
41 void lynxkdi_boot(image_header_t *hdr);
43 boot_os_fn *bootm_os_get_boot_func(int os);
45 #if defined(CONFIG_FIT_SIGNATURE)
46 int bootm_host_load_images(const void *fit, int cfg_noffset);
49 int boot_selected_os(int argc, char * const argv[], int state,
50 bootm_headers_t *images, boot_os_fn *boot_fn);
52 ulong bootm_disable_interrupts(void);
54 /* This is a special function used by booti/bootz */
55 int bootm_find_images(int flag, int argc, char * const argv[]);
57 int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
58 int states, bootm_headers_t *images, int boot_progress);
60 void arch_preboot_os(void);
63 * boards should define this to disable devices when EFI exits from boot
66 * TODO(sjg@chromium.org>): Update this to use driver model's device_remove().
68 void board_quiesce_devices(void);
71 * switch_to_non_secure_mode() - switch to non-secure mode
73 void switch_to_non_secure_mode(void);