Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318409
b: refs/heads/master
c: e605a42
h: refs/heads/master
i:
  318407: e807473
v: v3
  • Loading branch information
Joe Millenbach authored and H. Peter Anvin committed Jul 21, 2012
1 parent 71a9d53 commit d27b3c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f4e4392cbf72d731a489a3217fe810820b8ba96
refs/heads/master: e605a425975b073aafebbb2c09d3ae266be2fd3e
18 changes: 10 additions & 8 deletions trunk/arch/x86/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ void __putstr(int error, const char *s)
outb(0xff & (pos >> 1), vidport+1);
}

static void debug_putstr(const char *s)
{
if (debug)
putstr(s);
}

void *memset(void *s, int c, size_t n)
{
int i;
Expand Down Expand Up @@ -293,8 +299,7 @@ static void parse_elf(void *output)
return;
}

if (debug)
putstr("Parsing ELF... ");
debug_putstr("Parsing ELF... ");

phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
if (!phdrs)
Expand Down Expand Up @@ -346,8 +351,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
cols = real_mode->screen_info.orig_video_cols;

console_init();
if (debug)
putstr("early console in decompress_kernel\n");
debug_putstr("early console in decompress_kernel\n");

free_mem_ptr = heap; /* Heap */
free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
Expand All @@ -366,11 +370,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
error("Wrong destination address");
#endif

if (debug)
putstr("\nDecompressing Linux... ");
debug_putstr("\nDecompressing Linux... ");
decompress(input_data, input_len, NULL, NULL, output, NULL, error);
parse_elf(output);
if (debug)
putstr("done.\nBooting the kernel.\n");
debug_putstr("done.\nBooting the kernel.\n");
return;
}

0 comments on commit d27b3c4

Please sign in to comment.