summaryrefslogtreecommitdiff
path: root/board/raspberrypi/rpi/rpi.c
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2019-11-19 18:01:02 +0300
committerMatthias Brugger <mbrugger@suse.com>2019-11-24 12:46:27 +0300
commit37964494c03f0d23c58c0e43cd694df0733ec1ca (patch)
treec550de134d1f2d54af02532e216201374b6fe4a3 /board/raspberrypi/rpi/rpi.c
parent3f8b8e303655397a15d53660884c8de7c6cdf49f (diff)
downloadu-boot-37964494c03f0d23c58c0e43cd694df0733ec1ca.tar.xz
rpi: push fw_dtb_pointer in the .data section
The fw_dtb_pointer was defined in the assembly code, which makes him live in section .text_rest Put that's not necessary, we can push the variable in the .data section. This will prevent relocation errors like: board/raspberrypi/rpi/rpi.c:317:(.text.board_get_usable_ram_top+0x8): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol `fw_dtb_pointer' defined in .text section in board/raspberrypi/rpi/built-in.o Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'board/raspberrypi/rpi/rpi.c')
-rw-r--r--board/raspberrypi/rpi/rpi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 9e0abdda31..e84a1db14a 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -27,8 +27,11 @@
DECLARE_GLOBAL_DATA_PTR;
-/* From lowlevel_init.S */
-extern unsigned long fw_dtb_pointer;
+/* Assigned in lowlevel_init.S
+ * Push the variable into the .data section so that it
+ * does not get cleared later.
+ */
+unsigned long __section(".data") fw_dtb_pointer;
/* TODO(sjg@chromium.org): Move these to the msg.c file */
struct msg_get_arm_mem {