| decompress.c (1cb4f624ea38361b6397966470f0a1bed5532483) | decompress.c (d4d9a553d7b96e18fcfbd0b8fb5f803b3a27e4e6) |
|---|---|
| 1/* 2 * Misc. bootloader code for many machines. 3 * 4 * Copyright 2001 MontaVista Software Inc. 5 * Author: Matt Porter <mporter@mvista.com> Derived from 6 * arch/ppc/boot/prep/misc.c 7 * 8 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology --- 14 unchanged lines hidden (view full) --- 23 * that can be used for temporary malloc area 24 */ 25unsigned long free_mem_ptr; 26unsigned long free_mem_end_ptr; 27char *zimage_start; 28 29/* The linker tells us where the image is. */ 30extern unsigned char __image_begin, __image_end; | 1/* 2 * Misc. bootloader code for many machines. 3 * 4 * Copyright 2001 MontaVista Software Inc. 5 * Author: Matt Porter <mporter@mvista.com> Derived from 6 * arch/ppc/boot/prep/misc.c 7 * 8 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology --- 14 unchanged lines hidden (view full) --- 23 * that can be used for temporary malloc area 24 */ 25unsigned long free_mem_ptr; 26unsigned long free_mem_end_ptr; 27char *zimage_start; 28 29/* The linker tells us where the image is. */ 30extern unsigned char __image_begin, __image_end; |
| 31extern unsigned char __ramdisk_begin, __ramdisk_end; 32unsigned long initrd_size; | |
| 33 34/* debug interfaces */ 35extern void puts(const char *s); 36extern void puthex(unsigned long long val); 37 38void error(char *x) 39{ 40 puts("\n\n"); --- 56 unchanged lines hidden (view full) --- 97 * already been moved once. We're good to go now. -- Tom 98 */ 99 puts("zimage at: "); 100 puthex((unsigned long)zimage_start); 101 puts(" "); 102 puthex((unsigned long)(zimage_size + zimage_start)); 103 puts("\n"); 104 | 31 32/* debug interfaces */ 33extern void puts(const char *s); 34extern void puthex(unsigned long long val); 35 36void error(char *x) 37{ 38 puts("\n\n"); --- 56 unchanged lines hidden (view full) --- 95 * already been moved once. We're good to go now. -- Tom 96 */ 97 puts("zimage at: "); 98 puthex((unsigned long)zimage_start); 99 puts(" "); 100 puthex((unsigned long)(zimage_size + zimage_start)); 101 puts("\n"); 102 |
| 105 if (initrd_size) { 106 puts("initrd at: "); 107 puthex((unsigned long)(&__ramdisk_begin)); 108 puts(" "); 109 puthex((unsigned long)(&__ramdisk_end)); 110 puts("\n"); 111 } 112 | |
| 113 /* this area are prepared for mallocing when decompressing */ 114 free_mem_ptr = boot_heap_start; 115 free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE; 116 117 /* Display standard Linux/MIPS boot prompt for kernel args */ 118 puts("Uncompressing Linux at load address "); 119 puthex(VMLINUX_LOAD_ADDRESS_ULL); 120 puts("\n"); 121 /* Decompress the kernel with according algorithm */ 122 decompress(zimage_start, zimage_size, 0, 0, 123 (void *)VMLINUX_LOAD_ADDRESS_ULL, 0, error); 124 /* FIXME: is there a need to flush cache here? */ 125 puts("Now, booting the kernel...\n"); 126} | 103 /* this area are prepared for mallocing when decompressing */ 104 free_mem_ptr = boot_heap_start; 105 free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE; 106 107 /* Display standard Linux/MIPS boot prompt for kernel args */ 108 puts("Uncompressing Linux at load address "); 109 puthex(VMLINUX_LOAD_ADDRESS_ULL); 110 puts("\n"); 111 /* Decompress the kernel with according algorithm */ 112 decompress(zimage_start, zimage_size, 0, 0, 113 (void *)VMLINUX_LOAD_ADDRESS_ULL, 0, error); 114 /* FIXME: is there a need to flush cache here? */ 115 puts("Now, booting the kernel...\n"); 116} |