2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-01-08 17:11:43 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2008 Semihalf
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2006
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*/
|
|
|
|
|
2008-01-31 12:20:06 +00:00
|
|
|
|
2008-01-08 17:11:43 +00:00
|
|
|
#include <common.h>
|
2020-05-10 17:40:00 +00:00
|
|
|
#include <bootstage.h>
|
2019-11-14 19:57:39 +00:00
|
|
|
#include <cpu_func.h>
|
2019-08-01 15:46:52 +00:00
|
|
|
#include <env.h>
|
2019-12-28 17:45:05 +00:00
|
|
|
#include <init.h>
|
2020-05-10 17:40:01 +00:00
|
|
|
#include <lmb.h>
|
2020-05-10 17:40:05 +00:00
|
|
|
#include <log.h>
|
2008-01-08 17:11:43 +00:00
|
|
|
#include <watchdog.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <image.h>
|
|
|
|
#include <malloc.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2009-04-04 10:49:11 +00:00
|
|
|
#include <u-boot/zlib.h>
|
2008-01-08 17:11:43 +00:00
|
|
|
#include <bzlib.h>
|
|
|
|
#include <asm/byteorder.h>
|
2011-01-31 21:51:20 +00:00
|
|
|
#include <asm/mp.h>
|
2017-07-13 13:10:08 +00:00
|
|
|
#include <bootm.h>
|
|
|
|
#include <vxworks.h>
|
2008-01-08 17:11:43 +00:00
|
|
|
|
|
|
|
#if defined(CONFIG_OF_LIBFDT)
|
2018-03-04 16:20:11 +00:00
|
|
|
#include <linux/libfdt.h>
|
2008-01-08 17:11:43 +00:00
|
|
|
#include <fdt_support.h>
|
2009-07-26 21:28:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_SYS_INIT_RAM_LOCK
|
|
|
|
#include <asm/cache.h>
|
2008-01-08 17:11:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2008-01-31 12:57:17 +00:00
|
|
|
static ulong get_sp (void);
|
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)
For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
Signed-off-by: Miao Yan <miao.yan@windriver.com>
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-28 09:51:38 +00:00
|
|
|
extern void ft_fixup_num_cores(void *blob);
|
2020-06-26 06:13:33 +00:00
|
|
|
static void set_clocks_in_mhz (struct bd_info *kbd);
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
#ifndef CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE
|
|
|
|
#define CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE (768*1024*1024)
|
2008-02-28 03:51:50 +00:00
|
|
|
#endif
|
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
static void boot_jump_linux(bootm_headers_t *images)
|
|
|
|
{
|
2020-06-26 06:13:33 +00:00
|
|
|
void (*kernel)(struct bd_info *, ulong r4, ulong r5, ulong r6,
|
|
|
|
ulong r7, ulong r8, ulong r9);
|
2008-10-21 22:25:46 +00:00
|
|
|
#ifdef CONFIG_OF_LIBFDT
|
|
|
|
char *of_flat_tree = images->ft_addr;
|
|
|
|
#endif
|
|
|
|
|
2020-06-26 06:13:33 +00:00
|
|
|
kernel = (void (*)(struct bd_info *, ulong, ulong, ulong,
|
2008-10-21 22:25:46 +00:00
|
|
|
ulong, ulong, ulong))images->ep;
|
2020-05-10 17:40:04 +00:00
|
|
|
debug("## Transferring control to Linux (at address %08lx) ...\n",
|
|
|
|
(ulong)kernel);
|
2008-10-21 22:25:46 +00:00
|
|
|
|
2012-02-13 13:51:18 +00:00
|
|
|
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
2008-10-21 22:25:46 +00:00
|
|
|
|
2014-02-19 15:16:57 +00:00
|
|
|
#ifdef CONFIG_BOOTSTAGE_FDT
|
|
|
|
bootstage_fdt_add_report();
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_BOOTSTAGE_REPORT
|
|
|
|
bootstage_report();
|
|
|
|
#endif
|
|
|
|
|
2009-07-26 21:28:02 +00:00
|
|
|
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && !defined(CONFIG_E500)
|
|
|
|
unlock_ram_in_cache();
|
|
|
|
#endif
|
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
#if defined(CONFIG_OF_LIBFDT)
|
|
|
|
if (of_flat_tree) { /* device tree; boot new style */
|
|
|
|
/*
|
|
|
|
* Linux Kernel Parameters (passing device tree):
|
|
|
|
* r3: pointer to the fdt
|
|
|
|
* r4: 0
|
|
|
|
* r5: 0
|
|
|
|
* r6: epapr magic
|
|
|
|
* r7: size of IMA in bytes
|
|
|
|
* r8: 0
|
|
|
|
* r9: 0
|
|
|
|
*/
|
2020-05-10 17:40:04 +00:00
|
|
|
debug(" Booting using OF flat tree...\n");
|
2009-08-12 08:17:03 +00:00
|
|
|
WATCHDOG_RESET ();
|
2020-06-26 06:13:33 +00:00
|
|
|
(*kernel) ((struct bd_info *)of_flat_tree, 0, 0, EPAPR_MAGIC,
|
2017-08-03 18:22:15 +00:00
|
|
|
env_get_bootm_mapsize(), 0, 0);
|
2008-10-21 22:25:46 +00:00
|
|
|
/* does not return */
|
|
|
|
} else
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Linux Kernel Parameters (passing board info data):
|
|
|
|
* r3: ptr to board info data
|
|
|
|
* r4: initrd_start or 0 if no initrd
|
|
|
|
* r5: initrd_end - unused if r4 is 0
|
|
|
|
* r6: Start of command line string
|
|
|
|
* r7: End of command line string
|
|
|
|
* r8: 0
|
|
|
|
* r9: 0
|
|
|
|
*/
|
|
|
|
ulong cmd_start = images->cmdline_start;
|
|
|
|
ulong cmd_end = images->cmdline_end;
|
|
|
|
ulong initrd_start = images->initrd_start;
|
|
|
|
ulong initrd_end = images->initrd_end;
|
2020-06-26 06:13:33 +00:00
|
|
|
struct bd_info *kbd = images->kbd;
|
2008-10-21 22:25:46 +00:00
|
|
|
|
2020-05-10 17:40:04 +00:00
|
|
|
debug(" Booting using board info...\n");
|
2009-08-12 08:17:03 +00:00
|
|
|
WATCHDOG_RESET ();
|
2008-10-21 22:25:46 +00:00
|
|
|
(*kernel) (kbd, initrd_start, initrd_end,
|
|
|
|
cmd_start, cmd_end, 0, 0);
|
|
|
|
/* does not return */
|
|
|
|
}
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
|
2008-10-17 02:52:08 +00:00
|
|
|
void arch_lmb_reserve(struct lmb *lmb)
|
2008-01-08 17:11:43 +00:00
|
|
|
{
|
2008-06-10 01:37:18 +00:00
|
|
|
phys_size_t bootm_size;
|
2008-10-17 02:52:08 +00:00
|
|
|
ulong size, sp, bootmap_base;
|
2008-08-15 13:24:36 +00:00
|
|
|
|
2017-08-03 18:22:15 +00:00
|
|
|
bootmap_base = env_get_bootm_low();
|
|
|
|
bootm_size = env_get_bootm_size();
|
2008-02-28 03:51:50 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2008-06-10 01:37:18 +00:00
|
|
|
if (((u64)bootmap_base + bootm_size) >
|
2008-10-16 13:01:15 +00:00
|
|
|
(CONFIG_SYS_SDRAM_BASE + (u64)gd->ram_size))
|
2008-02-28 03:51:50 +00:00
|
|
|
puts("WARNING: bootm_low + bootm_size exceed total memory\n");
|
2008-06-10 01:37:18 +00:00
|
|
|
if ((bootmap_base + bootm_size) > get_effective_memsize())
|
2008-02-28 03:51:50 +00:00
|
|
|
puts("WARNING: bootm_low + bootm_size exceed eff. memory\n");
|
|
|
|
#endif
|
|
|
|
|
2008-06-10 01:37:18 +00:00
|
|
|
size = min(bootm_size, get_effective_memsize());
|
linux/kernel.h: sync min, max, min3, max3 macros with Linux
U-Boot has never cared about the type when we get max/min of two
values, but Linux Kernel does. This commit gets min, max, min3, max3
macros synced with the kernel introducing type checks.
Many of references of those macros must be fixed to suppress warnings.
We have two options:
- Use min, max, min3, max3 only when the arguments have the same type
(or add casts to the arguments)
- Use min_t/max_t instead with the appropriate type for the first
argument
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Pavel Machek <pavel@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
[trini: Fixup arch/blackfin/lib/string.c]
Signed-off-by: Tom Rini <trini@ti.com>
2014-11-06 18:03:31 +00:00
|
|
|
size = min(size, (ulong)CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE);
|
2008-02-28 03:51:50 +00:00
|
|
|
|
2008-06-10 01:37:18 +00:00
|
|
|
if (size < bootm_size) {
|
2008-02-28 03:51:50 +00:00
|
|
|
ulong base = bootmap_base + size;
|
2008-07-07 13:41:14 +00:00
|
|
|
printf("WARNING: adjusting available memory to %lx\n", size);
|
2008-06-10 01:37:18 +00:00
|
|
|
lmb_reserve(lmb, base, bootm_size - size);
|
2008-02-28 03:51:50 +00:00
|
|
|
}
|
2008-02-28 03:51:49 +00:00
|
|
|
|
2008-01-08 17:11:43 +00:00
|
|
|
/*
|
|
|
|
* Booting a (Linux) kernel image
|
|
|
|
*
|
|
|
|
* Allocate space for command line and board info - the
|
|
|
|
* address should be as high as possible within the reach of
|
2008-10-16 13:01:15 +00:00
|
|
|
* the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
|
2008-01-08 17:11:43 +00:00
|
|
|
* memory, which means far enough below the current stack
|
|
|
|
* pointer.
|
|
|
|
*/
|
2008-01-31 12:58:13 +00:00
|
|
|
sp = get_sp();
|
2020-05-10 17:40:04 +00:00
|
|
|
debug("## Current stack ends at 0x%08lx\n", sp);
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2010-03-19 14:34:25 +00:00
|
|
|
/* adjust sp by 4K to be safe */
|
|
|
|
sp -= 4096;
|
2008-10-16 13:01:15 +00:00
|
|
|
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + get_effective_memsize() - sp));
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2011-01-31 21:51:20 +00:00
|
|
|
#ifdef CONFIG_MP
|
|
|
|
cpu_mp_lmb_reserve(lmb);
|
|
|
|
#endif
|
|
|
|
|
2008-10-17 02:52:08 +00:00
|
|
|
return ;
|
|
|
|
}
|
|
|
|
|
2011-12-07 04:42:58 +00:00
|
|
|
static void boot_prep_linux(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_MP
|
|
|
|
/*
|
|
|
|
* if we are MP make sure to flush the device tree so any changes are
|
|
|
|
* made visibile to all other cores. In AMP boot scenarios the cores
|
|
|
|
* might not be HW cache coherent with each other.
|
|
|
|
*/
|
|
|
|
flush_cache((unsigned long)images->ft_addr, images->ft_len);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
static int boot_cmdline_linux(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
ulong of_size = images->ft_len;
|
|
|
|
struct lmb *lmb = &images->lmb;
|
|
|
|
ulong *cmd_start = &images->cmdline_start;
|
|
|
|
ulong *cmd_end = &images->cmdline_end;
|
2008-10-17 02:52:08 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
int ret = 0;
|
2008-10-17 02:52:08 +00:00
|
|
|
|
2008-02-28 03:51:44 +00:00
|
|
|
if (!of_size) {
|
|
|
|
/* allocate space and init command line */
|
2011-03-28 09:58:34 +00:00
|
|
|
ret = boot_get_cmdline (lmb, cmd_start, cmd_end);
|
2008-02-28 03:51:49 +00:00
|
|
|
if (ret) {
|
|
|
|
puts("ERROR with allocation of cmdline\n");
|
2008-10-21 22:25:46 +00:00
|
|
|
return ret;
|
2008-02-28 03:51:49 +00:00
|
|
|
}
|
2008-10-21 22:25:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int boot_bd_t_linux(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
ulong of_size = images->ft_len;
|
|
|
|
struct lmb *lmb = &images->lmb;
|
2020-06-26 06:13:33 +00:00
|
|
|
struct bd_info **kbd = &images->kbd;
|
2008-10-21 22:25:46 +00:00
|
|
|
|
|
|
|
int ret = 0;
|
2008-02-28 03:51:44 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
if (!of_size) {
|
2008-02-28 03:51:44 +00:00
|
|
|
/* allocate space for kernel copy of board info */
|
2011-03-28 09:58:34 +00:00
|
|
|
ret = boot_get_kbd (lmb, kbd);
|
2008-02-28 03:51:49 +00:00
|
|
|
if (ret) {
|
|
|
|
puts("ERROR with allocation of kernel bd\n");
|
2008-10-21 22:25:46 +00:00
|
|
|
return ret;
|
2008-02-28 03:51:49 +00:00
|
|
|
}
|
2008-10-21 22:25:46 +00:00
|
|
|
set_clocks_in_mhz(*kbd);
|
2008-02-28 03:51:44 +00:00
|
|
|
}
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int boot_body_linux(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* allocate space for kernel copy of board info */
|
|
|
|
ret = boot_bd_t_linux(images);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
2013-05-08 08:06:04 +00:00
|
|
|
ret = image_setup_linux(images);
|
2008-08-15 13:24:38 +00:00
|
|
|
if (ret)
|
2008-10-21 22:25:46 +00:00
|
|
|
return ret;
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2020-05-10 17:40:03 +00:00
|
|
|
noinline int do_bootm_linux(int flag, int argc, char *const argv[],
|
|
|
|
bootm_headers_t *images)
|
2008-10-21 22:25:46 +00:00
|
|
|
{
|
|
|
|
int ret;
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
if (flag & BOOTM_STATE_OS_CMDLINE) {
|
|
|
|
boot_cmdline_linux(images);
|
|
|
|
return 0;
|
|
|
|
}
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
if (flag & BOOTM_STATE_OS_BD_T) {
|
|
|
|
boot_bd_t_linux(images);
|
|
|
|
return 0;
|
|
|
|
}
|
2008-01-08 17:11:43 +00:00
|
|
|
|
2011-12-07 04:42:58 +00:00
|
|
|
if (flag & BOOTM_STATE_OS_PREP) {
|
|
|
|
boot_prep_linux(images);
|
2008-10-21 22:25:46 +00:00
|
|
|
return 0;
|
2011-12-07 04:42:58 +00:00
|
|
|
}
|
2008-08-15 13:24:31 +00:00
|
|
|
|
2011-12-07 04:42:58 +00:00
|
|
|
boot_prep_linux(images);
|
2008-10-21 22:25:46 +00:00
|
|
|
ret = boot_body_linux(images);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
boot_jump_linux(images);
|
|
|
|
|
|
|
|
return 0;
|
2008-01-08 17:11:43 +00:00
|
|
|
}
|
2008-01-31 12:20:08 +00:00
|
|
|
|
2008-01-31 12:57:17 +00:00
|
|
|
static ulong get_sp (void)
|
|
|
|
{
|
|
|
|
ulong sp;
|
|
|
|
|
|
|
|
asm( "mr %0,1": "=r"(sp) : );
|
|
|
|
return sp;
|
|
|
|
}
|
|
|
|
|
2020-06-26 06:13:33 +00:00
|
|
|
static void set_clocks_in_mhz (struct bd_info *kbd)
|
2008-01-31 12:58:13 +00:00
|
|
|
{
|
|
|
|
char *s;
|
|
|
|
|
2017-08-03 18:22:12 +00:00
|
|
|
s = env_get("clocks_in_mhz");
|
|
|
|
if (s) {
|
2008-01-31 12:58:13 +00:00
|
|
|
/* convert all clock information to MHz */
|
|
|
|
kbd->bi_intfreq /= 1000000L;
|
|
|
|
kbd->bi_busfreq /= 1000000L;
|
|
|
|
#if defined(CONFIG_CPM2)
|
|
|
|
kbd->bi_cpmfreq /= 1000000L;
|
|
|
|
kbd->bi_brgfreq /= 1000000L;
|
|
|
|
kbd->bi_sccfreq /= 1000000L;
|
2008-03-26 10:48:46 +00:00
|
|
|
kbd->bi_vco /= 1000000L;
|
2008-01-31 12:58:13 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)
For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
Signed-off-by: Miao Yan <miao.yan@windriver.com>
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-28 09:51:38 +00:00
|
|
|
|
|
|
|
#if defined(CONFIG_BOOTM_VXWORKS)
|
|
|
|
void boot_prep_vxworks(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
#if defined(CONFIG_OF_LIBFDT)
|
|
|
|
int off;
|
|
|
|
u64 base, size;
|
|
|
|
|
|
|
|
if (!images->ft_addr)
|
|
|
|
return;
|
|
|
|
|
2020-08-12 11:16:36 +00:00
|
|
|
base = (u64)gd->ram_base;
|
|
|
|
size = (u64)gd->ram_size;
|
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)
For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
Signed-off-by: Miao Yan <miao.yan@windriver.com>
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-28 09:51:38 +00:00
|
|
|
|
|
|
|
off = fdt_path_offset(images->ft_addr, "/memory");
|
|
|
|
if (off < 0)
|
|
|
|
fdt_fixup_memory(images->ft_addr, base, size);
|
|
|
|
|
|
|
|
#if defined(CONFIG_MP)
|
|
|
|
#if defined(CONFIG_MPC85xx)
|
|
|
|
ft_fixup_cpu(images->ft_addr, base + size);
|
|
|
|
ft_fixup_num_cores(images->ft_addr);
|
|
|
|
#elif defined(CONFIG_MPC86xx)
|
|
|
|
off = fdt_add_mem_rsv(images->ft_addr,
|
|
|
|
determine_mp_bootpg(NULL), (u64)4096);
|
|
|
|
if (off < 0)
|
|
|
|
printf("## WARNING %s: %s\n", __func__, fdt_strerror(off));
|
|
|
|
ft_fixup_num_cores(images->ft_addr);
|
|
|
|
#endif
|
|
|
|
flush_cache((unsigned long)images->ft_addr, images->ft_len);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void boot_jump_vxworks(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
/* PowerPC VxWorks boot interface conforms to the ePAPR standard
|
|
|
|
* general purpuse registers:
|
|
|
|
*
|
|
|
|
* r3: Effective address of the device tree image
|
|
|
|
* r4: 0
|
|
|
|
* r5: 0
|
|
|
|
* r6: ePAPR magic value
|
|
|
|
* r7: shall be the size of the boot IMA in bytes
|
|
|
|
* r8: 0
|
|
|
|
* r9: 0
|
|
|
|
* TCR: WRC = 0, no watchdog timer reset will occur
|
|
|
|
*/
|
|
|
|
WATCHDOG_RESET();
|
|
|
|
|
|
|
|
((void (*)(void *, ulong, ulong, ulong,
|
|
|
|
ulong, ulong, ulong))images->ep)(images->ft_addr,
|
2017-08-03 18:22:15 +00:00
|
|
|
0, 0, EPAPR_MAGIC, env_get_bootm_mapsize(), 0, 0);
|
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
description mechanism. For PowerPC, the boot interface conforms to
the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)
For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
Signed-off-by: Miao Yan <miao.yan@windriver.com>
[trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
missing extern ft_fixup_num_cores]
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-28 09:51:38 +00:00
|
|
|
}
|
|
|
|
#endif
|