X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fpowerpc%2Flib%2Fbootm.c;h=0119a7b6ebf7e6c1a6edb7ce43fb14fa1bfdc389;hb=951c6baaf44c7fd4335b75fb92840d4e42c94927;hp=8233f1fd7b572e843d14e32e06bb001d8c3feafc;hpb=99ffccbd3e5b7bc715e2eed6ea6d36f4020b56d8;p=u-boot diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 8233f1fd7b..0119a7b6eb 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -36,10 +36,8 @@ #include #if defined(CONFIG_OF_LIBFDT) -#include #include #include - #endif #ifdef CONFIG_SYS_INIT_RAM_LOCK @@ -69,7 +67,7 @@ static void boot_jump_linux(bootm_headers_t *images) debug ("## Transferring control to Linux (at address %08lx) ...\n", (ulong)kernel); - show_boot_progress (15); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); #if defined(CONFIG_SYS_INIT_RAM_LOCK) && !defined(CONFIG_E500) unlock_ram_in_cache(); @@ -87,12 +85,6 @@ static void boot_jump_linux(bootm_headers_t *images) * r8: 0 * r9: 0 */ -#if defined(CONFIG_MPC85xx) || defined(CONFIG_440) - #define EPAPR_MAGIC (0x45504150) -#else - #define EPAPR_MAGIC (0x65504150) -#endif - debug (" Booting using OF flat tree...\n"); WATCHDOG_RESET (); (*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC, @@ -174,6 +166,18 @@ void arch_lmb_reserve(struct lmb *lmb) return ; } +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 +} + static int boot_cmdline_linux(bootm_headers_t *images) { ulong of_size = images->ft_len; @@ -314,7 +318,7 @@ static int boot_body_linux(bootm_headers_t *images) return 0; } -__attribute__((noinline)) +noinline int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { int ret; @@ -329,19 +333,17 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima return 0; } - /* - * We do nothing & report success to retain compatiablity with older - * versions of u-boot in which this use to flush the dcache on MP - * systems - */ - if (flag & BOOTM_STATE_OS_PREP) + if (flag & BOOTM_STATE_OS_PREP) { + boot_prep_linux(images); return 0; + } if (flag & BOOTM_STATE_OS_GO) { boot_jump_linux(images); return 0; } + boot_prep_linux(images); ret = boot_body_linux(images); if (ret) return ret;