]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1844c9bc MS |
2 | /* |
3 | * Startup glue code to uncompress the kernel | |
4 | * | |
5 | * Copyright IBM Corp. 2010 | |
6 | * | |
7 | * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com> | |
8 | */ | |
9 | ||
10 | #include <linux/init.h> | |
144d634a | 11 | #include <linux/linkage.h> |
1844c9bc MS |
12 | #include <asm/asm-offsets.h> |
13 | #include <asm/thread_info.h> | |
14 | #include <asm/page.h> | |
15 | #include "sizes.h" | |
16 | ||
17 | __HEAD | |
144d634a | 18 | ENTRY(startup_continue) |
1844c9bc MS |
19 | basr %r13,0 # get base |
20 | .LPG1: | |
21 | # setup stack | |
22 | lg %r15,.Lstack-.LPG1(%r13) | |
23 | aghi %r15,-160 | |
24 | brasl %r14,decompress_kernel | |
bf47dc57 SS |
25 | # Set up registers for memory mover. We move the decompressed image to |
26 | # 0x11000, starting at offset 0x11000 in the decompressed image so | |
27 | # that code living at 0x11000 in the image will end up at 0x11000 in | |
28 | # memory. | |
1844c9bc MS |
29 | lgr %r4,%r2 |
30 | lg %r2,.Loffset-.LPG1(%r13) | |
31 | la %r4,0(%r2,%r4) | |
32 | lg %r3,.Lmvsize-.LPG1(%r13) | |
33 | lgr %r5,%r3 | |
bf47dc57 | 34 | # Move the memory mover someplace safe so it doesn't overwrite itself. |
1844c9bc MS |
35 | la %r1,0x200 |
36 | mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13) | |
bf47dc57 SS |
37 | # When the memory mover is done we pass control to |
38 | # arch/s390/kernel/head64.S:startup_continue which lives at 0x11000 in | |
39 | # the decompressed image. | |
1844c9bc MS |
40 | lgr %r6,%r2 |
41 | br %r1 | |
42 | mover: | |
43 | mvcle %r2,%r4,0 | |
44 | jo mover | |
45 | br %r6 | |
46 | mover_end: | |
47 | ||
48 | .align 8 | |
49 | .Lstack: | |
3a890380 | 50 | .quad 0x8000 + (1<<(PAGE_SHIFT+THREAD_SIZE_ORDER)) |
1844c9bc MS |
51 | .Loffset: |
52 | .quad 0x11000 | |
53 | .Lmvsize: | |
54 | .quad SZ__bss_start |