summaryrefslogtreecommitdiff
path: root/lib_sparc
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_sparc
parente02d4a9904c8f36395994c0c81469d552b82f5ea (diff)
downloadu-boot-imx-76da19df5b8e186d269f29190696bd31fb6c836b.zip
u-boot-imx-76da19df5b8e186d269f29190696bd31fb6c836b.tar.gz
u-boot-imx-76da19df5b8e186d269f29190696bd31fb6c836b.tar.bz2
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_sparc')
-rw-r--r--lib_sparc/bootm.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c
index 2baafcc..565b41c 100644
--- a/lib_sparc/bootm.c
+++ b/lib_sparc/bootm.c
@@ -81,6 +81,15 @@ struct __attribute__ ((packed)) {
/* temporary initrd image holder */
image_header_t ihdr;
+void arch_lmb_reserve(struct lmb *lmb)
+{
+ /* Reserve the space used by PROM and stack. This is done
+ * to avoid that the RAM image is copied over stack or
+ * PROM.
+ */
+ lmb_reserve(lmb, CONFIG_SYS_RELOC_MONITOR_BASE, CONFIG_SYS_RAM_END);
+}
+
/* boot the linux kernel */
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images)
{
@@ -124,13 +133,6 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images)
rd_len = images->rd_end - images->rd_start;
if (rd_len) {
-
- /* Reserve the space used by PROM and stack. This is done
- * to avoid that the RAM image is copied over stack or
- * PROM.
- */
- lmb_reserve(lmb, CONFIG_SYS_RELOC_MONITOR_BASE, CONFIG_SYS_RAM_END);
-
ret = boot_ramdisk_high(lmb, images->rd_start, rd_len,
&initrd_start, &initrd_end);
if (ret) {