Root/arch/s390/boot/compressed/head31.S

1/*
2 * Startup glue code to uncompress the kernel
3 *
4 * Copyright IBM Corp. 2010
5 *
6 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
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
17startup_continue:
18    basr %r13,0 # get base
19.LPG1:
20    # setup stack
21    l %r15,.Lstack-.LPG1(%r13)
22    ahi %r15,-96
23    l %r1,.Ldecompress-.LPG1(%r13)
24    basr %r14,%r1
25    # setup registers for memory mover & branch to target
26    lr %r4,%r2
27    l %r2,.Loffset-.LPG1(%r13)
28    la %r4,0(%r2,%r4)
29    l %r3,.Lmvsize-.LPG1(%r13)
30    lr %r5,%r3
31    # move the memory mover someplace safe
32    la %r1,0x200
33    mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13)
34    # decompress image is started at 0x11000
35    lr %r6,%r2
36    br %r1
37mover:
38    mvcle %r2,%r4,0
39    jo mover
40    br %r6
41mover_end:
42
43    .align 8
44.Lstack:
45    .long 0x8000 + (1<<(PAGE_SHIFT+THREAD_ORDER))
46.Ldecompress:
47    .long decompress_kernel
48.Loffset:
49    .long 0x11000
50.Lmvsize:
51    .long SZ__bss_start
52

Archive Download this file



interactive