X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fx86%2Flib%2Fboard.c;h=a240d261716e7c203726a6c155304537a1cc341f;hb=b843f3119339a5ab18d0c0fbff788093deaaed3f;hp=b64c2d3ca385ba0db8c27ff72b517578bb2b8ddf;hpb=9e6c572ff03cda84c88663b23c7157d8b1f275ac;p=oweals%2Fu-boot.git diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index b64c2d3ca3..a240d26171 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -131,15 +131,11 @@ init_fnc_t *init_sequence_f[] = { console_init_f, dram_init_f, calculate_relocation_address, - copy_uboot_to_ram, - clear_bss, - do_elf_reloc_fixups, NULL, }; init_fnc_t *init_sequence_r[] = { - copy_gd_to_ram, cpu_init_r, /* basic cpu dependent setup */ board_early_init_r, /* basic board dependent setup */ dram_init, /* configure available RAM banks */ @@ -252,8 +248,6 @@ void board_init_f(ulong boot_flags) hang(); } - gd->flags |= GD_FLG_RELOC; - /* * SDRAM is now initialised, U-Boot has been copied into SDRAM, * the BSS has been cleared etc. The final stack can now be setup @@ -270,6 +264,16 @@ void board_init_f(ulong boot_flags) void board_init_f_r(void) { + if (copy_gd_to_ram() != 0) + hang(); + + if (init_cache() != 0) + hang(); + + copy_uboot_to_ram(); + clear_bss(); + do_elf_reloc_fixups(); + /* * Transfer execution from Flash to RAM by calculating the address * of the in-RAM copy of board_init_r() and calling it @@ -322,6 +326,8 @@ void board_init_r(gd_t *id, ulong dest_addr) /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("" : : : "memory"); + gd->flags |= GD_FLG_RELOC; + gd->bd = &bd_data; memset(gd->bd, 0, sizeof(bd_t)); show_boot_progress(0x22);