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