summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-02-27 21:51:49 -0600
committerMarian Balakowicz <m8@semihalf.com>2008-02-29 13:15:56 +0100
commite822d7fc4dd4755d4d0a22f05e33f33d1a0481da (patch)
tree2b63ad520db48b6e134cd7d5ce67e950f428c1cc /common/cmd_bootm.c
parentf5614e7926863bf0225ec860d9b319741a9c4004 (diff)
downloadu-boot-e822d7fc4dd4755d4d0a22f05e33f33d1a0481da.tar.gz
u-boot-e822d7fc4dd4755d4d0a22f05e33f33d1a0481da.tar.bz2
u-boot-e822d7fc4dd4755d4d0a22f05e33f33d1a0481da.zip
[new uImage] Use lmb for bootm allocations
Convert generic ramdisk_high(), get_boot_cmdline(), get_boot_kbd() functions over to using lmb for allocation of the ramdisk, command line and kernel bd info. Convert PPC specific fdt_relocate() to use lmb for allocation of the device tree. Provided a weak function that board code can call to do additional lmb reserves if needed. Also introduce the concept of bootmap_base to specify the offset in physical memory that the bootmap is located at. This is used for allocations of the cmdline, kernel bd, and device tree as they should be contained within bootmap_base and bootmap_base + CFG_BOOTMAPSZ. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common/cmd_bootm.c')
-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 92c2f4e83a..a32a5a2561 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -103,6 +103,12 @@ static boot_os_fn do_bootm_artos;
ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */
static bootm_headers_t images; /* pointers to os/initrd/fdt images */
+void __board_lmb_reserve(struct lmb *lmb)
+{
+ /* please define platform specific board_lmb_reserve() */
+}
+void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve")));
+
/*******************************************************************/
/* bootm - boot application image from image in memory */
@@ -134,6 +140,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
lmb_add(&lmb, 0, gd->bd->bi_memsize);
#endif
+ board_lmb_reserve(&lmb);
+
/* get kernel image header, start address and length */
os_hdr = get_kernel (cmdtp, flag, argc, argv,
&images, &os_data, &os_len);