Commit bf47dc57 authored by Sascha Silbe's avatar Sascha Silbe Committed by Martin Schwidefsky

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: default avatarSascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 29b4817d
...@@ -21,16 +21,21 @@ ENTRY(startup_continue) ...@@ -21,16 +21,21 @@ ENTRY(startup_continue)
lg %r15,.Lstack-.LPG1(%r13) lg %r15,.Lstack-.LPG1(%r13)
aghi %r15,-160 aghi %r15,-160
brasl %r14,decompress_kernel brasl %r14,decompress_kernel
# setup registers for memory mover & branch to target # Set up registers for memory mover. We move the decompressed image to
# 0x11000, starting at offset 0x11000 in the decompressed image so
# that code living at 0x11000 in the image will end up at 0x11000 in
# memory.
lgr %r4,%r2 lgr %r4,%r2
lg %r2,.Loffset-.LPG1(%r13) lg %r2,.Loffset-.LPG1(%r13)
la %r4,0(%r2,%r4) la %r4,0(%r2,%r4)
lg %r3,.Lmvsize-.LPG1(%r13) lg %r3,.Lmvsize-.LPG1(%r13)
lgr %r5,%r3 lgr %r5,%r3
# move the memory mover someplace safe # Move the memory mover someplace safe so it doesn't overwrite itself.
la %r1,0x200 la %r1,0x200
mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13) mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13)
# decompress image is started at 0x11000 # When the memory mover is done we pass control to
# arch/s390/kernel/head64.S:startup_continue which lives at 0x11000 in
# the decompressed image.
lgr %r6,%r2 lgr %r6,%r2
br %r1 br %r1
mover: mover:
......
...@@ -309,7 +309,9 @@ ENTRY(startup_kdump) ...@@ -309,7 +309,9 @@ ENTRY(startup_kdump)
l %r15,.Lstack-.LPG0(%r13) l %r15,.Lstack-.LPG0(%r13)
ahi %r15,-STACK_FRAME_OVERHEAD ahi %r15,-STACK_FRAME_OVERHEAD
brasl %r14,verify_facilities brasl %r14,verify_facilities
/* Continue with startup code in head64.S */ # For uncompressed images, continue in
# arch/s390/kernel/head64.S. For compressed images, continue in
# arch/s390/boot/compressed/head.S.
jg startup_continue jg startup_continue
.Lstack: .Lstack:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment