Skip to contentSkip to conversation

ARMv8: fix error in freeing stack frame

PATCH New zijun_hu 3 participants 3 messages Sep 23, 2017 – Oct 9, 2017 Arm (32-bit)

lore
Share & tools
lore

zijun_hu

author
#0 lore raw

PATCH 1/1 ARMv8: fix error in freeing stack frame

From: zijun_hu <[email protected]>

relocate_code() allocates 32 bytes stack frame but only 16 bytes are freed before return. it will cause errors to possible previous frames and doesn't make relocate_code() look like a function.

fix by freeing 32 bytes stack space

---
 arch/arm/lib/relocate_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/lib/relocate_64.S +1 -1
index c7600537063f..fdba004363af 100644
@@ -73,6 +73,6 @@ relocate_done:
 	isb	sy
 4:	ldp	x0, x1, [sp, #16]
 	bl	__asm_flush_dcache_range
-5:	ldp	x29, x30, [sp],#16
+5:	ldp	x29, x30, [sp],#32
 	ret
 ENDPROC(relocate_code)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARMv8: fix error in freeing stack frame

Quoted 6 lines · zijun_hu

From: zijun_hu <[email protected]>

relocate_code() allocates 32 bytes stack frame but only 16 bytes are freed before return. it will cause errors to possible previous frames and doesn't make relocate_code() look like a function.

Quoted 6 lines

fix by freeing 32 bytes stack space

---
 arch/arm/lib/relocate_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

PATCH 1/1 ARMv8: fix error in freeing stack frame

In reply to zijun_hu
Quoted 10 lines · zijun_hu

From: zijun_hu <[email protected]>

relocate_code() allocates 32 bytes stack frame but only 16 bytes are freed before return. it will cause errors to possible previous frames and doesn't make relocate_code() look like a function.

fix by freeing 32 bytes stack space

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/989ff4f3/attachment.sig>