diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2019-03-27 22:57:20 +0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-03-29 15:49:11 +0530 |
commit | 132f3e024b3c773000ef4dac3f6cae57eb335e1b (patch) | |
tree | 0ab5b55ffa38f5b92c112dff4d91f682fcfd9372 /firmware/fw_base.S | |
parent | e921fc26911bd27cf715483b60c22920812aab21 (diff) |
firmware: Introduce "options" in "struct sbi_scratch"
Introduce "options" in "struct sbi_scratch" and firmware can update
it based on optional compile time flags before calling sbi_init().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'firmware/fw_base.S')
-rw-r--r-- | firmware/fw_base.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 3bf7c6a..aed0917 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -81,6 +81,12 @@ _scratch_init: la a4, _hartid_to_scratch REG_S a4, SBI_SCRATCH_HARTID_TO_SCRATCH_OFFSET(tp) REG_S zero, SBI_SCRATCH_TMP0_OFFSET(tp) +#ifdef FW_OPTIONS + li a4, FW_OPTIONS + REG_S a4, SBI_SCRATCH_OPTIONS_OFFSET(tp) +#else + REG_S zero, SBI_SCRATCH_OPTIONS_OFFSET(tp) +#endif add t1, t1, t2 blt t1, s7, _scratch_init |