mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-12 16:08:32 +00:00
Instead of placing FDT (passed by previous booting stage) at a location relative to next address we should have absolute location of placing FDT so that we more freedom of placing FDT. This will be particularly useful for platforms/boards with very less RAM (such as Kendryte board). Due to above motivation, we rename FW_xyz_FDT_OFFSET options to FW_xyz_FDT_ADDR options and use FW_xyz_FDT_ADDR options as absolute address for placing FDT. Signed-off-by: Anup Patel <anup.patel@wdc.com>
41 lines
758 B
ArmAsm
41 lines
758 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 destination address in 'a0' */
|
|
#ifdef FW_JUMP_FDT_ADDR
|
|
/* a0 = destination FDT start address */
|
|
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
|