Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Cédric Schieli | ade243a | 2016-11-11 11:59:07 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 |
| 4 | * Cédric Schieli <cschieli@gmail.com> |
Cédric Schieli | ade243a | 2016-11-11 11:59:07 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <config.h> |
| 8 | |
| 9 | .align 8 |
| 10 | .global fw_dtb_pointer |
| 11 | fw_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 |
| 24 | save_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 |