-static struct bi_record *
-make_bi_recs(unsigned long addr)
-{
- struct bi_record *bi_recs;
- struct bi_record *rec;
-
- bi_recs = rec = bi_rec_init(addr);
-
- rec = bi_rec_alloc(rec, 2);
- rec->tag = BI_FIRST;
- /* rec->data[0] = ...; # Written below before return */
- /* rec->data[1] = ...; # Written below before return */
-
- rec = bi_rec_alloc_bytes(rec, strlen("chrpboot")+1);
- rec->tag = BI_BOOTLOADER_ID;
- sprintf( (char *)rec->data, "chrpboot");
-
- rec = bi_rec_alloc(rec, 2);
- rec->tag = BI_MACHTYPE;
- rec->data[0] = PLATFORM_PSERIES;
- rec->data[1] = 1;
-
- if ( initrd.size > 0 ) {
- rec = bi_rec_alloc(rec, 2);
- rec->tag = BI_INITRD;
- rec->data[0] = initrd.addr;
- rec->data[1] = initrd.size;
- }
-
- if ( sysmap.size > 0 ) {
- rec = bi_rec_alloc(rec, 2);
- rec->tag = BI_SYSMAP;
- rec->data[0] = (unsigned long)sysmap.addr;
- rec->data[1] = (unsigned long)sysmap.size;
- }
-
- rec = bi_rec_alloc(rec, 1);
- rec->tag = BI_LAST;
- rec->data[0] = (bi_rec_field)bi_recs;
-
- /* Save the _end_ address of the bi_rec's in the first bi_rec
- * data field for easy access by the kernel.
- */
- bi_recs->data[0] = (bi_rec_field)rec;
- bi_recs->data[1] = (bi_rec_field)rec + rec->size - (bi_rec_field)bi_recs;
-
- return bi_recs;
-}
-