[BACK]Return to uvax.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / include

Annotation of sys/arch/vax/include/uvax.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: uvax.h,v 1.5 2002/09/21 13:42:43 hugh Exp $ */
                      2: /*     $NetBSD: uvax.h,v 1.5 1999/02/02 18:37:22 ragge Exp $ */
                      3: /*
                      4:  * Copyright (c) 2002 Hugh Graham.
                      5:  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
                      6:  * All rights reserved.
                      7:  *
                      8:  * This code is derived from software contributed to Ludd by Bertram Barth.
                      9:  *
                     10:  * Redistribution and use in source and binary forms, with or without
                     11:  * modification, are permitted provided that the following conditions
                     12:  * are met:
                     13:  * 1. Redistributions of source code must retain the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer.
                     15:  * 2. Redistributions in binary form must reproduce the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer in the
                     17:  *    documentation and/or other materials provided with the distribution.
                     18:  * 3. All advertising materials mentioning features or use of this software
                     19:  *    must display the following acknowledgement:
                     20:  *      This product includes software developed at Ludd, University of
                     21:  *      Lule}, Sweden and its contributors.
                     22:  * 4. The name of the author may not be used to endorse or promote products
                     23:  *    derived from this software without specific prior written permission
                     24:  *
                     25:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     26:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     27:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     28:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     29:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     30:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     31:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     32:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     33:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     34:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     35:  */
                     36:
                     37: #ifndef _VAX_UVAX_H_
                     38: #define _VAX_UVAX_H_
                     39:
                     40: /*
                     41:  * Generic definitions common on all MicroVAXen clock chip.
                     42:  */
                     43: #define        uVAX_CLKVRT     0200
                     44: #define        uVAX_CLKUIP     0200
                     45: #define        uVAX_CLKRATE    040
                     46: #define        uVAX_CLKENABLE  06
                     47: #define        uVAX_CLKSET     0206
                     48:
                     49: /* cpmbx bits  */
                     50: #define        uVAX_CLKHLTACT  03
                     51:
                     52: /* halt action values */
                     53: #define        uVAX_CLKRESTRT  01
                     54: #define        uVAX_CLKREBOOT  02
                     55: #define        uVAX_CLKHALT    03
                     56:
                     57: /* in progress flags */
                     58: #define        uVAX_CLKBOOT    04
                     59: #define        uVAX_CLKRSTRT   010
                     60: #define        uVAX_CLKLANG    0360
                     61:
                     62: /*
                     63:  * Miscellaneous registers common on most VAXststions.
                     64:  */
                     65: struct vs_cpu {
                     66:         u_long  vc_hltcod;      /* Halt Code Register */
                     67:         u_long  vc_410mser;    /* VS2K */
                     68:         u_long  vc_410cear;    /* VS2K */
                     69:        u_char  vc_intmsk;      /* Interrupt mask register */
                     70:        u_char  vc_vdcorg;      /* Mono display origin */
                     71:        u_char  vc_vdcsel;      /* Video interrupt select */
                     72:        u_char  vc_intreq;      /* Interrupt request register */
                     73: #define        vc_intclr vc_intreq
                     74:         u_short vc_diagdsp;     /* Diagnostic display register */
                     75:         u_short pad4;
                     76:         u_long  vc_parctl;      /* Parity Control Register */
                     77: #define        vc_bwf0 vc_parctl
                     78:         u_short pad5;
                     79:         u_short pad6;
                     80:         u_short vc_diagtimu;   /* usecond timer KA46 */
                     81:         u_short vc_diagtme;     /* Diagnostic time register */
                     82: #define        vc_diagtimm vc_diagtme  /* msecond time KA46 */
                     83: };
                     84: #define        PARCTL_DMA      0x1000000
                     85: #define        PARCTL_CPEN     2
                     86: #define        PARCTL_DPEN     1
                     87:
                     88: /*
                     89:  * Console Mailbox layout common to several models.
                     90:  */
                     91:
                     92: struct cpmbx {
                     93:        unsigned int mbox_halt:2;       /* mailbox halt action */
                     94:        unsigned int mbox_bip:1;        /* bootstrap in progress */
                     95:        unsigned int mbox_rip:1;        /* restart in progress */
                     96:        unsigned int mbox_lang:4;       /* language info */
                     97:        unsigned int terminal:8;        /* terminal info */
                     98:        unsigned int keyboard:8;        /* keyboard info */
                     99:        unsigned int user_four:4;       /* unknown */
                    100:        unsigned int user_halt:3;       /* user halt action */
                    101:        unsigned int user_one:1;        /* unknown */
                    102: };
                    103:
                    104: extern struct cpmbx *cpmbx;
                    105:
                    106: void   generic_halt(void);
                    107: void   generic_reboot(int);
                    108:
                    109: #define        MHALT_RESTART_REBOOT    0
                    110: #define        MHALT_RESTART           1
                    111: #define        MHALT_REBOOT            2
                    112: #define        MHALT_HALT              3
                    113:
                    114: #define        UHALT_DEFAULT           0
                    115: #define        UHALT_RESTART           1
                    116: #define        UHALT_REBOOT            2
                    117: #define        UHALT_HALT              3
                    118: #define        UHALT_RESTART_REBOOT    4
                    119:
                    120: #endif

CVSweb