diff options
Diffstat (limited to 'arch/x86/boot/compressed/misc.c')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 7116dcba0c9e..88f7ff6da404 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -108,8 +108,6 @@ static void error(char *m); | |||
108 | * This is set up by the setup-routine at boot-time | 108 | * This is set up by the setup-routine at boot-time |
109 | */ | 109 | */ |
110 | struct boot_params *real_mode; /* Pointer to real-mode data */ | 110 | struct boot_params *real_mode; /* Pointer to real-mode data */ |
111 | static int quiet; | ||
112 | static int debug; | ||
113 | 111 | ||
114 | void *memset(void *s, int c, size_t n); | 112 | void *memset(void *s, int c, size_t n); |
115 | void *memcpy(void *dest, const void *src, size_t n); | 113 | void *memcpy(void *dest, const void *src, size_t n); |
@@ -170,15 +168,11 @@ static void serial_putchar(int ch) | |||
170 | outb(ch, early_serial_base + TXR); | 168 | outb(ch, early_serial_base + TXR); |
171 | } | 169 | } |
172 | 170 | ||
173 | void __putstr(int error, const char *s) | 171 | void __putstr(const char *s) |
174 | { | 172 | { |
175 | int x, y, pos; | 173 | int x, y, pos; |
176 | char c; | 174 | char c; |
177 | 175 | ||
178 | #ifndef CONFIG_X86_VERBOSE_BOOTUP | ||
179 | if (!error) | ||
180 | return; | ||
181 | #endif | ||
182 | if (early_serial_base) { | 176 | if (early_serial_base) { |
183 | const char *str = s; | 177 | const char *str = s; |
184 | while (*str) { | 178 | while (*str) { |
@@ -265,9 +259,9 @@ void *memcpy(void *dest, const void *src, size_t n) | |||
265 | 259 | ||
266 | static void error(char *x) | 260 | static void error(char *x) |
267 | { | 261 | { |
268 | __putstr(1, "\n\n"); | 262 | error_putstr("\n\n"); |
269 | __putstr(1, x); | 263 | error_putstr(x); |
270 | __putstr(1, "\n\n -- System halted"); | 264 | error_putstr("\n\n -- System halted"); |
271 | 265 | ||
272 | while (1) | 266 | while (1) |
273 | asm("hlt"); | 267 | asm("hlt"); |
@@ -294,8 +288,7 @@ static void parse_elf(void *output) | |||
294 | return; | 288 | return; |
295 | } | 289 | } |
296 | 290 | ||
297 | if (!quiet) | 291 | debug_putstr("Parsing ELF... "); |
298 | putstr("Parsing ELF... "); | ||
299 | 292 | ||
300 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); | 293 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); |
301 | if (!phdrs) | 294 | if (!phdrs) |
@@ -332,11 +325,6 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, | |||
332 | { | 325 | { |
333 | real_mode = rmode; | 326 | real_mode = rmode; |
334 | 327 | ||
335 | if (cmdline_find_option_bool("quiet")) | ||
336 | quiet = 1; | ||
337 | if (cmdline_find_option_bool("debug")) | ||
338 | debug = 1; | ||
339 | |||
340 | if (real_mode->screen_info.orig_video_mode == 7) { | 328 | if (real_mode->screen_info.orig_video_mode == 7) { |
341 | vidmem = (char *) 0xb0000; | 329 | vidmem = (char *) 0xb0000; |
342 | vidport = 0x3b4; | 330 | vidport = 0x3b4; |
@@ -349,8 +337,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, | |||
349 | cols = real_mode->screen_info.orig_video_cols; | 337 | cols = real_mode->screen_info.orig_video_cols; |
350 | 338 | ||
351 | console_init(); | 339 | console_init(); |
352 | if (debug) | 340 | debug_putstr("early console in decompress_kernel\n"); |
353 | putstr("early console in decompress_kernel\n"); | ||
354 | 341 | ||
355 | free_mem_ptr = heap; /* Heap */ | 342 | free_mem_ptr = heap; /* Heap */ |
356 | free_mem_end_ptr = heap + BOOT_HEAP_SIZE; | 343 | free_mem_end_ptr = heap + BOOT_HEAP_SIZE; |
@@ -369,11 +356,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, | |||
369 | error("Wrong destination address"); | 356 | error("Wrong destination address"); |
370 | #endif | 357 | #endif |
371 | 358 | ||
372 | if (!quiet) | 359 | debug_putstr("\nDecompressing Linux... "); |
373 | putstr("\nDecompressing Linux... "); | ||
374 | decompress(input_data, input_len, NULL, NULL, output, NULL, error); | 360 | decompress(input_data, input_len, NULL, NULL, output, NULL, error); |
375 | parse_elf(output); | 361 | parse_elf(output); |
376 | if (!quiet) | 362 | debug_putstr("done.\nBooting the kernel.\n"); |
377 | putstr("done.\nBooting the kernel.\n"); | ||
378 | return; | 363 | return; |
379 | } | 364 | } |