summaryrefslogtreecommitdiff
path: root/lib_sparc/bootm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_sparc/bootm.c')
-rw-r--r--lib_sparc/bootm.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c
index 4e8c920..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, CFG_RELOC_MONITOR_BASE, CFG_RAM_END);
-
ret = boot_ramdisk_high(lmb, images->rd_start, rd_len,
&initrd_start, &initrd_end);
if (ret) {
@@ -144,7 +146,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images)
* Set INITRD Image address relative to RAM Start
*/
linux_hdr->hdr_input.ver_0203.sparc_ramdisk_image =
- initrd_start - CFG_RAM_BASE;
+ initrd_start - CONFIG_SYS_RAM_BASE;
linux_hdr->hdr_input.ver_0203.sparc_ramdisk_size = rd_len;
/* Clear READ ONLY flag if set to non-zero */
linux_hdr->hdr_input.ver_0203.root_flags = 1;