mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
x86: Move work-around out of cpu_jump_to_64bit_uboot()
At present this function copies U-Boot from the last 1MB of ROM. This is not the right way to do it. Instead, the binman symbol should provide the location. But in any case the code should live in the caller, spl_board_load_image(), so that the 64-bit jump function can be used elsewhere. Move it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
c2018cdd71
commit
37897c4073
2 changed files with 13 additions and 10 deletions
|
@ -614,16 +614,6 @@ int cpu_jump_to_64bit_uboot(ulong target)
|
|||
|
||||
func = (func_t)ptr;
|
||||
|
||||
/*
|
||||
* Copy U-Boot from ROM
|
||||
* TODO(sjg@chromium.org): Figure out a way to get the text base
|
||||
* correctly here, and in the device-tree binman definition.
|
||||
*
|
||||
* Also consider using FIT so we get the correct image length and
|
||||
* parameters.
|
||||
*/
|
||||
memcpy((char *)target, (char *)0xfff00000, 0x100000);
|
||||
|
||||
/* Jump to U-Boot */
|
||||
func((ulong)pgtable, 0, (ulong)target);
|
||||
|
||||
|
|
|
@ -207,6 +207,19 @@ static int spl_board_load_image(struct spl_image_info *spl_image,
|
|||
spl_image->os = IH_OS_U_BOOT;
|
||||
spl_image->name = "U-Boot";
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SYS_COREBOOT)) {
|
||||
/*
|
||||
* Copy U-Boot from ROM
|
||||
* TODO(sjg@chromium.org): Figure out a way to get the text base
|
||||
* correctly here, and in the device-tree binman definition.
|
||||
*
|
||||
* Also consider using FIT so we get the correct image length
|
||||
* and parameters.
|
||||
*/
|
||||
memcpy((char *)spl_image->load_addr, (char *)0xfff00000,
|
||||
0x100000);
|
||||
}
|
||||
|
||||
debug("Loading to %lx\n", spl_image->load_addr);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue