aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <silbe@linux.vnet.ibm.com>2016-07-04 11:16:47 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-08-08 09:41:31 -0400
commitbf47dc572aaf53c3f2311c71e03ec01be3131fd6 (patch)
tree199076746e7013463f782b78dcfa1b86fb463986
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
s390: clarify compressed image code path
The way the decompressor is hooked into the start-up code is rather subtle, with a mix of multiply-defined symbols and hardcoded address literals. Add some comments at the junction points to clarify how it works. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/boot/compressed/head.S11
-rw-r--r--arch/s390/kernel/head.S4
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/s390/boot/compressed/head.S b/arch/s390/boot/compressed/head.S
index f86a4eef28a9..28c4f96a2d9c 100644
--- a/arch/s390/boot/compressed/head.S
+++ b/arch/s390/boot/compressed/head.S
@@ -21,16 +21,21 @@ ENTRY(startup_continue)
21 lg %r15,.Lstack-.LPG1(%r13) 21 lg %r15,.Lstack-.LPG1(%r13)
22 aghi %r15,-160 22 aghi %r15,-160
23 brasl %r14,decompress_kernel 23 brasl %r14,decompress_kernel
24 # setup registers for memory mover & branch to target 24 # Set up registers for memory mover. We move the decompressed image to
25 # 0x11000, starting at offset 0x11000 in the decompressed image so
26 # that code living at 0x11000 in the image will end up at 0x11000 in
27 # memory.
25 lgr %r4,%r2 28 lgr %r4,%r2
26 lg %r2,.Loffset-.LPG1(%r13) 29 lg %r2,.Loffset-.LPG1(%r13)
27 la %r4,0(%r2,%r4) 30 la %r4,0(%r2,%r4)
28 lg %r3,.Lmvsize-.LPG1(%r13) 31 lg %r3,.Lmvsize-.LPG1(%r13)
29 lgr %r5,%r3 32 lgr %r5,%r3
30 # move the memory mover someplace safe 33 # Move the memory mover someplace safe so it doesn't overwrite itself.
31 la %r1,0x200 34 la %r1,0x200
32 mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13) 35 mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13)
33 # decompress image is started at 0x11000 36 # When the memory mover is done we pass control to
37 # arch/s390/kernel/head64.S:startup_continue which lives at 0x11000 in
38 # the decompressed image.
34 lgr %r6,%r2 39 lgr %r6,%r2
35 br %r1 40 br %r1
36mover: 41mover:
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index 56e4d8234ef2..4431905f8cfa 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -309,7 +309,9 @@ ENTRY(startup_kdump)
309 l %r15,.Lstack-.LPG0(%r13) 309 l %r15,.Lstack-.LPG0(%r13)
310 ahi %r15,-STACK_FRAME_OVERHEAD 310 ahi %r15,-STACK_FRAME_OVERHEAD
311 brasl %r14,verify_facilities 311 brasl %r14,verify_facilities
312 /* Continue with startup code in head64.S */ 312# For uncompressed images, continue in
313# arch/s390/kernel/head64.S. For compressed images, continue in
314# arch/s390/boot/compressed/head.S.
313 jg startup_continue 315 jg startup_continue
314 316
315.Lstack: 317.Lstack: