summaryrefslogtreecommitdiff
path: root/firmware/fw_payload.S
AgeCommit message (Collapse)AuthorFilesLines
2020-10-18firmware: Remove FW_PAYLOAD_FDT_PATH compile-time optionAnup Patel1-25/+0
The FW_PAYLOAD_FDT_PATH compile-time option is replaced by FW_FDT_PATH compile-time option which is more flexible and common across all OpenSBI firmwares. This patch removes FW_PAYLOAD_FDT_PATH and updates related documentation to use FW_FDT_PATH. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-01-10firmware: Fix placement of .align directivesAndreas Schwab1-19/+9
Move the .align directives after switching the section. We want to align the start of the current section, not the end of the previous section. This also obsoletes the misguided workaround of disabling relaxation. Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2019-12-27firmware: Improve comments for fw_prev_arg1() and fw_next_arg1()Anup Patel1-0/+4
The state of a0, a1, and a2 registers in fw_prev_arg1() and fw_next_arg1() is same as passed by previous booting stage so we add this info in comments for both these functions. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-12-27firmware: Return real DTB address when FW_xyz_FDT_ADDR is not definedLiu Yibin1-1/+1
Function fw_next_arg1 in firmware/fw_jump.S:59 and firmware/fw_payload.S:63 should return real dtb address(if specified in a1) in a0, in case we don't want to specify FW_xyz_FDT_ADDR when compiling. Signed-off-by: Liu Yibin <yibin_liu@c-sky.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2019-11-15firmware: Add preferred boot HART field in struct fw_dynamic_infoAnup Patel1-0/+13
It has been reported that link address range of previous booting stage (such as U-Boot SPL) can overlap the link address rage of FW_DYNAMIC. This means self-relocation in FW_DYNAMIC can potentially corrupt previous booting stage if any of the secondary HART enter FW_DYNAMIC before primary HART. To tackle this, we add preferred boot HART field (i.e boot_hart) in struct fw_dyanmic_info. We use this field to force secondary HARTs into relocation wait loop till preferred/primary boot HART enters FW_DYNAMIC completes self-relocation. If preferred boot HART is not available then we fall back to relocation lottery approach. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-10-28firmware: Fix compile error for FW_PAYLOAD with latest GCC binutilsAnup Patel1-0/+10
We get following compile error for FW_PAYLOAD with latest GCC binutils: fw_payload.o(.text+0x1961): 15 bytes required for alignment to 16-byte boundary, but only 14 present Further investigating, it turn-out to be a known issue with RISC-V GCC binutils. (Refer, https://github.com/riscv/riscv-gnu-toolchain/issues/298) As a work-around, we disable relaxation when including DTB and PAYLOAD binary in fw_payload.S. Reported-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Tested-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-05-10firmware: Allow firmwares to provide next mode and optionsAnup Patel1-6/+50
This patch extends existing firmwares (i.e. fw_jump and fw_payload) to explicitly provide next mode and options to fw_base. We also introduce fw_save_info() which is called by fw_base very early on boot HART. This function can be used by existing firmwares (i.e. fw_jump and fw_payload) to save information passed by previous booting stage. Overall, this is a preparatory patch for implementing fw_dynamic. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-02-15firmware: Ensure the payloads are 4 bit allignedAlistair Francis1-4/+5
We expect the payloads to be 4 bit alligned as we later AND them with ~0xf. As most of the addresses are manually specified we don't really need this, but better to be over cautious. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-02-06firwmare: don't expand macros in FW_PAYLOAD_PATHAndreas Schwab1-5/+2
Signed-off-by: Andreas Schwab <schwab@suse.de>
2019-01-24all: Update copyright header in all filesAnup patel1-3/+3
This patch updates copyright header in all files as follows: 1. Makes "SPDX-License-Identifier: BSD-2-Clause" as first line 2. Change copyright year to 2019 for Western Digital Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-27firmware: Rename fw_common.S to fw_base.SAnup Patel1-1/+1
The fw_common.S is the base firmware extendend by fw_jump and fw_payload. This patch renames fw_common.S to fw_base.S to have more clear/intutive name for base firmware. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-21top: Rename "blob" to "firmware" everywhereAnup Patel1-0/+63
This patch renames "blob" to "firmware" everywhere for better and intutive naming. Signed-off-by: Anup Patel <anup@brainfault.org>