diff mbox series

[v5,2/8] firmware: fw_base.S: Simplify address get

Message ID 20240302074235.12643-3-wxjstz@126.com
State Changes Requested
Headers show
Series Improvements to fw_base.S | expand

Commit Message

Xiang W March 2, 2024, 7:42 a.m. UTC
Simplify address get. Remove _link_start _link_end _load_start.

Signed-off-by: Xiang W <wxjstz@126.com>
---
 firmware/fw_base.S | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index cd94f15..d418041 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -52,15 +52,9 @@  _try_lottery:
 	amoadd.w a6, a7, (a6)
 	bnez	a6, _wait_for_boot_hart
 
-	/* Save load address */
-	lla	t0, _load_start
-	lla	t1, _fw_start
-	REG_S	t1, 0(t0)
-
 	/* relocate the global table content */
-	lla	t0, _link_start
-	REG_L	t0, 0(t0)
-	/* t1 shall has the address of _fw_start */
+	li	t0, FW_TEXT_START
+	lla	t1, _fw_start
 	sub	t2, t1, t0
 	lla	t0, __rel_dyn_start
 	lla	t1, __rel_dyn_end
@@ -398,12 +392,6 @@  _relocate_lottery:
 	RISCV_PTR	0
 _boot_status:
 	RISCV_PTR	0
-_load_start:
-	RISCV_PTR	_fw_start
-_link_start:
-	RISCV_PTR	FW_TEXT_START
-_link_end:
-	RISCV_PTR	_fw_reloc_end
 
 	.section .entry, "ax", %progbits
 	.align 3