diff options
Diffstat (limited to 'blob/fw_payload.S')
-rw-r--r-- | blob/fw_payload.S | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/blob/fw_payload.S b/blob/fw_payload.S new file mode 100644 index 0000000..abc2495 --- /dev/null +++ b/blob/fw_payload.S @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel <anup.patel@wdc.com> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include "fw_common.S" + + .align 3 + .section .entry, "ax", %progbits + .global fw_next_arg1 +fw_next_arg1: + /* We return FDT destinetion address in 'a0' */ +#ifdef FW_PAYLOAD_FDT_OFFSET + /* a0 = destinetion FDT start address */ + la a0, payload_bin + li a1, FW_PAYLOAD_FDT_OFFSET + add a0, a0, a1 +#else + add a0, zero, zero +#endif + ret + + .align 3 + .section .entry, "ax", %progbits + .global fw_next_addr +fw_next_addr: + /* We return next address in 'a0' */ + la a0, payload_bin + ret + +#define str(s) #s +#define stringify(s) str(s) + + .section .payload, "ax", %progbits + .globl payload_bin +payload_bin: +#ifndef FW_PAYLOAD_PATH + wfi + j payload_bin +#else + .incbin stringify(FW_PAYLOAD_PATH) +#endif |