diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
| commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
| tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /lib_sparc/bootm.c | |
| parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
| parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
| download | olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.xz olio-uboot-2014.01-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip | |
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
cpu/at32ap/at32ap700x/gpio.c
include/asm-avr32/arch-at32ap700x/clk.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1003.h
include/configs/atstk1004.h
include/configs/atstk1006.h
include/configs/favr-32-ezkit.h
include/configs/hammerhead.h
include/configs/mimc200.h
Diffstat (limited to 'lib_sparc/bootm.c')
| -rw-r--r-- | lib_sparc/bootm.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c index 4e8c92048..c62cf57d8 100644 --- a/lib_sparc/bootm.c +++ b/lib_sparc/bootm.c @@ -27,6 +27,7 @@ #include <asm/byteorder.h> #include <asm/prom.h> #include <asm/cache.h> +#include <image.h> #define PRINT_KERNEL_HEADER @@ -81,6 +82,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) { @@ -93,6 +103,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images) struct lmb *lmb = &images->lmb; int ret; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) + return 1; + /* Get virtual address of kernel start */ linux_hdr = (void *)images->os.load; @@ -124,13 +137,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 +150,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; @@ -173,7 +179,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images) * From now on the only code in u-boot that will be * executed is the PROM code. */ - kernel(kernel_arg_promvec, (void *)ep); + kernel(kernel_arg_promvec, (void *)images->ep); /* It will never come to this... */ while (1) ; |