blob: 760e32ed76161a0b72238ca153c0b5f3c76bd265 [file] [log] [blame]
Andrii Anisov355d1e42020-08-06 12:42:47 +03001/* SPDX-License-Identifier: GPL-2.0+
2 *
3 * (C) 2017 NXP
4 * (C) 2020 EPAM Systems Inc.
5 */
6
7#include <config.h>
8
9.align 8
10.global rom_pointer
11rom_pointer:
12 .space 32
13
14/*
15 * Routine: save_boot_params (called after reset from start.S)
16 */
17
18.global save_boot_params
19save_boot_params:
20 /* The firmware provided ATAG/FDT address can be found in r2/x0 */
21 adr x1, rom_pointer
22 stp x0, x2, [x1], #16
23 stp x3, x4, [x1], #16
24
25 /* Returns */
26 b save_boot_params_ret
27
28.global restore_boot_params
29restore_boot_params:
30 adr x1, rom_pointer
31 ldp x0, x2, [x1], #16
32 ldp x3, x4, [x1], #16
33 ret