xref: /illumos-gate/usr/src/lib/storage/liba5k/common/hdrs/rom.h (revision 89b2a9fbeabf42fa54594df0e5927bcc50a07cc9)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * PHOTON CONFIGURATION MANAGER
28  * Downloadable code definitions
29  */
30 
31 #ifndef	_ROM_H
32 #define	_ROM_H
33 
34 
35 /*
36  * Include any headers you depend on.
37  */
38 
39 /*
40  * I18N message number ranges
41  *  This file: 17500 - 17999
42  *  Shared common messages: 1 - 1999
43  */
44 
45 #ifdef	__cplusplus
46 extern "C" {
47 #endif
48 
49 
50 /*
51  * The PLUTO controller has 4 proms (0-3).  Prom 1-3 are writeable and are
52  * soldered to the board while prom 0 is not writeable but socketed. The
53  * following items are placed in the PLUTO prom set:
54  *	- POST0		-Power On Self Test code.  This code goes in
55  *			 pluto_prom0 and may not be modified in the field.
56  *			 It contains serial port downloading code.
57  *	- FUNC		-Pluto Functional code (SPARC)
58  *	- SOC		-SOC microcode
59  *	- ISP		-ISP microcode
60  *	- OBP		-Open Boot Prom code
61  *	- Date Code	-date/time of prom creation.
62  *	- WWN		- World Wide Name
63  *
64  *
65  * This utility creates the writeable prom images for PLUTO.  Three prom images
66  * are created: pluto_prom1, pluto_prom2, pluto_prom3.
67  *
68  * The following defines the layout of the 4 proms on the PLUTO controller:
69  *
70  * prom		offset		image
71  * -----------------------------------
72  * prom_0:
73  *		0		POST
74  * prom_1:
75  *		0		FUNC
76  * prom_2:
77  *		0		FUNC cont'd
78  * prom_3:
79  *		PROM_MAGIC_OFF  PROM_MAGIC
80  *		DATE_OFF	DATE_CODE
81  *		WWN_OFF		WWN
82  *		SOC_OFF 	SOC
83  *		ISP_OFF		ISP
84  *		OBP_OFF		OBP
85  */
86 #define	PROM_MAGIC	0x2468
87 #define	PROMSIZE	0x00040000	/* 256K bytes each prom */
88 #define	EEPROM_SECTSIZ	0x100
89 
90 
91 #define	IBEEPROM	1
92 #define	MBEEPROM	2
93 
94 #define	FW_DL_INFO	0x2d0
95 #define	FPM_DL_INFO	0x31000
96 
97 struct dl_info {
98 	ushort_t	unused;
99 	ushort_t	magic;
100 	ulong_t		cksum;
101 	time_t		datecode;
102 };
103 
104 #define	WWN_SIZE	8
105 #define	TEXT_SZ		64*1024
106 #define	IDATA_SZ	32*1024
107 #define	FPM_SZ		60*1024
108 
109 /* offsets in prom */
110 #define	TEXT_OFFSET	0
111 #define	IDATA_OFFSET	0x10000
112 #define	FPM_OFFSET	0x31000
113 
114 
115 #ifdef	__cplusplus
116 }
117 #endif
118 
119 #endif	/* _ROM_H */
120