xref: /illumos-gate/usr/src/cmd/fm/schemes/mem/mem_seeprom.h (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _MEM_SEEPROM_H
28 #define	_MEM_SEEPROM_H
29 
30 /*
31  * Layout of SEEPROM data
32  *
33  * XXX need cite
34  */
35 
36 #include <sys/types.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * Care must be taken when accessing these structures, as the SEEPROM source
44  * data does not have an alignment requirement.
45  */
46 
47 typedef struct seeprom_seg_sd {
48 	uint32_t seesd_header;
49 	uint32_t seesd_tstamp;
50 	char seesd_frudesc[80];
51 	char seesd_mfgloc[64];
52 	char seesd_sun_pno[7];
53 	char seesd_sun_sno[6];
54 	uint8_t seesd_vendorhi;
55 	uint8_t seesd_vendorlo;
56 	char seesd_hwdash[2];
57 	char seesd_hwrev[2];
58 	char seesd_fruname[16];
59 } seeprom_seg_sd_t;
60 
61 typedef struct seeprom_seg {
62 	char sees_name[2];
63 	uint16_t sees_prothi;
64 	uint16_t sees_protlo;
65 	uint16_t sees_segoff;
66 	uint16_t sees_seglen;
67 } seeprom_seg_t;
68 
69 typedef struct seeprom_container {
70 	uint8_t	seec_tag;
71 	uint8_t seec_verhi;
72 	uint8_t seec_verlo;
73 	uint8_t seec_contsz;
74 	uint8_t seec_crc8;
75 	uint8_t seec_nsegs;
76 } seeprom_container_t;
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* _MEM_SEEPROM_H */
83