mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-05 12:39:47 +00:00
firmware: Move _boot_hart_done to the data section
Writable code section can cause some security problems, so move _boot_hart_done to the data section Signed-off-by: Xiang Wang <wxjstz@126.com>
This commit is contained in:
parent
a72467f574
commit
1c87f0f9b1
1 changed files with 5 additions and 6 deletions
|
@ -111,12 +111,6 @@ _fdt_reloc_done:
|
||||||
la a4, _boot_hart_done
|
la a4, _boot_hart_done
|
||||||
li a5, 1
|
li a5, 1
|
||||||
REG_S a5, (a4)
|
REG_S a5, (a4)
|
||||||
j _wait_for_boot_hart
|
|
||||||
|
|
||||||
.align 3
|
|
||||||
_boot_hart_done:
|
|
||||||
RISCV_PTR 0
|
|
||||||
.align 3
|
|
||||||
|
|
||||||
/* Wait for boot hart */
|
/* Wait for boot hart */
|
||||||
_wait_for_boot_hart:
|
_wait_for_boot_hart:
|
||||||
|
@ -197,6 +191,11 @@ _start_warm:
|
||||||
/* We don't expect to reach here hence just hang */
|
/* We don't expect to reach here hence just hang */
|
||||||
j _start_hang
|
j _start_hang
|
||||||
|
|
||||||
|
.align 3
|
||||||
|
.section .data, "aw"
|
||||||
|
_boot_hart_done:
|
||||||
|
RISCV_PTR 0
|
||||||
|
|
||||||
.align 3
|
.align 3
|
||||||
.section .entry, "ax", %progbits
|
.section .entry, "ax", %progbits
|
||||||
.globl _hartid_to_scratch
|
.globl _hartid_to_scratch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue