patch-2.3.30 linux/arch/ppc/chrpboot/main.c
Next file: linux/arch/ppc/chrpboot/string.S
Previous file: linux/arch/ppc/chrp_defconfig
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Sat Nov 27 15:41:59 1999
- Orig file:
v2.3.29/linux/arch/ppc/chrpboot/main.c
- Orig date:
Tue Aug 31 17:29:12 1999
diff -u --recursive --new-file v2.3.29/linux/arch/ppc/chrpboot/main.c linux/arch/ppc/chrpboot/main.c
@@ -8,6 +8,10 @@
*/
#include "../coffboot/nonstdio.h"
#include "../coffboot/zlib.h"
+#include <asm/bootinfo.h>
+#include <asm/processor.h>
+#define __KERNEL__
+#include <asm/page.h>
extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
@@ -71,6 +75,30 @@
sa = (unsigned long)PROG_START;
printf("start address = 0x%x\n\r", sa);
+ {
+ struct bi_record *rec;
+
+ rec = (struct bi_record *)PAGE_ALIGN((unsigned long)dst+len);
+
+ rec->tag = BI_FIRST;
+ rec->size = sizeof(struct bi_record);
+ rec = (struct bi_record *)((unsigned long)rec + rec->size);
+
+ rec->tag = BI_BOOTLOADER_ID;
+ sprintf( (char *)rec->data, "chrpboot");
+ rec->size = sizeof(struct bi_record) + strlen("chrpboot") + 1;
+ rec = (struct bi_record *)((unsigned long)rec + rec->size);
+
+ rec->tag = BI_MACHTYPE;
+ rec->data[0] = _MACH_chrp;
+ rec->data[1] = 1;
+ rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
+ 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);
+ }
(*(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)