Commit | Line | Data |
---|---|---|
a196a004 | 1 | /* |
35962040 KB |
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 | * | |
1c15e888 C |
8 | * Redistribution is only permitted until one year after the first shipment |
9 | * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and | |
10 | * binary forms are permitted provided that: (1) source distributions retain | |
11 | * this entire copyright notice and comment, and (2) distributions including | |
12 | * binaries display the following acknowledgement: This product includes | |
13 | * software developed by the University of California, Berkeley and its | |
14 | * contributors'' in the documentation or other materials provided with the | |
15 | * distribution and in all advertising materials mentioning features or use | |
16 | * of this software. Neither the name of the University nor the names of | |
17 | * its contributors may be used to endorse or promote products derived from | |
18 | * this software without specific prior written permission. | |
19 | * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | |
20 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
21 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
35962040 | 22 | * |
1c15e888 | 23 | * @(#)kdbreg.h 7.3 (Berkeley) 6/28/90 |
a196a004 | 24 | */ |
35962040 | 25 | |
a196a004 MK |
26 | /* |
27 | * The KDB50 registers are embedded inside the bi interface | |
28 | * general-purpose registers. | |
29 | */ | |
30 | struct kdb_regs { | |
31 | struct biiregs kdb_bi; | |
32 | short kdb_xxx; /* first half of GPR 0 unused */ | |
33 | short kdb_ip; /* initialisation and polling */ | |
34 | short kdb_sa; /* status & address (r/o half) */ | |
35 | short kdb_sw; /* status & address (w/o half) */ | |
36 | }; | |
37 | ||
38 | /* | |
39 | * Bits in KDB status register during initialisation | |
40 | */ | |
41 | #define KDB_ERR 0x8000 /* error */ | |
42 | #define KDB_STEP4 0x4000 /* step 4 has started */ | |
43 | #define KDB_STEP3 0x2000 /* step 3 has started */ | |
44 | #define KDB_STEP2 0x1000 /* step 2 has started */ | |
45 | #define KDB_STEP1 0x0800 /* step 1 has started */ | |
46 | #define KDB_DI 0x0100 /* controller implements diagnostics */ | |
47 | #define KDB_IE 0x0080 /* interrupt enable */ | |
48 | #define KDB_NCNRMASK 0x003f /* in STEP1, bits 0-2=NCMDL2, 3-5=NRSPL2 */ | |
49 | #define KDB_IVECMASK 0x007f /* in STEP2, bits 0-6 are interruptvec / 4 */ | |
50 | ||
51 | /* after initialisation: */ | |
52 | #define KDB_GO 0x0001 /* run */ | |
53 | ||
54 | #define KDBSR_BITS \ | |
55 | "\20\20ERR\17STEP4\16STEP3\15STEP2\14STEP1\13oldNV\12oldQB\11DI\10IE\1GO" | |
56 | ||
57 | /* | |
58 | * KDB Communications Area. Note that this structure definition | |
59 | * requires NRSP and NCMD to be defined already. | |
60 | */ | |
61 | struct kdbca { | |
62 | short ca_xxx1; /* unused */ | |
63 | char ca_xxx2; /* unused */ | |
64 | char ca_bdp; /* BDP to purge XXX */ | |
65 | short ca_cmdint; /* command ring transition flag */ | |
66 | short ca_rspint; /* response ring transition flag */ | |
67 | long ca_rspdsc[NRSP];/* response descriptors */ | |
68 | long ca_cmddsc[NCMD];/* command descriptors */ | |
69 | }; | |
70 | ||
71 | /* | |
72 | * Simplified routines (crash dump) use one command and one response. | |
73 | */ | |
74 | struct kdb1ca { | |
75 | long ca_xxx; | |
76 | short ca_cmdint; | |
77 | short ca_rspint; | |
78 | long ca_rspdsc; | |
79 | long ca_cmddsc; | |
80 | }; | |
81 | ||
82 | /* | |
83 | * Asserting KDB_MAP in values placed in mscp_seq.seq_buffer tells | |
84 | * the KDB to use mscp_seq.seq_mapbase as a set of PTEs and seq_buffer | |
85 | * as an offset value. Hence we need no mappings; the KDB50 reads | |
86 | * the hardware page tables directly. (Without KDB_MAP, seq_bufer | |
87 | * represents the physical memory address instead, and seq_mapbase is | |
88 | * unused.) | |
89 | */ | |
90 | #define KDB_MAP 0x80000000 | |
91 | #define KDB_PHYS 0 /* pseudo flag */ | |
92 | ||
93 | /* | |
94 | * KDB statistics. | |
95 | */ | |
96 | #define KS_MAXC 32 | |
97 | ||
98 | struct kdbstats { | |
99 | int ks_sys; /* transfers done from Sysmap */ | |
100 | int ks_paget; /* transfers done from Usrptmap */ | |
101 | int ks_contig; /* transfers done from contiguous user map */ | |
102 | int ks_copies; /* transfers done from pte copies */ | |
103 | int ks_mapwait; /* number of out-of-map waits */ | |
104 | int ks_cmd[KS_MAXC];/* commands started at once */ | |
105 | int ks_inval; /* copies due to !PG_V */ | |
106 | }; |