aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-12-08 22:22:42 +1000
committerOliver O'Halloran <oohall@gmail.com>2019-12-16 14:50:56 +1100
commit266573939475c2ad4c93182a0775b8aaff348642 (patch)
tree5cd92a240d604dbae116150463eca201b1a459fb /asm
parent87a470c28d9c9cd3430093d1e826a472343c88e0 (diff)
downloadskiboot-266573939475c2ad4c93182a0775b8aaff348642.zip
skiboot-266573939475c2ad4c93182a0775b8aaff348642.tar.gz
skiboot-266573939475c2ad4c93182a0775b8aaff348642.tar.bz2
asm/cvc_entry.S: r2 save fix
The TOC save area for the current stack frame should be used to save r2, not the caller's frame. Acked-by: Stewart Smith <stewart@flamingspork.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/cvc_entry.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/asm/cvc_entry.S b/asm/cvc_entry.S
index 1296e88..3e8b3fd 100644
--- a/asm/cvc_entry.S
+++ b/asm/cvc_entry.S
@@ -24,6 +24,11 @@
#.include "kernel/ppcconsts.S"
+# Updated hostboot location is src/securerom/rom_entry.S.
+# This also has a fix for TOC save frame pointer.
+
+#include <stack.h>
+
.section .text
.global __cvc_verify_v1
@@ -33,10 +38,10 @@ __cvc_verify_v1:
__cvc_sha512_v1:
call_rom_entry:
- std %r2, 40(%r1)
mflr %r0
std %r0, 16(%r1)
stdu %r1, -128(%r1)
+ std %r2, STACK_TOC_OFFSET(%r1)
li %r2, 0
mtctr %r3
mr %r3, %r4
@@ -45,8 +50,8 @@ call_rom_entry:
mr %r6, %r7
mr %r7, %r8
bctrl
+ ld %r2, STACK_TOC_OFFSET(%r1)
addi %r1, %r1, 128
- ld %r2, 40(%r1)
ld %r0, 16(%r1)
mtlr %r0
blr