]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Add zero-copy ramdisk support (requires corresponding kernel support!)
authorwdenk <wdenk>
Fri, 23 May 2003 23:18:21 +0000 (23:18 +0000)
committerwdenk <wdenk>
Fri, 23 May 2003 23:18:21 +0000 (23:18 +0000)
CHANGELOG
README
common/cmd_bootm.c

index 733a1d3ea1da25bba0cdfb3e3fba366a3e8f4ee7..10ae064218a2fd4a84943346aa0063e7d76008f9 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@
 Changes since U-Boot 0.3.1:
 ======================================================================
 
+* Add zero-copy ramdisk support (requires corresponding kernel support!)
+
 * Patch by Kyle Harris, 20 May 2003:
   In preparation for an ixp port, rename cpu/xscale and arch-xscale
   into cpu/pxa and arch-pxa.
diff --git a/README b/README
index 4dfb292bf5a1bcd31e3e167ce4faa5d4c1c3b7cf..ecc087ad914b20afd6ad63008a780ffe23629ca0 100644 (file)
--- a/README
+++ b/README
@@ -1988,6 +1988,14 @@ Some configuration options can be set using Environment Variables:
 
                  setenv initrd_high 00c00000
 
+                  If you set initrd_high to 0xFFFFFFFF, this is an
+                  indication to U-Boot that all addresses are legal
+                  for the Linux kernel, including addresses in flash
+                  memory. In this case U-Boot will NOT COPY the
+                  ramdisk at all. This may be useful to reduce the
+                  boot time on your system, but requires that this
+                  feature is supported by your Linux kernel.
+
   ipaddr       - IP address; needed for tftpboot command
 
   loadaddr     - Default load address for commands like "bootp",
index fa32d467ed12cb8b4cb07e5ecb5dcdbebd13725e..af62becf4a9eaa6f6868c08a4aa0c122eaebeb30 100644 (file)
@@ -374,6 +374,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
        ulong   cmd_start, cmd_end;
        ulong   initrd_high;
        ulong   data;
+       int     initrd_copy_to_ram = 1;
        char    *cmdline;
        char    *s;
        bd_t    *kbd;
@@ -385,6 +386,8 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
                 * turning the "load high" feature off. This is intentional.
                 */
                initrd_high = simple_strtoul(s, NULL, 16);
+               if (initrd_high == ~0)
+                       initrd_copy_to_ram = 0;
        } else {        /* not set, no restrictions to load high */
                initrd_high = ~0;
        }
@@ -567,6 +570,10 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
        }
 
        if (data) {
+           if (!initrd_copy_to_ram) {  /* zero-copy ramdisk support */
+               initrd_start = data;
+               initrd_end = initrd_start + len;
+           } else {
                initrd_start  = (ulong)kbd - len;
                initrd_start &= ~(4096 - 1);    /* align on page */
 
@@ -621,6 +628,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
                memmove ((void *)initrd_start, (void *)data, len);
 #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
                printf ("OK\n");
+           }
        } else {
                initrd_start = 0;
                initrd_end = 0;