summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-05-23 23:18:21 +0000
committerwdenk <wdenk>2003-05-23 23:18:21 +0000
commit38b99261c13a54ea955a8fe9176e73256486362f (patch)
treef8ca312752f893652044b9ce05780d253750a27c /common
parent4c3b21a5f915988e3d9681cf9cb566bb7bd56859 (diff)
downloadblackbird-obmc-uboot-38b99261c13a54ea955a8fe9176e73256486362f.tar.gz
blackbird-obmc-uboot-38b99261c13a54ea955a8fe9176e73256486362f.zip
Add zero-copy ramdisk support (requires corresponding kernel support!)
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index fa32d467ed..af62becf4a 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -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;
OpenPOWER on IntegriCloud