diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-21 09:52:27 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2018-12-21 09:52:27 +0530 |
commit | b023176c17e655f9371df65f6fddc0c1bcbb1fc7 (patch) | |
tree | f23c6dc60af1a8c3206ed59d64e36495671d31a5 /firmware/fw_payload.S | |
parent | ab5b228ff596657dffce4a2ed96cd73a95e1864b (diff) |
top: Rename "blob" to "firmware" everywhere
This patch renames "blob" to "firmware" everywhere for better
and intutive naming.
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'firmware/fw_payload.S')
-rw-r--r-- | firmware/fw_payload.S | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/firmware/fw_payload.S b/firmware/fw_payload.S new file mode 100644 index 0000000..b6f3cb9 --- /dev/null +++ b/firmware/fw_payload.S @@ -0,0 +1,63 @@ +/* + * 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_prev_arg1 +fw_prev_arg1: + /* We return previous arg1 in 'a0' */ +#ifdef FW_PAYLOAD_FDT_PATH + la a0, fdt_bin +#else + add a0, zero, zero +#endif + ret + + .align 3 + .section .entry, "ax", %progbits + .global fw_next_arg1 +fw_next_arg1: + /* We return next arg1 in 'a0' */ +#ifdef FW_PAYLOAD_FDT_ADDR + li a0, FW_PAYLOAD_FDT_ADDR +#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) + +#ifdef FW_PAYLOAD_FDT_PATH + .align 3 + .section .text, "ax", %progbits + .globl fdt_bin +fdt_bin: + .incbin stringify(FW_PAYLOAD_FDT_PATH) +#endif + + .section .payload, "ax", %progbits + .globl payload_bin +payload_bin: +#ifndef FW_PAYLOAD_PATH + wfi + j payload_bin +#else + .incbin stringify(FW_PAYLOAD_PATH) +#endif |