Annotation of researchv9/sys/sun3/eeprom.h, revision 1.1.1.1

1.1       root        1: /*      @(#)eeprom.h 1.1 86/02/03 SMI      */
                      2: 
                      3: /*
                      4:  * Copyright (c) 1985 by Sun Microsystems, Inc.
                      5:  */
                      6: 
                      7: /*
                      8:  * The EEPROM consists of one 2816 type EEPROM providing 2K bytes
                      9:  * of electically erasable storage.  To modify the EEPROM, each
                     10:  * byte must be written separately.  After writing each byte
                     11:  * a 10 millisecond pause must be observed before the EEPROM can
                     12:  * read or written again.  The majority of the EEPROM is diagnostic
                     13:  * and is defined in ../mon/eeprom.h.  The software specific
                     14:  * information (struct ee_soft) is defined here.  This structure
                     15:  * is 0x100 bytes big.
                     16:  */
                     17: 
                     18: struct ee_soft {
                     19:        u_short ees_wrcnt[3];           /* write count (3 copies) */
                     20:        u_short ees_nu1;                /* not used */
                     21:        u_char  ees_chksum[3];          /* software area checksum (3 copies) */
                     22:        u_char  ees_nu2;                /* not used */
                     23:        u_char  ees_resv[0x100-0xc];    /* XXX - figure this out sometime */
                     24: };
                     25: 
                     26: #define EE_SOFT_DEFINED                /* tells ../mon/eeprom.h to use this ee_soft */
                     27: 
                     28: #ifdef KERNEL
                     29: /*      @(#)eeprom.h 1.3 85/10/11 SMI      */
                     30: 
                     31: /*
                     32:  * Copyright (c) 1985 by Sun Microsystems, Inc.
                     33:  */
                     34: 
                     35: /*
                     36:  * This structure defines the contents to the EEPROM for the Sun-3.
                     37:  * It is divided into a diagnostic section, a reserved section,
                     38:  * a ROM section, and a software section (defined in detail
                     39:  * elsewhere).
                     40:  */
                     41: #ifndef _EPROM_
                     42: #define _EPROM_
                     43: 
                     44: struct eeprom {
                     45:        struct  ee_diag {               /* diagnostic's area of EEPROM */
                     46: /* 0x000 */    u_int   eed_test;       /* diagnostic test write area */
                     47: /* 0x004 */    u_short eed_wrcnt[3];   /* diag area write count (3 copies) */
                     48:                short   eed_nu1;        /* not used */
                     49: /* 0x00c */    u_char  eed_chksum[3];  /* diag area checksum (3 copies) */
                     50:                char    eed_nu2;        /* not used */
                     51: /* 0x010 */    time_t  eed_hwupdate;   /* date of last hardware update */
                     52: /* 0x014 */    char    eed_memsize;    /* MB's of memory in system */
                     53: /* 0x015 */    char    eed_memtest;    /* MB's of memory to test on powerup */
                     54: /* 0x016 */    char    eed_scrsize;    /* screen size, in pixels */
                     55: #define        EED_SCR_1152X900        0x00
                     56: #define        EED_SCR_1024X1024       0x12
                     57: /* 0x017 */    char    eed_dogaction;  /* action to take on watchdog reset */
                     58: #define        EED_DOG_MONITOR         0x00    /* return to monitor command level */
                     59: #define        EED_DOG_REBOOT          0x12    /* perform power on reset and reboot */
                     60: /* 0x018 */    char    eed_defboot;    /* default boot? */
                     61: #define        EED_DEFBOOT             0x00    /* do default boot */
                     62: #define        EED_NODEFBOOT           0x12    /* don't do default boot */
                     63: /* 0x019 */    char    eed_bootdev[2]; /* name of boot device (e.g. xy, ie) */
                     64: /* 0x01b */    char    eed_bootctrl;   /* controller number to boot from */
                     65: /* 0x01c */    char    eed_bootunit;   /* unit number to boot from */
                     66: /* 0x01d */    char    eed_bootpart;   /* partition number to boot from */
                     67: /* 0x01e */    char    eed_kbdtype;    /* non-Sun keyboard type - for OEM's */
                     68: #define        EED_KBD_SUN     0               /* one of the Sun keyboards */
                     69: /* 0x01f */    char    eed_console;    /* device to use for console */
                     70: #define        EED_CONS_BW     0x00            /* use b&w monitor for console */
                     71: #define        EED_CONS_TTYA   0x10            /* use tty A port for console */
                     72: #define        EED_CONS_TTYB   0x11            /* use tty B port for console */
                     73: #define        EED_CONS_COLOR  0x12            /* use color monitor for console */
                     74: /* 0x020 */    char    eed_showlogo;   /* display Sun logo? */
                     75: #define        EED_LOGO        0x00
                     76: #define        EED_NOLOGO      0x12
                     77: /* 0x021 */    char    eed_keyclick;   /* keyboard click? */
                     78: #define        EED_NOKEYCLICK  0x00
                     79: #define        EED_KEYCLICK    0x12
                     80: /* 0x022 */    char    eed_diagdev[2]; /* name of boot device (e.g. xy, ie) */
                     81: /* 0x024 */    char    eed_diagctrl;   /* controller number to boot from */
                     82: /* 0x025 */    char    eed_diagunit;   /* unit number to boot from */
                     83: /* 0x026 */    char    eed_diagpart;   /* partition number to boot from */
                     84: /* 0x027 */    char    eed_diagnu;     /* not used */
                     85: /* 0x028 */    char    eed_diagpath[40]; /* boot path of diagnostic */
                     86: /* 0x050 */    char    eed_nu5[8];     /* not used */
                     87: /* 0x058 */    struct  eed_tty_def {   /* tty port defaults */
                     88:                        char    eet_unused[8];
                     89:                } eed_ttya_def, eed_ttyb_def;
                     90: /* 0x068 */    char    eed_banner[80]; /* banner if not displaying Sun logo */
                     91:                                        /* last two chars must be \r\n (XXX - why not \0?) */
                     92: /* 0x0b8 */    u_short eed_pattern;    /* test pattern - must contain 0xAA55 */
                     93: /* 0x0ba */    short   eed_nu6;        /* not used */
                     94: /* 0x0bc */    struct  eed_conf {      /* system configuration, by slot */
                     95:                        union {
                     96:                        struct  eec_gen {
                     97:                                char    eec_type;       /* type of this board */
                     98:                                char    eec_size[7];    /* size of each entry */
                     99:                        } eec_gen;
                    100: 
                    101: #define        EEC_TYPE_CPU    0x01                    /* cpu */
                    102:                        struct  eec_cpu {
                    103:                                char    eec_type;       /* type of this board */
                    104:                                char    eec_cpu_memsize;        /* MB's on cpu */
                    105:                                int     eec_cpu_unused:6;
                    106:                                int     eec_cpu_dcp:1;          /* dcp? */
                    107:                                int     eec_cpu_68881:1;        /* 68881? */
                    108:                                char    eec_cpu_cachesize;      /* KB's in cache */
                    109:                        } eec_cpu;
                    110: 
                    111: #define        EEC_TYPE_MEM    0x02                    /* memory board */
                    112:                        struct  eec_mem {
                    113:                                char    eec_type;       /* type of this board */
                    114:                                char    eec_mem_size;   /* MB's on card */
                    115:                        } eec_mem;
                    116: 
                    117: #define        EEC_TYPE_COLOR  0x03                    /* color frame buffer */
                    118:                        struct  eec_color {
                    119:                                char    eec_type;       /* type of this board */
                    120:                                char    eec_color_type;
                    121: #define        EEC_COLOR_TYPE_CG2      2       /* cg2 color board */
                    122: #define        EEC_COLOR_TYPE_CG3      3       /* cg3 color board */
                    123:                        } eec_color;
                    124: 
                    125: #define        EEC_TYPE_BW     0x04                    /* b&w frame buffer */
                    126: 
                    127: #define        EEC_TYPE_FPA    0x05                    /* floating point accelerator */
                    128: 
                    129: #define        EEC_TYPE_DISK   0x06                    /* SMD disk controller */
                    130:                        struct  eec_disk {
                    131:                                char    eec_type;       /* type of this board */
                    132:                                char    eec_disk_type;  /* controller type */
                    133:                                char    eec_disk_ctlr;  /* controller number */
                    134:                                char    eec_disk_disks; /* number of disks */
                    135:                        } eec_disk;
                    136: 
                    137: #define        EEC_TYPE_TAPE   0x07                    /* 1/2" tape controller */
                    138:                        struct eec_tape {
                    139:                                char    eec_type;       /* type of this board */
                    140:                                char    eec_tape_type;  /* controller type */
                    141: #define        EEC_TAPE_TYPE_XT        1       /* Xylogics 472 */
                    142: #define        EEC_TAPE_TYPE_MT        2       /* TapeMaster */
                    143:                                char    eec_tape_ctlr;  /* controller number */
                    144:                                char    eec_tape_drives;/* number of drives */
                    145:                        } eec_tape;
                    146: 
                    147: #define        EEC_TYPE_ETHER  0x08                    /* Ethernet controller */
                    148: 
                    149: #define        EEC_TYPE_TTY    0x09                    /* terminal multiplexer */
                    150:                        struct eec_tty {
                    151:                                char    eec_type;       /* type of this board */
                    152:                                char    eec_tty_lines;  /* number of lines */
                    153:                        } eec_tty;
                    154: 
                    155: #define        EEC_TYPE_GPGB   0x0a                    /* graphics processor/buffer */
                    156: 
                    157: #define        EEC_TYPE_DCP    0x0b                    /* DCP ??? XXX */
                    158: 
                    159: #define        EEC_TYPE_SCSI   0x0c                    /* SCSI controller */
                    160:                        struct  eec_scsi {
                    161:                                char    eec_type;       /* type of this board */
                    162:                                char    eec_scsi_type;  /* controller type */
                    163:                                char    eec_scsi_tapes; /* number of tapes */
                    164:                                char    eec_scsi_disks; /* number of disks */
                    165:                        } eec_scsi;
                    166: 
                    167: #define        EEC_TYPE_END    0xff                    /* end of card cage */
                    168:                        } eec_un;
                    169:                } eed_conf[13];
                    170: /* 0x124 */    char    eed_resv[0x500-0x124];  /* reserved */
                    171:        } ee_diag;
                    172: 
                    173:        struct  ee_resv {               /* reserved area of EEPROM */
                    174: /* 0x500 */    u_short eev_wrcnt[3];   /* write count (3 copies) */
                    175:                short   eev_nu1;        /* not used */
                    176: /* 0x508 */    u_char  eev_chksum[3];  /* reserved area checksum (3 copies) */
                    177:                char    eev_nu2;        /* not used */
                    178: /* 0x50c */    char    eev_resv[0x600-0x50c];
                    179:        } ee_resv;
                    180: 
                    181:        struct  ee_rom {                /* ROM area of EEPROM */
                    182: /* 0x600 */    u_short eer_wrcnt[3];   /* write count (3 copies) */
                    183:                short   eer_nu1;        /* not used */
                    184: /* 0x608 */    u_char  eer_chksum[3];  /* ROM area checksum (3 copies) */
                    185:                char    eer_nu2;        /* not used */
                    186: /* 0x60c */    char    eer_resv[0x700-0x60c];
                    187:        } ee_rom;
                    188: 
                    189:        /*
                    190:         * The following area is reserved for software (i.e. UNIX).
                    191:         * The actual contents of this area are defined elsewhere.
                    192:         */
                    193: #ifndef EE_SOFT_DEFINED
                    194:        struct  ee_softresv {           /* software area of EEPROM */
                    195: /* 0x700 */    u_short ees_wrcnt[3];   /* write count (3 copies) */
                    196:                short   ees_nu1;        /* not used */
                    197: /* 0x708 */    u_char  ees_chksum[3];  /* software area checksum (3 copies) */
                    198:                char    ees_nu2;        /* not used */
                    199: /* 0x70c */    char    ees_resv[0x800-0x70c];
                    200:        } ee_soft;
                    201: #else
                    202:        struct  ee_soft ee_soft;
                    203: #endif
                    204: };
                    205: #endif !_EPROM_
                    206: #endif
                    207: 
                    208: #define        EEPROM_SIZE             0x800   /* size of eeprom in bytes */
                    209: #define        OBIO_EEPROM_ADDR        0x40000 /* address of eeprom in obio space */
                    210: 
                    211: #define        EEPROM_ADDR     0x0FFE0000      /* virtual address we map eeprom to */
                    212: 
                    213: #define        EEPROM          ((struct eeprom *)EEPROM_ADDR)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.