blob: 435eed521f62ad40ef68ffd8785e4da4f58590dd [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Cédric Schieliade243a2016-11-11 11:59:07 +01002/*
3 * (C) Copyright 2016
4 * Cédric Schieli <cschieli@gmail.com>
Cédric Schieliade243a2016-11-11 11:59:07 +01005 */
6
7#include <config.h>
8
9.align 8
10.global fw_dtb_pointer
11fw_dtb_pointer:
12#ifdef CONFIG_ARM64
13 .dword 0x0
14#else
15 .word 0x0
16#endif
17
18/*
19 * Routine: save_boot_params (called after reset from start.S)
20 * Description: save ATAG/FDT address provided by the firmware at boot time
21 */
22
23.global save_boot_params
24save_boot_params:
25
26 /* The firmware provided ATAG/FDT address can be found in r2/x0 */
27#ifdef CONFIG_ARM64
28 adr x8, fw_dtb_pointer
29 str x0, [x8]
30#else
31 str r2, fw_dtb_pointer
32#endif
33
34 /* Returns */
35 b save_boot_params_ret