summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
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 /common/cmd_bootm.c
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 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 2a9c59f..b02da3e 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -128,6 +128,12 @@ void __board_lmb_reserve(struct lmb *lmb)
}
void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve")));
+void __arch_lmb_reserve(struct lmb *lmb)
+{
+ /* please define platform specific arch_lmb_reserve() */
+}
+void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve")));
+
#if defined(__ARM__)
#define IH_INITRD_ARCH IH_ARCH_ARM
#elif defined(__avr32__)
@@ -173,6 +179,7 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
lmb_add(&images.lmb, (phys_addr_t)mem_start, mem_size);
+ arch_lmb_reserve(&images.lmb);
board_lmb_reserve(&images.lmb);
/* get kernel image header, start address and length */