21 #include <linux/compiler.h>
22 #include <linux/types.h>
23 #include <linux/linkage.h>
25 static void putstr(
const char *
ptr);
26 extern void error(
char *
x);
28 #ifdef CONFIG_ARCH_MULTIPLATFORM
29 static inline void putc(
int c) {}
30 static inline void flush(
void) {}
33 #include <mach/uncompress.h>
36 #ifdef CONFIG_DEBUG_ICEDCC
38 #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
40 static void icedcc_putc(
int ch)
48 asm volatile (
"mrc p14, 0, %0, c0, c1, 0" :
"=r" (
status));
49 }
while (status & (1 << 29));
51 asm(
"mcr p14, 0, %0, c0, c5, 0" : :
"r" (ch));
55 #elif defined(CONFIG_CPU_XSCALE)
57 static void icedcc_putc(
int ch)
65 asm volatile (
"mrc p14, 0, %0, c14, c0, 0" :
"=r" (
status));
66 }
while (status & (1 << 28));
68 asm(
"mcr p14, 0, %0, c8, c0, 0" : :
"r" (ch));
73 static void icedcc_putc(
int ch)
81 asm volatile (
"mrc p14, 0, %0, c0, c0, 0" :
"=r" (
status));
84 asm(
"mcr p14, 0, %0, c1, c0, 0" : :
"r" (ch));
89 #define putc(ch) icedcc_putc(ch)
92 static void putstr(
const char *
ptr)
96 while ((c = *ptr++) !=
'\0') {
117 #define arch_error(x)
126 putstr(
"\n\n -- System halted");
133 error(
"Attempting division by 0!");
141 unsigned long free_mem_ptr_end_p,
146 output_data = (
unsigned char *)output_start;
147 free_mem_ptr = free_mem_ptr_p;
148 free_mem_end_ptr = free_mem_ptr_end_p;
153 putstr(
"Uncompressing Linux...");
157 error(
"decompressor returned an error");
159 putstr(
" done, booting the kernel.\n");