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