blob: 8c39b3e12e8050feee42e512cfbb912b487dc6ad [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
Cédric Schieliade243a2016-11-11 11:59:07 +01009/*
10 * Routine: save_boot_params (called after reset from start.S)
11 * Description: save ATAG/FDT address provided by the firmware at boot time
12 */
13
14.global save_boot_params
15save_boot_params:
16
17 /* The firmware provided ATAG/FDT address can be found in r2/x0 */
18#ifdef CONFIG_ARM64
19 adr x8, fw_dtb_pointer
20 str x0, [x8]
21#else
Matthias Brugger37964492019-11-19 16:01:02 +010022 ldr r8, =fw_dtb_pointer
23 str r2, [r8]
Cédric Schieliade243a2016-11-11 11:59:07 +010024#endif
25
26 /* Returns */
27 b save_boot_params_ret