[PATCH v5 5/8] firmware: fw_base.S: Remove _relocate_lottery
Xiang W
wxjstz at 126.com
Fri Mar 1 23:42:24 PST 2024
Remove _relocate_lottery and use _boot_status instead
Signed-off-by: Xiang W <wxjstz at 126.com>
---
firmware/fw_base.S | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index f0dd0da..6f40d82 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -14,7 +14,8 @@
#include <sbi/sbi_scratch.h>
#include <sbi/sbi_trap.h>
-#define BOOT_STATUS_BOOT_HART_DONE 1
+#define BOOT_STATUS_LOTTERY_DONE 1
+#define BOOT_STATUS_BOOT_HART_DONE 2
.macro MOV_3R __d0, __s0, __d1, __s1, __d2, __s2
add \__d0, \__s0, zero
@@ -47,9 +48,9 @@ _start:
bne a0, a6, _wait_for_boot_hart
_try_lottery:
/* Jump to relocation wait loop if we don't get relocation lottery */
- lla a6, _relocate_lottery
- li a7, 1
- amoadd.w a6, a7, (a6)
+ lla a6, _boot_status
+ li a7, BOOT_STATUS_LOTTERY_DONE
+ amoswap.w a6, a7, (a6)
bnez a6, _wait_for_boot_hart
/* relocate the global table content */
@@ -380,8 +381,6 @@ _skip_trap_handler_rv32_hyp:
.data
.align 3
-_relocate_lottery:
- RISCV_PTR 0
_boot_status:
RISCV_PTR 0
--
2.43.0
More information about the opensbi
mailing list