xref: /titanic_50/usr/src/cmd/fm/schemes/mem/mem_seeprom.h (revision 9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bb)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * Layout of SEEPROM data
34  *
35  * XXX need cite
36  */
37 
38 #include <sys/types.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * Care must be taken when accessing these structures, as the SEEPROM source
46  * data does not have an alignment requirement.
47  */
48 
49 typedef struct seeprom_seg_sd {
50 	uint32_t seesd_header;
51 	uint32_t seesd_tstamp;
52 	char seesd_frudesc[80];
53 	char seesd_mfgloc[64];
54 	char seesd_sun_pno[7];
55 	char seesd_sun_sno[6];
56 	uint8_t seesd_vendorhi;
57 	uint8_t seesd_vendorlo;
58 	char seesd_hwdash[2];
59 	char seesd_hwrev[2];
60 	char seesd_fruname[16];
61 } seeprom_seg_sd_t;
62 
63 typedef struct seeprom_seg {
64 	char sees_name[2];
65 	uint16_t sees_prothi;
66 	uint16_t sees_protlo;
67 	uint16_t sees_segoff;
68 	uint16_t sees_seglen;
69 } seeprom_seg_t;
70 
71 typedef struct seeprom_container {
72 	uint8_t	seec_tag;
73 	uint8_t seec_verhi;
74 	uint8_t seec_verlo;
75 	uint8_t seec_contsz;
76 	uint8_t seec_crc8;
77 	uint8_t seec_nsegs;
78 } seeprom_container_t;
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* _MEM_SEEPROM_H */
85