2008-01-08 17:11:43 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2008 Semihalf
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2006
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-08 17:11:43 +00:00
|
|
|
*/
|
|
|
|
|
2008-01-31 12:20:06 +00:00
|
|
|
|
2008-01-08 17:11:43 +00:00
|
|
|
#include <common.h>
|
|
|
|
#include <watchdog.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <image.h>
|
|
|
|
#include <malloc.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 <environment.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)
|
|
|
|
#include <libfdt.h>
|
|
|
|
#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);
|
2008-01-31 12:58:13 +00:00
|
|
|
static void set_clocks_in_mhz (bd_t *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
|
|
|
|
|
2016-11-26 02:02:10 +00:00
|
|
|
int arch_fixup_fdt(void *blob)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-10-21 22:25:46 +00:00
|
|
|
static void boot_jump_linux(bootm_headers_t *images)
|
|
|
|
{
|
|
|
|
void (*kernel)(bd_t *, ulong r4, ulong r5, ulong r6,
|
|
|
|
ulong r7, ulong r8, ulong r9);
|
|
|
|
#ifdef CONFIG_OF_LIBFDT
|
|
|
|
char *of_flat_tree = images->ft_addr;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
kernel = (void (*)(bd_t *, ulong, ulong, ulong,
|
|
|
|
ulong, ulong, ulong))images->ep;
|
|
|
|
debug ("## Transferring control to Linux (at address %08lx) ...\n",
|
|
|
|
(ulong)kernel);
|
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
debug (" Booting using OF flat tree...\n");
|
2009-08-12 08:17:03 +00:00
|
|
|
WATCHDOG_RESET ();
|
2008-10-21 22:25:46 +00:00
|
|
|
(*kernel) ((bd_t *)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;
|
|
|
|
bd_t *kbd = images->kbd;
|
|
|
|
|
|
|
|
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();
|
2008-02-28 03:51:50 +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;
|
|
|
|
bd_t **kbd = &images->kbd;
|
|
|
|
|
|
|
|
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
|
|
|
|
include/linux/byteorder: import latest endian definitions from linux
u-boot's byteorder headers did not contain endianness attributions
for use with sparse, causing a lot of false positives. Import the
kernel's latest definitions, and enable them by including compiler.h
and types.h. They come with 'const' added for some swab functions, so
fix those up, too:
include/linux/byteorder/big_endian.h:46:2: warning: passing argument 1 of '__swab64p' discards 'const' qualifier from pointer target type [enabled by default]
Also, note: u-boot's historic __BYTE_ORDER definition has been
preserved (for the time being at least).
We also remove ad-hoc barrier() definitions, since we're including
compiler.h in files that hadn't in the past:
macb.c:54:0: warning: "barrier" redefined [enabled by default]
In addition, including compiler.h in byteorder changes the 'noinline'
definition to expand to __attribute__((noinline)). This fixes
arch/powerpc/lib/bootm.c:
bootm.c:329:16: error: attribute '__attribute__': unknown attribute
bootm.c:329:16: error: expected ')' before '__attribute__'
bootm.c:329:25: error: expected identifier or '(' before ')' token
powerpc sparse builds yield:
include/common.h:356:22: error: marked inline, but without a definition
the unknown-reason inlining without a definition is considered obsolete
given it was part of the 2002 initial commit, and no arm version was
'fixed.'
also fixed:
ydirectenv.h:60:0: warning: "inline" redefined [enabled by default]
and:
Configuring for devconcenter - Board: intip, Options: DEVCONCENTER
make[1]: *** [4xx_ibm_ddr2_autocalib.o] Error 1
make: *** [arch/powerpc/cpu/ppc4xx/libppc4xx.o] Error 2
powerpc-fsl-linux-size: './u-boot': No such file
4xx_ibm_ddr2_autocalib.c: In function 'DQS_autocalibration':
include/asm/ppc4xx-sdram.h:1407:13: sorry, unimplemented: inlining failed in call to 'ppc4xx_ibm_ddr2_register_dump': function body not available
4xx_ibm_ddr2_autocalib.c:1243:32: sorry, unimplemented: called from here
and:
In file included from crc32.c:50:0:
crc32table.h:4:1: warning: implicit declaration of function '___constant_swab32' [-Wimplicit-function-declaration]
crc32table.h:4:1: error: initializer element is not constant
crc32table.h:4:1: error: (near initialization for 'crc32table_le[0]')
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
[trini: Remove '#endif' in include/common.h around setenv portion]
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-29 13:34:23 +00:00
|
|
|
noinline
|
2010-06-28 20:00:46 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2008-01-31 12:58:13 +00:00
|
|
|
static void set_clocks_in_mhz (bd_t *kbd)
|
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
|
|
|
base = (u64)gd->bd->bi_memstart;
|
|
|
|
size = (u64)gd->bd->bi_memsize;
|
|
|
|
|
|
|
|
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
|