|
|
1.1 root 1: /*
2: * Copyright (c) 1988 Regents of the University of California.
3: * All rights reserved.
4: *
5: * This code is derived from software contributed to Berkeley by
6: * Chris Torek.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. All advertising materials mentioning features or use of this software
17: * must display the following acknowledgement:
18: * This product includes software developed by the University of
19: * California, Berkeley and its contributors.
20: * 4. Neither the name of the University nor the names of its contributors
21: * may be used to endorse or promote products derived from this software
22: * without specific prior written permission.
23: *
24: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34: * SUCH DAMAGE.
35: *
36: * @(#)kdbreg.h 7.3 (Berkeley) 6/28/90
37: */
38:
39: /*
40: * The KDB50 registers are embedded inside the bi interface
41: * general-purpose registers.
42: */
43: struct kdb_regs {
44: struct biiregs kdb_bi;
45: short kdb_xxx; /* first half of GPR 0 unused */
46: short kdb_ip; /* initialisation and polling */
47: short kdb_sa; /* status & address (r/o half) */
48: short kdb_sw; /* status & address (w/o half) */
49: };
50:
51: /*
52: * Bits in KDB status register during initialisation
53: */
54: #define KDB_ERR 0x8000 /* error */
55: #define KDB_STEP4 0x4000 /* step 4 has started */
56: #define KDB_STEP3 0x2000 /* step 3 has started */
57: #define KDB_STEP2 0x1000 /* step 2 has started */
58: #define KDB_STEP1 0x0800 /* step 1 has started */
59: #define KDB_DI 0x0100 /* controller implements diagnostics */
60: #define KDB_IE 0x0080 /* interrupt enable */
61: #define KDB_NCNRMASK 0x003f /* in STEP1, bits 0-2=NCMDL2, 3-5=NRSPL2 */
62: #define KDB_IVECMASK 0x007f /* in STEP2, bits 0-6 are interruptvec / 4 */
63:
64: /* after initialisation: */
65: #define KDB_GO 0x0001 /* run */
66:
67: #define KDBSR_BITS \
68: "\20\20ERR\17STEP4\16STEP3\15STEP2\14STEP1\13oldNV\12oldQB\11DI\10IE\1GO"
69:
70: /*
71: * KDB Communications Area. Note that this structure definition
72: * requires NRSP and NCMD to be defined already.
73: */
74: struct kdbca {
75: short ca_xxx1; /* unused */
76: char ca_xxx2; /* unused */
77: char ca_bdp; /* BDP to purge XXX */
78: short ca_cmdint; /* command ring transition flag */
79: short ca_rspint; /* response ring transition flag */
80: long ca_rspdsc[NRSP];/* response descriptors */
81: long ca_cmddsc[NCMD];/* command descriptors */
82: };
83:
84: /*
85: * Simplified routines (crash dump) use one command and one response.
86: */
87: struct kdb1ca {
88: long ca_xxx;
89: short ca_cmdint;
90: short ca_rspint;
91: long ca_rspdsc;
92: long ca_cmddsc;
93: };
94:
95: /*
96: * Asserting KDB_MAP in values placed in mscp_seq.seq_buffer tells
97: * the KDB to use mscp_seq.seq_mapbase as a set of PTEs and seq_buffer
98: * as an offset value. Hence we need no mappings; the KDB50 reads
99: * the hardware page tables directly. (Without KDB_MAP, seq_bufer
100: * represents the physical memory address instead, and seq_mapbase is
101: * unused.)
102: */
103: #define KDB_MAP 0x80000000
104: #define KDB_PHYS 0 /* pseudo flag */
105:
106: /*
107: * KDB statistics.
108: */
109: #define KS_MAXC 32
110:
111: struct kdbstats {
112: int ks_sys; /* transfers done from Sysmap */
113: int ks_paget; /* transfers done from Usrptmap */
114: int ks_contig; /* transfers done from contiguous user map */
115: int ks_copies; /* transfers done from pte copies */
116: int ks_mapwait; /* number of out-of-map waits */
117: int ks_cmd[KS_MAXC];/* commands started at once */
118: int ks_inval; /* copies due to !PG_V */
119: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.