aboutsummaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-23 12:09:57 +0530
committerAnup Patel <anup@brainfault.org>2020-06-05 09:02:32 +0530
commit4ce6b7a82ac2c9f57186c00f23223dd39067555b (patch)
tree3e876d060f16facf500bbdd3d25c6381c62f913b /firmware
parent64f140830d758ebcf9d9b6ab071ae24fcc37b884 (diff)
downloadopensbi-4ce6b7a82ac2c9f57186c00f23223dd39067555b.zip
opensbi-4ce6b7a82ac2c9f57186c00f23223dd39067555b.tar.gz
opensbi-4ce6b7a82ac2c9f57186c00f23223dd39067555b.tar.bz2
firmware: fw_base: Don't OR forced FW_OPTIONS
Currently, we are ORing FW_OPTIONS with the options passed by previous booting stage to fw_dynamic. This causes confusion because compiling fw_dynamic with FW_OPTIONS=0x2 does not force enable boot prints as the U-Boot SPL passes options=0x1 in fw_dyanmic_info. The best thing to do is always prefer FW_OPTIONS when available. This is intuitive for OpenSBI users and easy in debugging. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/fw_base.S8
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index b28119a..b354cb8 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -268,13 +268,11 @@ _scratch_init:
/* Store firmware options in scratch space */
MOV_3R s0, a0, s1, a1, s2, a2
#ifdef FW_OPTIONS
- li a4, FW_OPTIONS
+ li a0, FW_OPTIONS
#else
- add a4, zero, zero
-#endif
call fw_options
- or a4, a4, a0
- REG_S a4, SBI_SCRATCH_OPTIONS_OFFSET(tp)
+#endif
+ REG_S a0, SBI_SCRATCH_OPTIONS_OFFSET(tp)
MOV_3R a0, s0, a1, s1, a2, s2
/* Move to next scratch space */
add t1, t1, t2