X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fboard_r.c;h=fd1fd319b6351cfce2c4dff0b6a4860259d7b3e8;hb=10e167329b029890a4c704f094822da5f259b886;hp=63c69365b19733ed53a29ef71c370a644e03087a;hpb=be274b99abd5d8ef3b57aa16a3443b0950002c94;p=u-boot diff --git a/common/board_r.c b/common/board_r.c index 63c69365b1..fd1fd319b6 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -136,7 +136,7 @@ static int initr_reloc_global_data(void) { #ifdef CONFIG_SYS_SYM_OFFSETS monitor_flash_len = _end_ofs; -#else +#elif !defined(CONFIG_SANDBOX) monitor_flash_len = (ulong)&__init_end - gd->dest_addr; #endif #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) @@ -264,7 +264,8 @@ static int initr_malloc(void) /* The malloc area is immediately below the monitor copy in DRAM */ malloc_start = gd->dest_addr - TOTAL_MALLOC_LEN; - mem_malloc_init(malloc_start, TOTAL_MALLOC_LEN); + mem_malloc_init((ulong)map_sysmem(malloc_start, TOTAL_MALLOC_LEN), + TOTAL_MALLOC_LEN); return 0; } @@ -507,11 +508,13 @@ static int show_model_r(void) #endif /* enable exceptions */ +#ifdef CONFIG_ARM static int initr_enable_interrupts(void) { enable_interrupts(); return 0; } +#endif #ifdef CONFIG_CMD_NET static int initr_ethaddr(void) @@ -689,6 +692,9 @@ static int initr_modem(void) static int run_main_loop(void) { +#ifdef CONFIG_SANDBOX + sandbox_main_loop_init(); +#endif /* main_loop() can return to retry autoboot, if so just run it again */ for (;;) main_loop(); @@ -719,9 +725,6 @@ init_fnc_t init_sequence_r[] = { */ #ifdef CONFIG_CLOCKS set_cpu_clk_info, /* Setup clock information */ -#endif -#ifdef CONFIG_X86 - init_bd_struct_r, #endif initr_reloc_global_data, initr_serial, @@ -762,6 +765,7 @@ init_fnc_t init_sequence_r[] = { #endif initr_barrier, initr_malloc, + bootstage_relocate, #ifdef CONFIG_ARCH_EARLY_INIT_R arch_early_init_r, #endif