Andrii Anisov | 355d1e4 | 2020-08-06 12:42:47 +0300 | [diff] [blame^] | 1 | /* 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 |
| 11 | rom_pointer: |
| 12 | .space 32 |
| 13 | |
| 14 | /* |
| 15 | * Routine: save_boot_params (called after reset from start.S) |
| 16 | */ |
| 17 | |
| 18 | .global save_boot_params |
| 19 | save_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 |
| 29 | restore_boot_params: |
| 30 | adr x1, rom_pointer |
| 31 | ldp x0, x2, [x1], #16 |
| 32 | ldp x3, x4, [x1], #16 |
| 33 | ret |