patch-2.2.11 linux/arch/ppc/chrpboot/main.c
Next file: linux/arch/ppc/common_defconfig
Previous file: linux/arch/ppc/amiga/config.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Mon Aug 9 12:04:57 1999
- Orig file:
v2.2.10/linux/arch/ppc/chrpboot/main.c
- Orig date:
Fri Jun 4 13:30:47 1999
diff -u --recursive --new-file v2.2.10/linux/arch/ppc/chrpboot/main.c linux/arch/ppc/chrpboot/main.c
@@ -19,12 +19,13 @@
#define RAM_START 0x00000000
#define RAM_END (8<<20)
-#define RAM_FREE (6<<20) /* after image of chrpboot */
+#define RAM_FREE ((unsigned long)(_end+0x1000)&~0xFFF)
#define PROG_START 0x00010000
char *avail_ram;
char *end_avail;
+extern char _end[];
extern char image_data[];
extern int image_len;
extern char initrd_data[];
@@ -47,8 +48,8 @@
initrd_start = (RAM_END - initrd_size) & ~0xFFF;
a1 = initrd_start;
a2 = initrd_size;
- printf("initial ramdisk at 0x%x (%u bytes)\n\r", initrd_start,
- initrd_size);
+ printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n\r", initrd_start,
+ initrd_data,initrd_size);
memcpy((char *)initrd_start, initrd_data, initrd_size);
end_avail = (char *)initrd_start;
} else
@@ -56,7 +57,6 @@
im = image_data;
len = image_len;
dst = (void *) PROG_START;
-
if (im[0] == 0x1f && im[1] == 0x8b) {
avail_ram = (char *)RAM_FREE;
printf("gunzipping (0x%x <- 0x%x:0x%0x)...", dst, im, im+len);
@@ -71,7 +71,7 @@
sa = *(unsigned long *)PROG_START+PROG_START;
printf("start address = 0x%x\n\r", sa);
- (*(void (*)())sa)(a1, a2, prom, 0, 0);
+ (*(void (*)())sa)(0, 0, prom, a1, a2);
printf("returned?\n\r");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)