patch-2.4.25 linux-2.4.25/arch/ppc64/boot/zImage.c

Next file: linux-2.4.25/arch/ppc64/boot/zImage.lds
Previous file: linux-2.4.25/arch/ppc64/boot/ppc32-types.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/arch/ppc64/boot/zImage.c linux-2.4.25/arch/ppc64/boot/zImage.c
@@ -12,7 +12,6 @@
 #include "ppc32-types.h"
 #include "zlib.h"
 #include <linux/elf.h>
-#include <linux/version.h>
 #include <asm/processor.h>
 #include <asm/page.h>
 #include <asm/bootinfo.h>
@@ -53,8 +52,9 @@
 extern char _sysmap_end[];
 extern char _initrd_start[];
 extern char _initrd_end[];
-extern unsigned long vmlinux_filesize;
-extern unsigned long vmlinux_memsize;
+
+extern void *_vmlinux_filesize;
+extern void *_vmlinux_memsize;
 
 struct addr_range {
 	unsigned long addr;
@@ -69,8 +69,8 @@
 static char scratch[128<<10];	/* 128kB of scratch space for gunzip */
 
 typedef void (*kernel_entry_t)( unsigned long,
-                                unsigned long,
-                                void *,
+		                unsigned long,
+		                void *,
 				struct bi_record *);
 
 
@@ -86,13 +86,12 @@
 start(unsigned long a1, unsigned long a2, void *promptr)
 {
 	unsigned long i, claim_addr, claim_size;
+	unsigned long vmlinux_filesize;
 	extern char _start;
 	struct bi_record *bi_recs;
 	kernel_entry_t kernel_entry;
 	Elf64_Ehdr *elf64;
 	Elf64_Phdr *elf64ph;
-	/* tell userland tools about uname -r */
-	unsigned char this_uts[] = "Linux version " UTS_RELEASE;
 
 	prom = (int (*)(void *)) promptr;
 	chosen_handle = finddevice("/chosen");
@@ -104,20 +103,7 @@
 	if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4)
 		exit();
 
-	printf("zImage starting: loaded at 0x%x\n\r", (unsigned)&_start);
-	printf("%s\n\r", this_uts);
-
-#if 0
-	sysmap.size = (unsigned long)(_sysmap_end - _sysmap_start);
-	sysmap.memsize = sysmap.size;
-	if ( sysmap.size > 0 ) {
-		sysmap.addr = (RAM_END - sysmap.size) & ~0xFFF;
-		claim(sysmap.addr, RAM_END - sysmap.addr, 0);
-		printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r",
-		       sysmap.addr, (unsigned long)_sysmap_start, sysmap.size);
-		memcpy((void *)sysmap.addr, (void *)_sysmap_start, sysmap.size);
-	}
-#endif
+	printf("\n\rzImage starting: loaded at 0x%x\n\r", (unsigned)&_start);
 
 	initrd.size = (unsigned long)(_initrd_end - _initrd_start);
 	initrd.memsize = initrd.size;
@@ -133,12 +119,13 @@
 	vmlinuz.addr = (unsigned long)_vmlinux_start;
 	vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start);
 	vmlinux.addr = (unsigned long)(void *)-1;
+	vmlinux_filesize = (unsigned long)&_vmlinux_filesize;
 	vmlinux.size = PAGE_ALIGN(vmlinux_filesize);
-	vmlinux.memsize = vmlinux_memsize;
+	vmlinux.memsize = (unsigned long)&_vmlinux_memsize;
 
 	claim_size = vmlinux.memsize /* PPPBBB: + fudge for bi_recs */;
-	for(claim_addr = PROG_START; 
-	    claim_addr <= PROG_START * 8; 
+	for(claim_addr = PROG_START;
+	    claim_addr <= PROG_START * 8;
 	    claim_addr += 0x100000) {
 		printf("    trying: 0x%08lx\n\r", claim_addr);
 		vmlinux.addr = (unsigned long)claim(claim_addr, claim_size, 0);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)