Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
awilliam
GitHub Repository: awilliam/linux-vfio
Path: blob/master/arch/s390/boot/compressed/head64.S
15126 views
1
/*
2
* Startup glue code to uncompress the kernel
3
*
4
* Copyright IBM Corp. 2010
5
*
6
* Author(s): Martin Schwidefsky <[email protected]>
7
*/
8
9
#include <linux/init.h>
10
#include <asm/asm-offsets.h>
11
#include <asm/thread_info.h>
12
#include <asm/page.h>
13
#include "sizes.h"
14
15
__HEAD
16
.globl startup_continue
17
startup_continue:
18
basr %r13,0 # get base
19
.LPG1:
20
# setup stack
21
lg %r15,.Lstack-.LPG1(%r13)
22
aghi %r15,-160
23
brasl %r14,decompress_kernel
24
# setup registers for memory mover & branch to target
25
lgr %r4,%r2
26
lg %r2,.Loffset-.LPG1(%r13)
27
la %r4,0(%r2,%r4)
28
lg %r3,.Lmvsize-.LPG1(%r13)
29
lgr %r5,%r3
30
# move the memory mover someplace safe
31
la %r1,0x200
32
mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13)
33
# decompress image is started at 0x11000
34
lgr %r6,%r2
35
br %r1
36
mover:
37
mvcle %r2,%r4,0
38
jo mover
39
br %r6
40
mover_end:
41
42
.align 8
43
.Lstack:
44
.quad 0x8000 + (1<<(PAGE_SHIFT+THREAD_ORDER))
45
.Loffset:
46
.quad 0x11000
47
.Lmvsize:
48
.quad SZ__bss_start
49
50