- kernel =
- (void (*)(bd_t *, ulong, ulong, ulong, ulong))image_get_ep (hdr);
-
- get_ramdisk (cmdtp, flag, argc, argv, hdr, verify,
- IH_ARCH_M68K, &rd_data_start, &rd_data_end);
- rd_len = rd_data_end - rd_data_start;
-
- if (rd_data_start) {
- if (!initrd_copy_to_ram) { /* zero-copy ramdisk support */
- initrd_start = rd_data_start;
- initrd_end = rd_data_end;
- } else {
- initrd_start = (ulong) kbd - rd_len;
- initrd_start &= ~(4096 - 1); /* align on page */
-
- if (initrd_high) {
- ulong nsp;
-
- /*
- * the inital ramdisk does not need to be within
- * CFG_BOOTMAPSZ as it is not accessed until after
- * the mm system is initialised.
- *
- * do the stack bottom calculation again and see if
- * the initrd will fit just below the monitor stack
- * bottom without overwriting the area allocated
- * above for command line args and board info.
- */
- asm("movel %%a7, %%d0\n"
- "movel %%d0, %0\n": "=d"(nsp): :"%d0");
-
- nsp -= 2048; /* just to be sure */
- nsp &= ~0xF;
-
- if (nsp > initrd_high) /* limit as specified */
- nsp = initrd_high;
-
- nsp -= rd_len;
- nsp &= ~(4096 - 1); /* align on page */
-
- if (nsp >= sp)
- initrd_start = nsp;
- }
-
- SHOW_BOOT_PROGRESS(12);
-
- debug
- ("## initrd at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
- rd_data_start, rd_data_end - 1, rd_len, rd_len);
-
- initrd_end = initrd_start + rd_len;
- printf(" Loading Ramdisk to %08lx, end %08lx ... ",
- initrd_start, initrd_end);
-
- memmove_wd((void *)initrd_start,
- (void *)rd_data_start, rd_len, CHUNKSZ);
-
- puts("OK\n");
- }
- } else {
- initrd_start = 0;
- initrd_end = 0;