summaryrefslogtreecommitdiff
path: root/purgatory/arch
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2011-08-19 15:09:51 +0200
committerSimon Horman <horms@verge.net.au>2011-08-20 18:03:32 +0900
commitd571055038a49d140a9240067546c414d4c27579 (patch)
tree9b0b117547706c2100b68f9bcdc6c2d7110a38e2 /purgatory/arch
parentd866fa444cc47097c07b3d31c494fdacd977f6d8 (diff)
kexec-tools: Allow to call verify_sha256_digest() from kernel
For s390 we first want to check if kdump checksums are valid before we start the kdump kernel. With this patch on s390 the purgatory entry point is called with a parameter. If the parameter is "0", only the checksum test is done and the result (0 = ok, 1 = invalid) is passed as return code back to the caller (kernel). If the parameter is "1", the complete purgatory code is executed and kdump is started. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory/arch')
-rw-r--r--purgatory/arch/s390/setup-s390.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/purgatory/arch/s390/setup-s390.S b/purgatory/arch/s390/setup-s390.S
index 6db75fd..db78735 100644
--- a/purgatory/arch/s390/setup-s390.S
+++ b/purgatory/arch/s390/setup-s390.S
@@ -11,12 +11,23 @@
.balign 16
purgatory_start:
#ifdef __s390x__
+ larl %r5,gprs_save_area
+ stmg %r6,%r15,0(%r5)
larl %r15,lstack_end
aghi %r15,-160
+
+ clgfi %r2,0
+ je verify_checksums
+
brasl %r14,purgatory
larl %r14,kdump_psw
lpswe 0(%r14)
+verify_checksums:
+ brasl %r14,verify_sha256_digest
+ larl %r5,gprs_save_area
+ lmg %r6,%r15,0(%r5)
+ br %r14
.section ".data"
.balign 16
kdump_psw:
@@ -24,6 +35,9 @@ kdump_psw:
.quad 0x0000000000010010
.bss
+gprs_save_area:
+ .fill 80
+
.balign 4096
lstack:
.skip 4096