mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
45 lines
813 B
ArmAsm
45 lines
813 B
ArmAsm
/*
|
|
* 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_JUMP_FDT_OFFSET
|
|
/* a0 = destinetion FDT start address */
|
|
la a0, _jump_addr
|
|
REG_L a0, (a0)
|
|
li a1, FW_JUMP_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, _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
|