Home | History | Annotate | Line # | Download | only in mkbootimage
      1 /* $NetBSD: rs6000_bootrec.h,v 1.2 2021/07/24 21:31:34 andvar Exp $ */
      2 
      3 #include <sys/types.h>
      4 
      5 #ifndef __RS6000_BOOTREC_H__
      6 #define __RS6000_BOOTREC_H__
      7 
      8 #define IPLRECID	0xC9C2D4C1	/* IBMA in EBCIDIC */
      9 #define CONFRECID	0xF8E9DACB	/* no idea */
     10 
     11 typedef struct rs6000_boot_record {
     12 	uint32_t	ipl_record;	/* always IPLRECID */
     13 	char		pad1[20];
     14 	uint32_t	formatted_cap;	/* sectors in the disk */
     15 	char		floppy_last_head; /* nrof heads -1 */
     16 	char		floppy_last_sec;/* sectors per track starting at 1 */
     17 	char		pad2[6];
     18 	uint32_t	bootcode_len;	/* in sectors, 0 means no boot code */
     19 	uint32_t	bootcode_off;	/* 0 if no bootcode, or byte offset to
     20 					 * first instruction */
     21 	uint32_t	bootpart_start;	/* sec num of boot partition */
     22 	uint32_t	bootprg_start;	/* sec num of boot code, 0 for none */
     23 	uint32_t	bootpart_len;	/* len in sectors of boot part. */
     24 	uint32_t	boot_load_addr;	/* 512 byte boundary load addr */
     25 	char		boot_frag;	/* 0/1 fragmentation allowed */
     26 	char		boot_emul;	/* ROS network emulation flag:
     27 					 * 0x0 => not an emul support image
     28 					 * 0x1 => ROS network emulation code
     29 					 * 0x2 => AIX code supporting ROS emul*/
     30 	char		pad3[2];
     31 	uint16_t	custn_len;	/* sec for customization, normal */
     32 	uint16_t	custs_len;	/* sec for cust. service */
     33 	uint32_t	custn_start;	/* start sec for cust. normal */
     34 	uint32_t	custs_start;	/* start sec for cust. service */
     35 	char		pad4[24];
     36 	uint32_t	servcode_len;	/* bootcode_len for service */
     37 	uint32_t	servcode_off;	/* bootcode_off for service */
     38 	uint32_t	servpart_start;	/* bootpart_start for service */
     39 	uint32_t	servprg_start;	/* bootprg_start for service */
     40 	uint32_t	servpart_len;	/* bootpart_len for service */
     41 	uint32_t	serv_load_addr;	/* boot_load_addr for service */
     42 	char		serv_frag;	/* boot_frag for service */
     43 	char		serv_emul;	/* boot_emul for service */
     44 	char		pad5[2];
     45 	uint32_t	pv_id[4];	/* unique_id for pv_id */
     46 	char		pad6[512 - 128 - 16]; /* 16 for pvid */
     47 } rs6000_boot_record_t;
     48 
     49 typedef struct rs6000_config_record {
     50 	uint32_t	conf_rec;	/* marks the record as valid */
     51 	int32_t		formatted_cap;	/* sectors in disk */
     52 	uint16_t	pad1;
     53 	char		interleave;
     54 	char		sector_size;	/* bytes per sector * 256 */
     55 	uint16_t	last_cyl;	/* number of cyl-1. total is last_cyl
     56 					 * +2 where the last cyl is the CE */
     57 	char		last_head;	/* nrof heads -1 */
     58 	char		last_sec;	/* nrof sectors -1 */
     59 	char		write_precomp;
     60 	char		device_status;	/* POST crap */
     61 	uint16_t	ce_cyl;		/* diag cylinder */
     62 	uint16_t	eol;		/* defects before disk is done. */
     63 	uint16_t	seek_profile[15]; /* ESDI crap */
     64 	char		mfg_id[3];	/* 0,1 size, 2 == disk maker */
     65 	char		pad2;
     66 	uint32_t	pv_id[4];	/* unique_id for pv_id */
     67 	char		pad3[436];
     68 } rs6000_config_record_t;
     69 
     70 #endif /* __RS6000_BOOTREC_H__ */
     71