Home | History | Annotate | Line # | Download | only in include
eeprom.h revision 1.3
      1 /*
      2  * Copyright (c) 1994 Gordon W. Ross
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  * 1. Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  * 3. The name of the author may not be used to endorse or promote products
     14  *    derived from this software without specific prior written permission.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26  *
     27  *	$Id: eeprom.h,v 1.3 1994/05/04 05:23:02 gwr Exp $
     28  */
     29 
     30 /*
     31  * Structure/definitions for the Sun3 EEPROM.
     32  *
     33  * This information is published in the Sun document:
     34  * "PROM User's Manual", part number 800-1736010.
     35  */
     36 
     37 
     38 /*
     39  * Note that most places where the PROM stores a "true/false" flag,
     40  * the true value is 0x12 and false is the usual zero.  Such flags
     41  * all take the values EE_TRUE or EE_FALSE so this file does not
     42  * need to define so many value macros.
     43  */
     44 #define	EE_TRUE 0x12
     45 #define	EE_FALSE   0
     46 
     47 struct eeprom {
     48 
     49 	/* 0x00 */
     50 	u_char	eeTestArea[4];		/* Factory Defined */
     51 	u_short	eeWriteCount[4];	/*    ||      ||   */
     52 	u_char	eeChecksum[4];  	/*    ||      ||   */
     53 	time_t	eeLastHwUpdate; 	/*    ||      ||   */
     54 
     55 	/* 0x14 */
     56 	u_char	eeInstalledMem; 	/* Megabytes */
     57 	u_char	eeMemTestSize;		/*     ||    */
     58 
     59 	/* 0x16 */
     60 	u_char	eeScreenSize;
     61 #define	EE_SCR_1152X900 	0x00
     62 #define	EE_SCR_1024X1024	0x12
     63 #define EE_SCR_1600X1280	0x13
     64 #define EE_SCR_1440X1440	0x14
     65 
     66 	u_char	eeWatchDogDoesReset;	/* Watchdog timeout action:
     67 					 * true:  reset/reboot
     68 					 * false: return to monitor
     69 					 */
     70 	/* 0x18 */
     71 	u_char	eeBootDevStored;	/* Is the boot device stored:
     72 					 * true:  use stored device spec.
     73 					 * false: use default (try all)
     74 					 */
     75 	/* Stored boot device spec. i.e.: "sd(Ctlr,Unit,Part)" */
     76 	u_char	eeBootDevName[2];	/* xy,xd,sd,ie,le,st,xt,mt,...	*/
     77 	u_char	eeBootDevCtlr;
     78 	u_char	eeBootDevUnit;
     79 	u_char	eeBootDevPart;
     80 
     81 	/* 0x1E */
     82 	u_char	eeKeyboardType;		/* zero for sun keyboards */
     83 	u_char	eeConsole;		/* What to use for the console	*/
     84 #define	EE_CONS_BW		0x00	/* - On-board B&W / keyboard	*/
     85 #define	EE_CONS_TTYA		0x10	/* - serial port A		*/
     86 #define	EE_CONS_TTYB		0x11	/* - serial port B		*/
     87 #define	EE_CONS_COLOR		0x12	/* - Color FB / keyboard	*/
     88 #define	EE_CONS_P4OPT		0x20	/* - Option board on P4		*/
     89 
     90 	/* 0x20 */
     91 	u_char	eeCustomBanner;		/* Is there a custom banner:
     92 					 * true:  use text at 0x68
     93 					 * false: use Sun banner
     94 					 */
     95 
     96 	u_char	eeKeyClick;		/* true/false */
     97 
     98 	/* Boot device with "Diag" switch in Diagnostic mode: */
     99 	u_char	eeDiagDevName[2];
    100 	u_char	eeDiagDevCtlr;
    101 	u_char	eeDiagDevUnit;
    102 	u_char	eeDiagDevPart;
    103 
    104 	/* Video white-on-black (not implemented) */
    105 	u_char	eeWhiteOnBlack;		/* true/false */
    106 
    107 	/* 0x28 */
    108 	char	eeDiagPath[40];		/* path name of diag program	*/
    109 
    110 	/* 0x50 */
    111 	u_char	eeTtyCols;		/* normally 80 */
    112 	u_char	eeTtyRows;		/* normally 34 */
    113 	u_char	ee_x52[6];		/* unused */
    114 
    115 	/* 0x58 */
    116 	/* Default parameters for tty A and tty B: */
    117 	struct	eeTtyDef {
    118 	    u_char	eetBaudSet;	/* Is the baud rate set?
    119 					 * true:  use values here
    120 					 * false: use default (9600)
    121 					 */
    122 	    u_char	eetBaudHi;	/* i.e. 96..  */
    123 	    u_char	eetBaudLo;	/*      ..00  */
    124 	    u_char	eetNoRtsDtr;	/* true: disable H/W flow
    125 					 * false: enable H/W flow */
    126 	    u_char	eet_pad[4];
    127 	} eeTtyDefA, eeTtyDefB;
    128 
    129 	/* 0x68 */
    130 	char eeBannerString[80];	/* see eeCustomBanner above */
    131 
    132 	/* 0xB8 */
    133 	u_short	eeTestPattern;		/* must be 0xAA55 */
    134 	u_short ee_xBA;			/* unused */
    135 
    136 	/* 0xBC */
    137 	/* Configuration data.  Hopefully we don't need it. */
    138 	struct eeConf {
    139 	    u_char	eecData[16];
    140 	} eeConf[12+1];
    141 
    142 	/* 0x18c */
    143 	u_char	eeAltKeyTable;		/* What Key table to use:
    144 					 * 0x58: EEPROM tables
    145 					 * else: PROM key tables
    146 					 */
    147 	u_char	eeKeyboardLocale;	/* extended keyboard type */
    148 	u_char	eeKeyboardID;		/* for EEPROM key tables  */
    149 	u_char	eeCustomLogo;		/* true: use eeLogoBitmap */
    150 
    151 	/* 0x190 */
    152 	u_char	eeKeymapLC[0x80];
    153 	u_char	eeKeymapUC[0x80];
    154 
    155 	/* 0x290 */
    156 	u_char	eeLogoBitmap[64][8];	/* 64x64 bit custom logo */
    157 
    158 	/* 0x490 */
    159 	u_char	ee_x490[0x500-0x490];	/* unused */
    160 
    161 	/* Other stuff we don't care about... */
    162 	/* 0x500 */
    163 	u_char	eeReserved[0x100];
    164 	/* 0x600 */
    165 	u_char	eeROM_Area[0x100];
    166 	/* 0x700 */
    167 	u_char	eeUnixArea[0x100];
    168 };
    169