]> Git Repo - J-u-boot.git/blame - include/bootm.h
bootm: Add tests for fixup_silent_linux()
[J-u-boot.git] / include / bootm.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
b6396403
SG
2/*
3 * (C) Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, [email protected].
b6396403
SG
5 */
6
7#ifndef _BOOTM_H
8#define _BOOTM_H
9
b6396403
SG
10#include <image.h>
11
09140113
SG
12struct cmd_tbl;
13
b6396403
SG
14#define BOOTM_ERR_RESET (-1)
15#define BOOTM_ERR_OVERLAP (-2)
16#define BOOTM_ERR_UNIMPLEMENTED (-3)
17
18/*
19 * Continue booting an OS image; caller already has:
20 * - copied image header to global variable `header'
21 * - checked header magic number, checksums (both header & image),
22 * - verified image architecture (PPC) and type (KERNEL or MULTI),
23 * - loaded (first part of) image to header load address,
24 * - disabled interrupts.
25 *
26 * @flag: Flags indicating what to do (BOOTM_STATE_...)
27 * @argc: Number of arguments. Note that the arguments are shifted down
28 * so that 0 is the first argument not processed by U-Boot, and
29 * argc is adjusted accordingly. This avoids confusion as to how
30 * many arguments are available for the OS.
31 * @images: Pointers to os/initrd/fdt
32 * @return 1 on error. On success the OS boots so this function does
33 * not return.
34 */
09140113 35typedef int boot_os_fn(int flag, int argc, char *const argv[],
b6396403
SG
36 bootm_headers_t *images);
37
38extern boot_os_fn do_bootm_linux;
f2a53c76
BM
39extern boot_os_fn do_bootm_vxworks;
40
09140113 41int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
b6396403
SG
42void lynxkdi_boot(image_header_t *hdr);
43
44boot_os_fn *bootm_os_get_boot_func(int os);
45
93e07880 46#if defined(CONFIG_FIT_SIGNATURE)
ce1400f6 47int bootm_host_load_images(const void *fit, int cfg_noffset);
93e07880 48#endif
ce1400f6 49
09140113 50int boot_selected_os(int argc, char *const argv[], int state,
b6396403
SG
51 bootm_headers_t *images, boot_os_fn *boot_fn);
52
53ulong bootm_disable_interrupts(void);
54
d2b2ffe3 55/* This is a special function used by booti/bootz */
fbde7589
TK
56int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
57 ulong size);
b6396403 58
09140113
SG
59int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
60 char *const argv[], int states, bootm_headers_t *images,
61 int boot_progress);
b6396403 62
f1bd871a
JH
63void arch_preboot_os(void);
64
896019b1
SG
65/*
66 * boards should define this to disable devices when EFI exits from boot
67 * services.
68 *
69 * TODO([email protected]>): Update this to use driver model's device_remove().
70 */
329da485
SG
71void board_quiesce_devices(void);
72
f6c6df7e
HS
73/**
74 * switch_to_non_secure_mode() - switch to non-secure mode
75 */
76void switch_to_non_secure_mode(void);
77
73fdb955
HS
78/**
79 * arch_preboot_os() - arch specific configuration before booting
80 */
81void arch_preboot_os(void);
82
83/**
84 * board_preboot_os() - board specific configuration before booting
85 */
86void board_preboot_os(void);
87
f158ba15
SG
88/* Adjust the 'bootargs' to ensure that Linux boots silently, if required */
89void fixup_silent_linux(void);
90
b6396403 91#endif
This page took 0.400805 seconds and 4 git commands to generate.