patch-2.4.6 linux/arch/ppc/boot/pmac/coffmain.c
Next file: linux/arch/ppc/boot/pmac/ld.script
Previous file: linux/arch/ppc/boot/pmac/chrpmain.c
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
Mon Jul 2 14:34:57 2001
- Orig file:
v2.4.5/linux/arch/ppc/boot/pmac/coffmain.c
- Orig date:
Thu May 24 15:02:07 2001
diff -u --recursive --new-file v2.4.5/linux/arch/ppc/boot/pmac/coffmain.c linux/arch/ppc/boot/pmac/coffmain.c
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.coffmain.c 1.9 05/18/01 06:20:29 patch
+ * BK Id: SCCS/s.coffmain.c 1.12 06/12/01 16:42:26 paulus
*/
/*
* Copyright (C) Paul Mackerras 1997.
@@ -24,7 +24,7 @@
#define get_16be(x) (*(unsigned short *)(x))
#define get_32be(x) (*(unsigned *)(x))
-#define RAM_START 0xc0000000
+#define RAM_START 0
#define RAM_END (RAM_START + 0x800000) /* only 8M mapped with BATs */
#define PROG_START RAM_START
@@ -32,15 +32,6 @@
#define SCRATCH_SIZE (128 << 10)
-#ifdef CONFIG_CMDLINE
-#define CMDLINE CONFIG_CMDLINE
-#else
-#define CMDLINE ""
-#endif
-char cmd_preset[] = CMDLINE;
-char cmd_buf[256];
-char *cmd_line = cmd_buf;
-
char *avail_ram;
char *begin_avail, *end_avail;
char *avail_high;
@@ -81,7 +72,7 @@
claim(0, PROG_SIZE, 0);
dst = (void *) RAM_START;
if (im[0] == 0x1f && im[1] == 0x8b) {
- /* claim some memory for scratch space */
+ /* set up scratch space */
begin_avail = avail_high = avail_ram = heap;
end_avail = heap + sizeof(heap);
printf("heap at 0x%x\n", avail_ram);
@@ -95,7 +86,6 @@
}
flush_cache(dst, len);
- memcpy (cmd_line, cmd_preset, sizeof(cmd_preset));
make_bi_recs((unsigned long)dst + len);
sa = (unsigned long)PROG_START;
@@ -127,18 +117,13 @@
sprintf( (char *)rec->data, "coffboot");
rec->size = sizeof(struct bi_record) + strlen("coffboot") + 1;
rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
+
rec->tag = BI_MACHTYPE;
rec->data[0] = _MACH_Pmac;
rec->data[1] = 1;
- rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
+ rec->size = sizeof(struct bi_record) + 2 * sizeof(unsigned long);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
- rec->tag = BI_CMD_LINE;
- memcpy( (char *)rec->data, cmd_line, strlen(cmd_line)+1);
- rec->size = sizeof(struct bi_record) + strlen(cmd_line) + 1;
- rec = (struct bi_record *)((unsigned long)rec + rec->size);
-
+
rec->tag = BI_LAST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)