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