diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-02-26 16:37:53 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:33 -0500 |
commit | 1844c9bc0b2fed3023551c1affe033ab38e90b9a (patch) | |
tree | b9aca066ec58a0b211a4931032b74093fdb6ff49 /arch/s390/kernel/head.S | |
parent | 73bfa5f2f71efcdcaad8d18cbed96b9d7ed86948 (diff) |
[S390] add support for compressed kernels
Add the "bzImage" compile target and the necessary code to generate
compressed kernel images. The old style uncompressed "image" target
is preserved, a simple make will build them both.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head.S')
-rw-r--r-- | arch/s390/kernel/head.S | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 1fb59055c7ca..ca4a62bd862f 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright IBM Corp. 1999,2009 | 2 | * Copyright IBM Corp. 1999,2010 |
3 | * | 3 | * |
4 | * Author(s): Hartmut Penner <hp@de.ibm.com> | 4 | * Author(s): Hartmut Penner <hp@de.ibm.com> |
5 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 5 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
@@ -22,11 +22,9 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <asm/setup.h> | ||
26 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
27 | #include <asm/thread_info.h> | 26 | #include <asm/thread_info.h> |
28 | #include <asm/page.h> | 27 | #include <asm/page.h> |
29 | #include <asm/cpu.h> | ||
30 | 28 | ||
31 | #ifdef CONFIG_64BIT | 29 | #ifdef CONFIG_64BIT |
32 | #define ARCH_OFFSET 4 | 30 | #define ARCH_OFFSET 4 |
@@ -450,16 +448,15 @@ start: | |||
450 | # or linload or SALIPL | 448 | # or linload or SALIPL |
451 | # | 449 | # |
452 | .org 0x10000 | 450 | .org 0x10000 |
453 | startup:basr %r13,0 # get base | 451 | .globl startup |
452 | startup: | ||
453 | basr %r13,0 # get base | ||
454 | .LPG0: | 454 | .LPG0: |
455 | xc 0x200(256),0x200 # partially clear lowcore | 455 | xc 0x200(256),0x200 # partially clear lowcore |
456 | xc 0x300(256),0x300 | 456 | xc 0x300(256),0x300 |
457 | l %r1,5f-.LPG0(%r13) | 457 | stck __LC_LAST_UPDATE_CLOCK |
458 | stck 0(%r1) | 458 | spt 5f-.LPG0(%r13) |
459 | spt 6f-.LPG0(%r13) | 459 | mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13) |
460 | mvc __LC_LAST_UPDATE_CLOCK(8),0(%r1) | ||
461 | mvc __LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13) | ||
462 | mvc __LC_EXIT_TIMER(8),5f-.LPG0(%r13) | ||
463 | #ifndef CONFIG_MARCH_G5 | 460 | #ifndef CONFIG_MARCH_G5 |
464 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} | 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} |
465 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST |
@@ -477,7 +474,6 @@ startup:basr %r13,0 # get base | |||
477 | cl %r0,2f+12-.LPG0(%r13) | 474 | cl %r0,2f+12-.LPG0(%r13) |
478 | je 3f | 475 | je 3f |
479 | 1: l %r15,.Lstack-.LPG0(%r13) | 476 | 1: l %r15,.Lstack-.LPG0(%r13) |
480 | ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union+THREAD_SIZE | ||
481 | ahi %r15,-96 | 477 | ahi %r15,-96 |
482 | la %r2,.Lals_string-.LPG0(%r13) | 478 | la %r2,.Lals_string-.LPG0(%r13) |
483 | l %r3,.Lsclp_print-.LPG0(%r13) | 479 | l %r3,.Lsclp_print-.LPG0(%r13) |
@@ -488,7 +484,7 @@ startup:basr %r13,0 # get base | |||
488 | .Lsclp_print: | 484 | .Lsclp_print: |
489 | .long _sclp_print_early | 485 | .long _sclp_print_early |
490 | .Lstack: | 486 | .Lstack: |
491 | .long init_thread_union | 487 | .long 0x8000 + (1<<(PAGE_SHIFT+THREAD_ORDER)) |
492 | .align 16 | 488 | .align 16 |
493 | 2: .long 0x000a0000,0x8badcccc | 489 | 2: .long 0x000a0000,0x8badcccc |
494 | #if defined(CONFIG_64BIT) | 490 | #if defined(CONFIG_64BIT) |
@@ -515,13 +511,22 @@ startup:basr %r13,0 # get base | |||
515 | 3: | 511 | 3: |
516 | #endif | 512 | #endif |
517 | 513 | ||
514 | #ifdef CONFIG_64BIT | ||
515 | mvi __LC_AR_MODE_ID,1 # set esame flag | ||
516 | slr %r0,%r0 # set cpuid to zero | ||
517 | lhi %r1,2 # mode 2 = esame (dump) | ||
518 | sigp %r1,%r0,0x12 # switch to esame mode | ||
519 | sam64 # switch to 64 bit mode | ||
520 | jg startup_continue | ||
521 | #else | ||
522 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) | ||
518 | l %r13,4f-.LPG0(%r13) | 523 | l %r13,4f-.LPG0(%r13) |
519 | b 0(%r13) | 524 | b 0(%r13) |
520 | .align 4 | 525 | .align 8 |
521 | 4: .long startup_continue | 526 | 4: .long startup_continue |
522 | 5: .long sched_clock_base_cc | 527 | #endif |
523 | .align 8 | 528 | .align 8 |
524 | 6: .long 0x7fffffff,0xffffffff | 529 | 5: .long 0x7fffffff,0xffffffff |
525 | 530 | ||
526 | # | 531 | # |
527 | # params at 10400 (setup.h) | 532 | # params at 10400 (setup.h) |
@@ -535,8 +540,4 @@ startup:basr %r13,0 # get base | |||
535 | .byte "root=/dev/ram0 ro" | 540 | .byte "root=/dev/ram0 ro" |
536 | .byte 0 | 541 | .byte 0 |
537 | 542 | ||
538 | #ifdef CONFIG_64BIT | 543 | .org 0x11000 |
539 | #include "head64.S" | ||
540 | #else | ||
541 | #include "head31.S" | ||
542 | #endif | ||