wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 9 | #include <image.h> |
Daniel Schwierzeck | 8d7ff4d | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 10 | #include <fdt_support.h> |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 11 | #include <asm/addrspace.h> |
| 12 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 15 | #define LINUX_MAX_ENVS 256 |
| 16 | #define LINUX_MAX_ARGS 256 |
| 17 | |
Paul Burton | 10a74b5 | 2013-11-09 10:22:08 +0000 | [diff] [blame] | 18 | #if defined(CONFIG_MALTA) |
| 19 | #define mips_boot_malta 1 |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 20 | #else |
Paul Burton | 10a74b5 | 2013-11-09 10:22:08 +0000 | [diff] [blame] | 21 | #define mips_boot_malta 0 |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 22 | #endif |
| 23 | |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 24 | static int linux_argc; |
| 25 | static char **linux_argv; |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 26 | static char *linux_argp; |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 27 | |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 28 | static char **linux_env; |
| 29 | static char *linux_env_p; |
| 30 | static int linux_env_idx; |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 31 | |
Daniel Schwierzeck | 22d1c23 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 32 | static ulong arch_get_sp(void) |
| 33 | { |
| 34 | ulong ret; |
| 35 | |
| 36 | __asm__ __volatile__("move %0, $sp" : "=r"(ret) : ); |
| 37 | |
| 38 | return ret; |
| 39 | } |
| 40 | |
| 41 | void arch_lmb_reserve(struct lmb *lmb) |
| 42 | { |
| 43 | ulong sp; |
| 44 | |
| 45 | sp = arch_get_sp(); |
| 46 | debug("## Current stack ends at 0x%08lx\n", sp); |
| 47 | |
| 48 | /* adjust sp by 4K to be safe */ |
| 49 | sp -= 4096; |
| 50 | lmb_reserve(lmb, sp, CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp); |
| 51 | } |
| 52 | |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 53 | static void linux_cmdline_init(void) |
| 54 | { |
| 55 | linux_argc = 1; |
| 56 | linux_argv = (char **)UNCACHED_SDRAM(gd->bd->bi_boot_params); |
| 57 | linux_argv[0] = 0; |
| 58 | linux_argp = (char *)(linux_argv + LINUX_MAX_ARGS); |
| 59 | } |
| 60 | |
| 61 | static void linux_cmdline_set(const char *value, size_t len) |
| 62 | { |
| 63 | linux_argv[linux_argc] = linux_argp; |
| 64 | memcpy(linux_argp, value, len); |
| 65 | linux_argp[len] = 0; |
| 66 | |
| 67 | linux_argp += len + 1; |
| 68 | linux_argc++; |
| 69 | } |
| 70 | |
| 71 | static void linux_cmdline_dump(void) |
| 72 | { |
| 73 | int i; |
| 74 | |
| 75 | debug("## cmdline argv at 0x%p, argp at 0x%p\n", |
| 76 | linux_argv, linux_argp); |
| 77 | |
| 78 | for (i = 1; i < linux_argc; i++) |
| 79 | debug(" arg %03d: %s\n", i, linux_argv[i]); |
| 80 | } |
| 81 | |
Daniel Schwierzeck | f9749fa | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 82 | static void linux_cmdline_legacy(bootm_headers_t *images) |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 83 | { |
| 84 | const char *bootargs, *next, *quote; |
| 85 | |
| 86 | linux_cmdline_init(); |
| 87 | |
| 88 | bootargs = getenv("bootargs"); |
| 89 | if (!bootargs) |
| 90 | return; |
| 91 | |
| 92 | next = bootargs; |
| 93 | |
| 94 | while (bootargs && *bootargs && linux_argc < LINUX_MAX_ARGS) { |
| 95 | quote = strchr(bootargs, '"'); |
| 96 | next = strchr(bootargs, ' '); |
| 97 | |
| 98 | while (next && quote && quote < next) { |
| 99 | /* |
| 100 | * we found a left quote before the next blank |
| 101 | * now we have to find the matching right quote |
| 102 | */ |
| 103 | next = strchr(quote + 1, '"'); |
| 104 | if (next) { |
| 105 | quote = strchr(next + 1, '"'); |
| 106 | next = strchr(next + 1, ' '); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | if (!next) |
| 111 | next = bootargs + strlen(bootargs); |
| 112 | |
| 113 | linux_cmdline_set(bootargs, next - bootargs); |
| 114 | |
| 115 | if (*next) |
| 116 | next++; |
| 117 | |
| 118 | bootargs = next; |
| 119 | } |
Daniel Schwierzeck | f9749fa | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 120 | } |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 121 | |
Daniel Schwierzeck | 2edd528 | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 122 | static void linux_cmdline_append(bootm_headers_t *images) |
| 123 | { |
| 124 | char buf[24]; |
| 125 | ulong mem, rd_start, rd_size; |
| 126 | |
| 127 | /* append mem */ |
| 128 | mem = gd->ram_size >> 20; |
| 129 | sprintf(buf, "mem=%luM", mem); |
| 130 | linux_cmdline_set(buf, strlen(buf)); |
| 131 | |
| 132 | /* append rd_start and rd_size */ |
| 133 | rd_start = images->initrd_start; |
| 134 | rd_size = images->initrd_end - images->initrd_start; |
| 135 | |
| 136 | if (rd_size) { |
| 137 | sprintf(buf, "rd_start=0x%08lX", rd_start); |
| 138 | linux_cmdline_set(buf, strlen(buf)); |
| 139 | sprintf(buf, "rd_size=0x%lX", rd_size); |
| 140 | linux_cmdline_set(buf, strlen(buf)); |
| 141 | } |
| 142 | } |
| 143 | |
Daniel Schwierzeck | 46145fb | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 144 | static void linux_env_init(void) |
| 145 | { |
| 146 | linux_env = (char **)(((ulong) linux_argp + 15) & ~15); |
| 147 | linux_env[0] = 0; |
| 148 | linux_env_p = (char *)(linux_env + LINUX_MAX_ENVS); |
| 149 | linux_env_idx = 0; |
| 150 | } |
| 151 | |
| 152 | static void linux_env_set(const char *env_name, const char *env_val) |
| 153 | { |
| 154 | if (linux_env_idx < LINUX_MAX_ENVS - 1) { |
| 155 | linux_env[linux_env_idx] = linux_env_p; |
| 156 | |
| 157 | strcpy(linux_env_p, env_name); |
| 158 | linux_env_p += strlen(env_name); |
| 159 | |
Paul Burton | 10a74b5 | 2013-11-09 10:22:08 +0000 | [diff] [blame] | 160 | if (mips_boot_malta) { |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 161 | linux_env_p++; |
| 162 | linux_env[++linux_env_idx] = linux_env_p; |
| 163 | } else { |
| 164 | *linux_env_p++ = '='; |
| 165 | } |
Daniel Schwierzeck | 46145fb | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 166 | |
| 167 | strcpy(linux_env_p, env_val); |
| 168 | linux_env_p += strlen(env_val); |
| 169 | |
| 170 | linux_env_p++; |
| 171 | linux_env[++linux_env_idx] = 0; |
| 172 | } |
| 173 | } |
| 174 | |
Daniel Schwierzeck | c07dc60 | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 175 | static void linux_env_legacy(bootm_headers_t *images) |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 176 | { |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 177 | char env_buf[12]; |
Daniel Schwierzeck | 46145fb | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 178 | const char *cp; |
Daniel Schwierzeck | eaadb1a | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 179 | ulong rd_start, rd_size; |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 180 | |
wdenk | 9b7f384 | 2003-10-09 20:09:04 +0000 | [diff] [blame] | 181 | #ifdef CONFIG_MEMSIZE_IN_BYTES |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 182 | sprintf(env_buf, "%lu", (ulong)gd->ram_size); |
| 183 | debug("## Giving linux memsize in bytes, %lu\n", (ulong)gd->ram_size); |
wdenk | 9b7f384 | 2003-10-09 20:09:04 +0000 | [diff] [blame] | 184 | #else |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 185 | sprintf(env_buf, "%lu", (ulong)(gd->ram_size >> 20)); |
| 186 | debug("## Giving linux memsize in MB, %lu\n", |
Daniel Schwierzeck | 40f30c0 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 187 | (ulong)(gd->ram_size >> 20)); |
wdenk | 9b7f384 | 2003-10-09 20:09:04 +0000 | [diff] [blame] | 188 | #endif /* CONFIG_MEMSIZE_IN_BYTES */ |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 189 | |
Daniel Schwierzeck | eaadb1a | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 190 | rd_start = UNCACHED_SDRAM(images->initrd_start); |
| 191 | rd_size = images->initrd_end - images->initrd_start; |
| 192 | |
Daniel Schwierzeck | 46145fb | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 193 | linux_env_init(); |
| 194 | |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 195 | linux_env_set("memsize", env_buf); |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 196 | |
Daniel Schwierzeck | eaadb1a | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 197 | sprintf(env_buf, "0x%08lX", rd_start); |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 198 | linux_env_set("initrd_start", env_buf); |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 199 | |
Daniel Schwierzeck | eaadb1a | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 200 | sprintf(env_buf, "0x%lX", rd_size); |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 201 | linux_env_set("initrd_size", env_buf); |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 202 | |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 203 | sprintf(env_buf, "0x%08X", (uint) (gd->bd->bi_flashstart)); |
| 204 | linux_env_set("flash_start", env_buf); |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 205 | |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 206 | sprintf(env_buf, "0x%X", (uint) (gd->bd->bi_flashsize)); |
| 207 | linux_env_set("flash_size", env_buf); |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 208 | |
Jason McMullan | cfbe457 | 2008-06-08 23:56:00 -0400 | [diff] [blame] | 209 | cp = getenv("ethaddr"); |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 210 | if (cp) |
Jason McMullan | cfbe457 | 2008-06-08 23:56:00 -0400 | [diff] [blame] | 211 | linux_env_set("ethaddr", cp); |
Jason McMullan | cfbe457 | 2008-06-08 23:56:00 -0400 | [diff] [blame] | 212 | |
| 213 | cp = getenv("eth1addr"); |
Daniel Schwierzeck | 83010eb | 2012-06-03 23:46:04 +0200 | [diff] [blame] | 214 | if (cp) |
Jason McMullan | cfbe457 | 2008-06-08 23:56:00 -0400 | [diff] [blame] | 215 | linux_env_set("eth1addr", cp); |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 216 | |
Paul Burton | 43c4f59 | 2013-11-26 17:45:25 +0000 | [diff] [blame] | 217 | if (mips_boot_malta) { |
| 218 | sprintf(env_buf, "%un8r", gd->baudrate); |
| 219 | linux_env_set("modetty0", env_buf); |
| 220 | } |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 221 | } |
| 222 | |
| 223 | static int boot_reloc_ramdisk(bootm_headers_t *images) |
| 224 | { |
| 225 | ulong rd_len = images->rd_end - images->rd_start; |
| 226 | |
| 227 | /* |
| 228 | * In case of legacy uImage's, relocation of ramdisk is already done |
| 229 | * by do_bootm_states() and should not repeated in 'bootm prep'. |
| 230 | */ |
| 231 | if (images->state & BOOTM_STATE_RAMDISK) { |
| 232 | debug("## Ramdisk already relocated\n"); |
| 233 | return 0; |
| 234 | } |
| 235 | |
| 236 | return boot_ramdisk_high(&images->lmb, images->rd_start, |
| 237 | rd_len, &images->initrd_start, &images->initrd_end); |
| 238 | } |
| 239 | |
| 240 | static int boot_reloc_fdt(bootm_headers_t *images) |
| 241 | { |
| 242 | /* |
| 243 | * In case of legacy uImage's, relocation of FDT is already done |
| 244 | * by do_bootm_states() and should not repeated in 'bootm prep'. |
| 245 | */ |
| 246 | if (images->state & BOOTM_STATE_FDT) { |
| 247 | debug("## FDT already relocated\n"); |
| 248 | return 0; |
| 249 | } |
| 250 | |
| 251 | #if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) |
| 252 | boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr); |
| 253 | return boot_relocate_fdt(&images->lmb, &images->ft_addr, |
| 254 | &images->ft_len); |
| 255 | #else |
| 256 | return 0; |
| 257 | #endif |
| 258 | } |
| 259 | |
| 260 | int arch_fixup_memory_node(void *blob) |
| 261 | { |
| 262 | #if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) |
| 263 | u64 mem_start = 0; |
| 264 | u64 mem_size = gd->ram_size; |
| 265 | |
| 266 | return fdt_fixup_memory_banks(blob, &mem_start, &mem_size, 1); |
| 267 | #else |
| 268 | return 0; |
| 269 | #endif |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 270 | } |
| 271 | |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 272 | static int boot_setup_fdt(bootm_headers_t *images) |
| 273 | { |
| 274 | return image_setup_libfdt(images, images->ft_addr, images->ft_len, |
| 275 | &images->lmb); |
| 276 | } |
| 277 | |
Daniel Schwierzeck | c07dc60 | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 278 | static void boot_prep_linux(bootm_headers_t *images) |
| 279 | { |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 280 | boot_reloc_ramdisk(images); |
Daniel Schwierzeck | 8d7ff4d | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 281 | |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 282 | if (CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && images->ft_len) { |
| 283 | boot_reloc_fdt(images); |
Daniel Schwierzeck | 8d7ff4d | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 284 | boot_setup_fdt(images); |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 285 | } else { |
| 286 | if (CONFIG_IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY)) |
| 287 | linux_env_legacy(images); |
| 288 | |
| 289 | if (CONFIG_IS_ENABLED(MIPS_BOOT_CMDLINE_LEGACY)) { |
| 290 | linux_cmdline_legacy(images); |
| 291 | |
| 292 | if (!CONFIG_IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY)) |
| 293 | linux_cmdline_append(images); |
| 294 | |
| 295 | linux_cmdline_dump(); |
| 296 | } |
| 297 | } |
Daniel Schwierzeck | c07dc60 | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 298 | } |
| 299 | |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 300 | static void boot_jump_linux(bootm_headers_t *images) |
| 301 | { |
Daniel Schwierzeck | 0b95a7c | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 302 | typedef void __noreturn (*kernel_entry_t)(int, ulong, ulong, ulong); |
| 303 | kernel_entry_t kernel = (kernel_entry_t) images->ep; |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 304 | ulong linux_extra = 0; |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 305 | |
Daniel Schwierzeck | 0b95a7c | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 306 | debug("## Transferring control to Linux (at address %p) ...\n", kernel); |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 307 | |
| 308 | bootstage_mark(BOOTSTAGE_ID_RUN_OS); |
| 309 | |
Paul Burton | 10a74b5 | 2013-11-09 10:22:08 +0000 | [diff] [blame] | 310 | if (mips_boot_malta) |
Daniel Schwierzeck | 0dfa0b3 | 2013-05-30 19:04:20 +0200 | [diff] [blame] | 311 | linux_extra = gd->ram_size; |
| 312 | |
Daniel Schwierzeck | 1a4797c | 2015-01-14 21:44:13 +0100 | [diff] [blame] | 313 | #ifdef CONFIG_BOOTSTAGE_FDT |
| 314 | bootstage_fdt_add_report(); |
| 315 | #endif |
| 316 | #ifdef CONFIG_BOOTSTAGE_REPORT |
| 317 | bootstage_report(); |
| 318 | #endif |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 319 | |
Daniel Schwierzeck | d1b29d2 | 2015-02-22 16:58:30 +0100 | [diff] [blame] | 320 | if (images->ft_len) |
| 321 | kernel(-2, (ulong)images->ft_addr, 0, 0); |
| 322 | else |
| 323 | kernel(linux_argc, (ulong)linux_argv, (ulong)linux_env, |
| 324 | linux_extra); |
Gabor Juhos | 72cb5f0 | 2013-01-07 02:53:41 +0000 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | int do_bootm_linux(int flag, int argc, char * const argv[], |
| 328 | bootm_headers_t *images) |
| 329 | { |
Gabor Juhos | 7f959fd | 2013-01-07 02:53:42 +0000 | [diff] [blame] | 330 | /* No need for those on MIPS */ |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 331 | if (flag & BOOTM_STATE_OS_BD_T) |
Gabor Juhos | 7f959fd | 2013-01-07 02:53:42 +0000 | [diff] [blame] | 332 | return -1; |
| 333 | |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 334 | /* |
| 335 | * Cmdline init has been moved to 'bootm prep' because it has to be |
| 336 | * done after relocation of ramdisk to always pass correct values |
| 337 | * for rd_start and rd_size to Linux kernel. |
| 338 | */ |
| 339 | if (flag & BOOTM_STATE_OS_CMDLINE) |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 340 | return 0; |
Daniel Schwierzeck | eb782d6 | 2013-05-09 17:10:06 +0200 | [diff] [blame] | 341 | |
Gabor Juhos | 7f959fd | 2013-01-07 02:53:42 +0000 | [diff] [blame] | 342 | if (flag & BOOTM_STATE_OS_PREP) { |
| 343 | boot_prep_linux(images); |
| 344 | return 0; |
| 345 | } |
| 346 | |
Daniel Schwierzeck | 20a8b1c | 2015-11-01 17:36:14 +0100 | [diff] [blame^] | 347 | if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) { |
Gabor Juhos | 7f959fd | 2013-01-07 02:53:42 +0000 | [diff] [blame] | 348 | boot_jump_linux(images); |
| 349 | return 0; |
| 350 | } |
Jason McMullan | cfbe457 | 2008-06-08 23:56:00 -0400 | [diff] [blame] | 351 | |
Marian Balakowicz | df8ff33 | 2008-03-12 10:33:00 +0100 | [diff] [blame] | 352 | /* does not return */ |
Kumar Gala | 48626aa | 2008-08-15 08:24:45 -0500 | [diff] [blame] | 353 | return 1; |
wdenk | bb1b826 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 354 | } |