Skip to content

Commit 85544aa

Browse files
josecmdanielRep
authored andcommitted
fix(mem): fetch img_addr variable address correctly in asm
Signed-off-by: Jose Martins <[email protected]>
1 parent c97ce05 commit 85544aa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/arch/armv8/aarch32/boot.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ _reset_handler:
5454
* Get base image load address.
5555
*/
5656
adr r1, _el2_entry
57-
ldr r3, =img_addr
57+
get_phys_addr r3, r4, img_addr
5858
str r1, [r3] // store image load address in img_addr
5959

6060
/**

src/arch/armv8/aarch64/boot.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ _reset_handler:
4848
mrs x0, MPIDR_EL1
4949
adrp x1, _image_start
5050

51-
ldr x2, =img_addr
51+
adr x2, img_addr
5252
str x1, [x2] // store image load address in img_addr
5353

5454
/*

src/arch/riscv/boot.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ _reset_handler:
9898
mv a2, a1
9999
la a1, _image_start
100100

101-
LD_SYM a3, img_addr
101+
la a3, img_addr
102102
STORE a1, 0(a3) // store image load address in img_addr
103103

104104
LD_SYM s6, _extra_allocated_phys_mem_sym

0 commit comments

Comments
 (0)