ppc_linux.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. /*
  2. * (C) Copyright 2008 Semihalf
  3. *
  4. * (C) Copyright 2000-2006
  5. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #include <common.h>
  26. #include <watchdog.h>
  27. #include <command.h>
  28. #include <image.h>
  29. #include <malloc.h>
  30. #include <zlib.h>
  31. #include <bzlib.h>
  32. #include <environment.h>
  33. #include <asm/byteorder.h>
  34. #if defined(CONFIG_OF_LIBFDT)
  35. #include <fdt.h>
  36. #include <libfdt.h>
  37. #include <fdt_support.h>
  38. #elif defined(CONFIG_OF_FLAT_TREE)
  39. #include <ft_build.h>
  40. #endif
  41. #ifdef CONFIG_LOGBUFFER
  42. #include <logbuff.h>
  43. #endif
  44. #ifdef CFG_INIT_RAM_LOCK
  45. #include <asm/cache.h>
  46. #endif
  47. #define CHUNKSZ (64 * 1024)
  48. DECLARE_GLOBAL_DATA_PTR;
  49. extern image_header_t header;
  50. /*cmd_boot.c*/
  51. extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  52. #if defined(CONFIG_CMD_BDI)
  53. extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
  54. #endif
  55. void __attribute__((noinline))
  56. do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
  57. int argc, char *argv[],
  58. ulong addr,
  59. ulong *len_ptr,
  60. int verify)
  61. {
  62. ulong sp;
  63. ulong len;
  64. ulong initrd_start, initrd_end;
  65. ulong cmd_start, cmd_end;
  66. ulong initrd_high;
  67. ulong data;
  68. int initrd_copy_to_ram = 1;
  69. char *cmdline;
  70. char *s;
  71. bd_t *kbd;
  72. void (*kernel)(bd_t *, ulong, ulong, ulong, ulong);
  73. image_header_t *hdr = &header;
  74. #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
  75. char *of_flat_tree = NULL;
  76. ulong of_data = 0;
  77. #endif
  78. if ((s = getenv ("initrd_high")) != NULL) {
  79. /* a value of "no" or a similar string will act like 0,
  80. * turning the "load high" feature off. This is intentional.
  81. */
  82. initrd_high = simple_strtoul(s, NULL, 16);
  83. if (initrd_high == ~0)
  84. initrd_copy_to_ram = 0;
  85. } else { /* not set, no restrictions to load high */
  86. initrd_high = ~0;
  87. }
  88. #ifdef CONFIG_LOGBUFFER
  89. kbd=gd->bd;
  90. /* Prevent initrd from overwriting logbuffer */
  91. if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
  92. initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
  93. debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
  94. #endif
  95. /*
  96. * Booting a (Linux) kernel image
  97. *
  98. * Allocate space for command line and board info - the
  99. * address should be as high as possible within the reach of
  100. * the kernel (see CFG_BOOTMAPSZ settings), but in unused
  101. * memory, which means far enough below the current stack
  102. * pointer.
  103. */
  104. asm( "mr %0,1": "=r"(sp) : );
  105. debug ("## Current stack ends at 0x%08lX ", sp);
  106. sp -= 2048; /* just to be sure */
  107. if (sp > CFG_BOOTMAPSZ)
  108. sp = CFG_BOOTMAPSZ;
  109. sp &= ~0xF;
  110. debug ("=> set upper limit to 0x%08lX\n", sp);
  111. cmdline = (char *)((sp - CFG_BARGSIZE) & ~0xF);
  112. kbd = (bd_t *)(((ulong)cmdline - sizeof(bd_t)) & ~0xF);
  113. if ((s = getenv("bootargs")) == NULL)
  114. s = "";
  115. strcpy (cmdline, s);
  116. cmd_start = (ulong)&cmdline[0];
  117. cmd_end = cmd_start + strlen(cmdline);
  118. *kbd = *(gd->bd);
  119. #ifdef DEBUG
  120. printf ("## cmdline at 0x%08lX ... 0x%08lX\n", cmd_start, cmd_end);
  121. #if defined(CONFIG_CMD_BDI)
  122. do_bdinfo (NULL, 0, 0, NULL);
  123. #endif
  124. #endif
  125. if ((s = getenv ("clocks_in_mhz")) != NULL) {
  126. /* convert all clock information to MHz */
  127. kbd->bi_intfreq /= 1000000L;
  128. kbd->bi_busfreq /= 1000000L;
  129. #if defined(CONFIG_MPC8220)
  130. kbd->bi_inpfreq /= 1000000L;
  131. kbd->bi_pcifreq /= 1000000L;
  132. kbd->bi_pevfreq /= 1000000L;
  133. kbd->bi_flbfreq /= 1000000L;
  134. kbd->bi_vcofreq /= 1000000L;
  135. #endif
  136. #if defined(CONFIG_CPM2)
  137. kbd->bi_cpmfreq /= 1000000L;
  138. kbd->bi_brgfreq /= 1000000L;
  139. kbd->bi_sccfreq /= 1000000L;
  140. kbd->bi_vco /= 1000000L;
  141. #endif
  142. #if defined(CONFIG_MPC5xxx)
  143. kbd->bi_ipbfreq /= 1000000L;
  144. kbd->bi_pcifreq /= 1000000L;
  145. #endif /* CONFIG_MPC5xxx */
  146. }
  147. kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))image_get_ep (hdr);
  148. /*
  149. * Check if there is an initrd image
  150. */
  151. #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
  152. /* Look for a '-' which indicates to ignore the ramdisk argument */
  153. if (argc >= 3 && strcmp(argv[2], "-") == 0) {
  154. debug ("Skipping initrd\n");
  155. len = data = 0;
  156. }
  157. else
  158. #endif
  159. if (argc >= 3) {
  160. debug ("Not skipping initrd\n");
  161. show_boot_progress (9);
  162. addr = simple_strtoul(argv[2], NULL, 16);
  163. printf ("## Loading RAMDisk Image at %08lx ...\n", addr);
  164. hdr = (image_header_t *)addr;
  165. if (!image_check_magic (hdr)) {
  166. puts ("Bad Magic Number\n");
  167. show_boot_progress (-10);
  168. do_reset (cmdtp, flag, argc, argv);
  169. }
  170. if (!image_check_hcrc (hdr)) {
  171. puts ("Bad Header Checksum\n");
  172. show_boot_progress (-11);
  173. do_reset (cmdtp, flag, argc, argv);
  174. }
  175. show_boot_progress (10);
  176. print_image_hdr (hdr);
  177. if (verify) {
  178. puts (" Verifying Checksum ... ");
  179. if (!image_check_dcrc_wd (hdr, CHUNKSZ)) {
  180. puts ("Bad Data CRC\n");
  181. show_boot_progress (-12);
  182. do_reset (cmdtp, flag, argc, argv);
  183. }
  184. puts ("OK\n");
  185. }
  186. show_boot_progress (11);
  187. if (!image_check_os (hdr, IH_OS_LINUX) ||
  188. !image_check_arch (hdr, IH_ARCH_PPC) ||
  189. !image_check_type (hdr, IH_TYPE_RAMDISK)) {
  190. puts ("No Linux PPC Ramdisk Image\n");
  191. show_boot_progress (-13);
  192. do_reset (cmdtp, flag, argc, argv);
  193. }
  194. data = image_get_data (hdr);
  195. len = image_get_data_size (hdr);
  196. /*
  197. * Now check if we have a multifile image
  198. */
  199. } else if (image_check_type (hdr, IH_TYPE_MULTI) && (len_ptr[1])) {
  200. u_long tail = image_to_cpu (len_ptr[0]) % 4;
  201. int i;
  202. show_boot_progress (13);
  203. /* skip kernel length and terminator */
  204. data = (ulong)(&len_ptr[2]);
  205. /* skip any additional image length fields */
  206. for (i=1; len_ptr[i]; ++i)
  207. data += 4;
  208. /* add kernel length, and align */
  209. data += image_to_cpu (len_ptr[0]);
  210. if (tail) {
  211. data += 4 - tail;
  212. }
  213. len = image_to_cpu (len_ptr[1]);
  214. } else {
  215. /*
  216. * no initrd image
  217. */
  218. show_boot_progress (14);
  219. len = data = 0;
  220. }
  221. #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
  222. if(argc > 3) {
  223. of_flat_tree = (char *) simple_strtoul(argv[3], NULL, 16);
  224. hdr = (image_header_t *)of_flat_tree;
  225. #if defined(CONFIG_OF_FLAT_TREE)
  226. if (*((ulong *)(of_flat_tree + image_get_header_size ())) != OF_DT_HEADER) {
  227. #elif defined(CONFIG_OF_LIBFDT)
  228. if (fdt_check_header (of_flat_tree + image_get_header_size ()) != 0) {
  229. #endif
  230. #ifndef CFG_NO_FLASH
  231. if (addr2info((ulong)of_flat_tree) != NULL)
  232. of_data = (ulong)of_flat_tree;
  233. #endif
  234. } else if (image_check_magic (hdr)) {
  235. printf("## Flat Device Tree at %08lX\n", hdr);
  236. print_image_hdr (hdr);
  237. if ((image_get_load (hdr) < ((unsigned long)hdr + image_get_image_size (hdr))) &&
  238. ((image_get_load (hdr) + image_get_data_size (hdr)) > (unsigned long)hdr)) {
  239. puts ("ERROR: fdt overwritten - "
  240. "must RESET the board to recover.\n");
  241. do_reset (cmdtp, flag, argc, argv);
  242. }
  243. puts (" Verifying Checksum ... ");
  244. if (!image_check_hcrc (hdr)) {
  245. puts ("ERROR: fdt header checksum invalid - "
  246. "must RESET the board to recover.\n");
  247. do_reset (cmdtp, flag, argc, argv);
  248. }
  249. if (!image_check_dcrc (hdr)) {
  250. puts ("ERROR: fdt checksum invalid - "
  251. "must RESET the board to recover.\n");
  252. do_reset (cmdtp, flag, argc, argv);
  253. }
  254. puts ("OK\n");
  255. if (!image_check_type (hdr, IH_TYPE_FLATDT)) {
  256. puts ("ERROR: uImage is not a fdt - "
  257. "must RESET the board to recover.\n");
  258. do_reset (cmdtp, flag, argc, argv);
  259. }
  260. if (image_get_comp (hdr) != IH_COMP_NONE) {
  261. puts ("ERROR: uImage is compressed - "
  262. "must RESET the board to recover.\n");
  263. do_reset (cmdtp, flag, argc, argv);
  264. }
  265. #if defined(CONFIG_OF_FLAT_TREE)
  266. if (*((ulong *)(of_flat_tree + image_get_header_size ())) != OF_DT_HEADER) {
  267. #elif defined(CONFIG_OF_LIBFDT)
  268. if (fdt_check_header (of_flat_tree + image_get_header_size ()) != 0) {
  269. #endif
  270. puts ("ERROR: uImage data is not a fdt - "
  271. "must RESET the board to recover.\n");
  272. do_reset (cmdtp, flag, argc, argv);
  273. }
  274. memmove ((void *)image_get_load (hdr),
  275. (void *)(of_flat_tree + image_get_header_size ()),
  276. image_get_data_size (hdr));
  277. of_flat_tree = (char *)image_get_load (hdr);
  278. } else {
  279. puts ("Did not find a flat Flat Device Tree.\n"
  280. "Must RESET the board to recover.\n");
  281. do_reset (cmdtp, flag, argc, argv);
  282. }
  283. printf (" Booting using the fdt at 0x%x\n",
  284. of_flat_tree);
  285. } else if (image_check_type (hdr, IH_TYPE_MULTI) && (len_ptr[1]) && (len_ptr[2])) {
  286. u_long tail = image_to_cpu (len_ptr[0]) % 4;
  287. int i;
  288. /* skip kernel length, initrd length, and terminator */
  289. of_flat_tree = (char *)(&len_ptr[3]);
  290. /* skip any additional image length fields */
  291. for (i=2; len_ptr[i]; ++i)
  292. of_flat_tree += 4;
  293. /* add kernel length, and align */
  294. of_flat_tree += image_to_cpu (len_ptr[0]);
  295. if (tail) {
  296. of_flat_tree += 4 - tail;
  297. }
  298. /* add initrd length, and align */
  299. tail = image_to_cpu (len_ptr[1]) % 4;
  300. of_flat_tree += image_to_cpu (len_ptr[1]);
  301. if (tail) {
  302. of_flat_tree += 4 - tail;
  303. }
  304. #ifndef CFG_NO_FLASH
  305. /* move the blob if it is in flash (set of_data to !null) */
  306. if (addr2info ((ulong)of_flat_tree) != NULL)
  307. of_data = (ulong)of_flat_tree;
  308. #endif
  309. #if defined(CONFIG_OF_FLAT_TREE)
  310. if (*((ulong *)(of_flat_tree)) != OF_DT_HEADER) {
  311. #elif defined(CONFIG_OF_LIBFDT)
  312. if (fdt_check_header (of_flat_tree) != 0) {
  313. #endif
  314. puts ("ERROR: image is not a fdt - "
  315. "must RESET the board to recover.\n");
  316. do_reset (cmdtp, flag, argc, argv);
  317. }
  318. #if defined(CONFIG_OF_FLAT_TREE)
  319. if (((struct boot_param_header *)of_flat_tree)->totalsize !=
  320. image_to_cpu (len_ptr[2])) {
  321. #elif defined(CONFIG_OF_LIBFDT)
  322. if (be32_to_cpu (fdt_totalsize (of_flat_tree)) !=
  323. image_to_cpu (len_ptr[2])) {
  324. #endif
  325. puts ("ERROR: fdt size != image size - "
  326. "must RESET the board to recover.\n");
  327. do_reset (cmdtp, flag, argc, argv);
  328. }
  329. }
  330. #endif
  331. if (!data) {
  332. debug ("No initrd\n");
  333. }
  334. if (data) {
  335. if (!initrd_copy_to_ram) { /* zero-copy ramdisk support */
  336. initrd_start = data;
  337. initrd_end = initrd_start + len;
  338. } else {
  339. initrd_start = (ulong)kbd - len;
  340. initrd_start &= ~(4096 - 1); /* align on page */
  341. if (initrd_high) {
  342. ulong nsp;
  343. /*
  344. * the inital ramdisk does not need to be within
  345. * CFG_BOOTMAPSZ as it is not accessed until after
  346. * the mm system is initialised.
  347. *
  348. * do the stack bottom calculation again and see if
  349. * the initrd will fit just below the monitor stack
  350. * bottom without overwriting the area allocated
  351. * above for command line args and board info.
  352. */
  353. asm( "mr %0,1": "=r"(nsp) : );
  354. nsp -= 2048; /* just to be sure */
  355. nsp &= ~0xF;
  356. if (nsp > initrd_high) /* limit as specified */
  357. nsp = initrd_high;
  358. nsp -= len;
  359. nsp &= ~(4096 - 1); /* align on page */
  360. if (nsp >= sp)
  361. initrd_start = nsp;
  362. }
  363. show_boot_progress (12);
  364. debug ("## initrd at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
  365. data, data + len - 1, len, len);
  366. initrd_end = initrd_start + len;
  367. printf (" Loading Ramdisk to %08lx, end %08lx ... ",
  368. initrd_start, initrd_end);
  369. #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
  370. {
  371. size_t l = len;
  372. void *to = (void *)initrd_start;
  373. void *from = (void *)data;
  374. while (l > 0) {
  375. size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l;
  376. WATCHDOG_RESET();
  377. memmove (to, from, tail);
  378. to += tail;
  379. from += tail;
  380. l -= tail;
  381. }
  382. }
  383. #else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
  384. memmove ((void *)initrd_start, (void *)data, len);
  385. #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
  386. puts ("OK\n");
  387. }
  388. } else {
  389. initrd_start = 0;
  390. initrd_end = 0;
  391. }
  392. #if defined(CONFIG_OF_LIBFDT)
  393. #ifdef CFG_BOOTMAPSZ
  394. /*
  395. * The blob must be within CFG_BOOTMAPSZ,
  396. * so we flag it to be copied if it is not.
  397. */
  398. if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
  399. of_data = (ulong)of_flat_tree;
  400. #endif
  401. /* move of_flat_tree if needed */
  402. if (of_data) {
  403. int err;
  404. ulong of_start, of_len;
  405. of_len = be32_to_cpu(fdt_totalsize(of_data));
  406. /* position on a 4K boundary before the kbd */
  407. of_start = (ulong)kbd - of_len;
  408. of_start &= ~(4096 - 1); /* align on page */
  409. debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
  410. of_data, of_data + of_len - 1, of_len, of_len);
  411. of_flat_tree = (char *)of_start;
  412. printf (" Loading Device Tree to %08lx, end %08lx ... ",
  413. of_start, of_start + of_len - 1);
  414. err = fdt_open_into((void *)of_data, (void *)of_start, of_len);
  415. if (err != 0) {
  416. puts ("ERROR: fdt move failed - "
  417. "must RESET the board to recover.\n");
  418. do_reset (cmdtp, flag, argc, argv);
  419. }
  420. puts ("OK\n");
  421. }
  422. /*
  423. * Add the chosen node if it doesn't exist, add the env and bd_t
  424. * if the user wants it (the logic is in the subroutines).
  425. */
  426. if (of_flat_tree) {
  427. if (fdt_chosen(of_flat_tree, initrd_start, initrd_end, 0) < 0) {
  428. puts ("ERROR: /chosen node create failed - "
  429. "must RESET the board to recover.\n");
  430. do_reset (cmdtp, flag, argc, argv);
  431. }
  432. #ifdef CONFIG_OF_HAS_UBOOT_ENV
  433. if (fdt_env(of_flat_tree) < 0) {
  434. puts ("ERROR: /u-boot-env node create failed - "
  435. "must RESET the board to recover.\n");
  436. do_reset (cmdtp, flag, argc, argv);
  437. }
  438. #endif
  439. #ifdef CONFIG_OF_HAS_BD_T
  440. if (fdt_bd_t(of_flat_tree) < 0) {
  441. puts ("ERROR: /bd_t node create failed - "
  442. "must RESET the board to recover.\n");
  443. do_reset (cmdtp, flag, argc, argv);
  444. }
  445. #endif
  446. #ifdef CONFIG_OF_BOARD_SETUP
  447. /* Call the board-specific fixup routine */
  448. ft_board_setup(of_flat_tree, gd->bd);
  449. #endif
  450. }
  451. #elif defined(CONFIG_OF_FLAT_TREE)
  452. #ifdef CFG_BOOTMAPSZ
  453. /*
  454. * The blob must be within CFG_BOOTMAPSZ,
  455. * so we flag it to be copied if it is not.
  456. */
  457. if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
  458. of_data = (ulong)of_flat_tree;
  459. #endif
  460. /* move of_flat_tree if needed */
  461. if (of_data) {
  462. ulong of_start, of_len;
  463. of_len = ((struct boot_param_header *)of_data)->totalsize;
  464. /* provide extra 8k pad */
  465. of_start = (ulong)kbd - of_len - 8192;
  466. of_start &= ~(4096 - 1); /* align on page */
  467. debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
  468. of_data, of_data + of_len - 1, of_len, of_len);
  469. of_flat_tree = (char *)of_start;
  470. printf (" Loading Device Tree to %08lx, end %08lx ... ",
  471. of_start, of_start + of_len - 1);
  472. memmove ((void *)of_start, (void *)of_data, of_len);
  473. puts ("OK\n");
  474. }
  475. /*
  476. * Create the /chosen node and modify the blob with board specific
  477. * values as needed.
  478. */
  479. ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
  480. /* ft_dump_blob(of_flat_tree); */
  481. #endif /* #if defined(CONFIG_OF_LIBFDT) #elif defined(CONFIG_OF_FLAT_TREE) */
  482. debug ("## Transferring control to Linux (at address %08lx) ...\n",
  483. (ulong)kernel);
  484. show_boot_progress (15);
  485. #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
  486. unlock_ram_in_cache();
  487. #endif
  488. #if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
  489. if (of_flat_tree) { /* device tree; boot new style */
  490. /*
  491. * Linux Kernel Parameters (passing device tree):
  492. * r3: pointer to the fdt, followed by the board info data
  493. * r4: physical pointer to the kernel itself
  494. * r5: NULL
  495. * r6: NULL
  496. * r7: NULL
  497. */
  498. (*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
  499. /* does not return */
  500. }
  501. #endif
  502. /*
  503. * Linux Kernel Parameters (passing board info data):
  504. * r3: ptr to board info data
  505. * r4: initrd_start or 0 if no initrd
  506. * r5: initrd_end - unused if r4 is 0
  507. * r6: Start of command line string
  508. * r7: End of command line string
  509. */
  510. (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
  511. /* does not return */
  512. }