summaryrefslogtreecommitdiffstats
path: root/lib_m68k
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-10-16 21:52:08 -0500
committerWolfgang Denk <wd@denx.de>2008-10-18 21:54:04 +0200
commit76da19df5b8e186d269f29190696bd31fb6c836b (patch)
tree95c2eac7c96460257f163f358e146b6375be2180 /lib_m68k
parente02d4a9904c8f36395994c0c81469d552b82f5ea (diff)
downloadu-boot-76da19df5b8e186d269f29190696bd31fb6c836b.tar.gz
u-boot-76da19df5b8e186d269f29190696bd31fb6c836b.tar.xz
u-boot-76da19df5b8e186d269f29190696bd31fb6c836b.zip
Added arch_lmb_reserve to allow arch specific memory regions protection
Each architecture has different ways of determine what regions of memory might not be valid to get overwritten when we boot. This provides a hook to allow them to reserve any regions they care about. Currently only ppc, m68k and sparc need/use this. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'lib_m68k')
-rw-r--r--lib_m68k/bootm.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index a73f6ebb99..c52dd2fbaa 100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
@@ -43,22 +43,10 @@ DECLARE_GLOBAL_DATA_PTR;
static ulong get_sp (void);
static void set_clocks_in_mhz (bd_t *kbd);
-int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
+void arch_lmb_reserve(struct lmb *lmb)
{
ulong sp;
- ulong rd_len;
- ulong initrd_start, initrd_end;
- int ret;
-
- ulong cmd_start, cmd_end;
- ulong bootmap_base;
- bd_t *kbd;
- void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
- struct lmb *lmb = &images->lmb;
-
- bootmap_base = getenv_bootm_low();
-
/*
* Booting a (Linux) kernel image
*
@@ -74,6 +62,21 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
/* adjust sp by 1K to be safe */
sp -= 1024;
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
+}
+
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
+{
+ ulong rd_len;
+ ulong initrd_start, initrd_end;
+ int ret;
+
+ ulong cmd_start, cmd_end;
+ ulong bootmap_base;
+ bd_t *kbd;
+ void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
+ struct lmb *lmb = &images->lmb;
+
+ bootmap_base = getenv_bootm_low();
/* allocate space and init command line */
ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end, bootmap_base);