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_jump.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_jump.S')
-rw-r--r-- | firmware/fw_jump.S | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/firmware/fw_jump.S b/firmware/fw_jump.S new file mode 100644 index 0000000..d05d87f --- /dev/null +++ b/firmware/fw_jump.S @@ -0,0 +1,48 @@ +/* + * 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' */ + add a0, zero, zero + ret + + .align 3 + .section .entry, "ax", %progbits + .global fw_next_arg1 +fw_next_arg1: + /* We return next arg1 in 'a0' */ +#ifdef FW_JUMP_FDT_ADDR + li a0, FW_JUMP_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, _jump_addr + REG_L a0, (a0) + ret + +#ifndef FW_JUMP_ADDR +#error "Must define FW_JUMP_ADDR" +#endif + + .align 3 + .section .entry, "ax", %progbits +_jump_addr: + RISCV_PTR FW_JUMP_ADDR |