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