mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-18 16:01:32 +01:00
Tom reports that adding more Kconfig options fails with board/raspberrypi/rpi/lowlevel_init.o: in function `save_boot_params': board/raspberrypi/rpi/lowlevel_init.S:20:(.text+0x0): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21 against symbol `fw_dtb_pointer' defined in .data section in board/raspberrypi/rpi/rpi.o make: *** [Makefile:2029: u-boot] Error 1 Since fw_dtb_pointer lives in .data it might end up above the +-1MB that adr can reach. So switch over to adrp+add which has a +-4gb reach. Reported-by: Tom Rini <trini@konsulko.com> Closes: https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2 Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
29 lines
580 B
ArmAsm
29 lines
580 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2016
|
|
* Cédric Schieli <cschieli@gmail.com>
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
/*
|
|
* Routine: save_boot_params (called after reset from start.S)
|
|
* Description: save ATAG/FDT address provided by the firmware at boot time
|
|
*/
|
|
|
|
.global save_boot_params
|
|
save_boot_params:
|
|
|
|
/* The firmware provided ATAG/FDT address can be found in r2/x0 */
|
|
#ifdef CONFIG_ARM64
|
|
adrp x8, fw_dtb_pointer
|
|
add x8, x8, #:lo12:fw_dtb_pointer
|
|
str x0, [x8]
|
|
#else
|
|
ldr r8, =fw_dtb_pointer
|
|
str r2, [r8]
|
|
#endif
|
|
|
|
/* Returns */
|
|
b save_boot_params_ret
|