9 #include <asm/uaccess.h>
22 #define memmove memmove
23 #define memzero(s, n) memset((s), 0, (n))
31 static void error(
char *
m);
36 #ifdef CONFIG_HAVE_KERNEL_BZIP2
37 #define HEAP_SIZE 0x400000
39 #define HEAP_SIZE 0x10000
42 #ifdef CONFIG_KERNEL_GZIP
43 #include "../../../../lib/decompress_inflate.c"
46 #ifdef CONFIG_KERNEL_BZIP2
47 #include "../../../../lib/decompress_bunzip2.c"
50 #ifdef CONFIG_KERNEL_LZMA
51 #include "../../../../lib/decompress_unlzma.c"
54 #ifdef CONFIG_KERNEL_LZO
55 #include "../../../../lib/decompress_unlzo.c"
58 #ifdef CONFIG_KERNEL_XZ
59 #include "../../../../lib/decompress_unxz.c"
64 static int puts(
const char *
s)
107 static void error(
char *
x)
109 unsigned long long psw = 0x000a0000deadbeefULL;
113 puts(
"\n\n -- System halted");
115 asm volatile(
"lpsw %0" : :
"Q" (psw));
127 static void check_ipl_parmblock(
void *
start,
unsigned long size)
131 src = (
void *)(
unsigned long)
S390_lowcore.ipl_parmblock_ptr;
132 if (src + PAGE_SIZE <= start || src >= start + size)
141 unsigned long output_addr;
145 check_ipl_parmblock((
void *) 0, output_addr + SZ__bss_start);
149 output = (
unsigned char *) output_addr;
151 #ifdef CONFIG_BLK_DEV_INITRD
157 INITRD_START < (
unsigned long) output + SZ__bss_start) {
158 check_ipl_parmblock(output + SZ__bss_start,
160 memmove(output + SZ__bss_start,
166 puts(
"Uncompressing Linux... ");
168 puts(
"Ok, booting the kernel.\n");
169 return (
unsigned long) output;