Commit | Line | Data |
---|---|---|
a196a004 MK |
1 | /* |
2 | * @(#)kdbreg.h 7.1 (Berkeley) %G% | |
3 | */ | |
4 | /* | |
5 | * The KDB50 registers are embedded inside the bi interface | |
6 | * general-purpose registers. | |
7 | */ | |
8 | struct kdb_regs { | |
9 | struct biiregs kdb_bi; | |
10 | short kdb_xxx; /* first half of GPR 0 unused */ | |
11 | short kdb_ip; /* initialisation and polling */ | |
12 | short kdb_sa; /* status & address (r/o half) */ | |
13 | short kdb_sw; /* status & address (w/o half) */ | |
14 | }; | |
15 | ||
16 | /* | |
17 | * Bits in KDB status register during initialisation | |
18 | */ | |
19 | #define KDB_ERR 0x8000 /* error */ | |
20 | #define KDB_STEP4 0x4000 /* step 4 has started */ | |
21 | #define KDB_STEP3 0x2000 /* step 3 has started */ | |
22 | #define KDB_STEP2 0x1000 /* step 2 has started */ | |
23 | #define KDB_STEP1 0x0800 /* step 1 has started */ | |
24 | #define KDB_DI 0x0100 /* controller implements diagnostics */ | |
25 | #define KDB_IE 0x0080 /* interrupt enable */ | |
26 | #define KDB_NCNRMASK 0x003f /* in STEP1, bits 0-2=NCMDL2, 3-5=NRSPL2 */ | |
27 | #define KDB_IVECMASK 0x007f /* in STEP2, bits 0-6 are interruptvec / 4 */ | |
28 | ||
29 | /* after initialisation: */ | |
30 | #define KDB_GO 0x0001 /* run */ | |
31 | ||
32 | #define KDBSR_BITS \ | |
33 | "\20\20ERR\17STEP4\16STEP3\15STEP2\14STEP1\13oldNV\12oldQB\11DI\10IE\1GO" | |
34 | ||
35 | /* | |
36 | * KDB Communications Area. Note that this structure definition | |
37 | * requires NRSP and NCMD to be defined already. | |
38 | */ | |
39 | struct kdbca { | |
40 | short ca_xxx1; /* unused */ | |
41 | char ca_xxx2; /* unused */ | |
42 | char ca_bdp; /* BDP to purge XXX */ | |
43 | short ca_cmdint; /* command ring transition flag */ | |
44 | short ca_rspint; /* response ring transition flag */ | |
45 | long ca_rspdsc[NRSP];/* response descriptors */ | |
46 | long ca_cmddsc[NCMD];/* command descriptors */ | |
47 | }; | |
48 | ||
49 | /* | |
50 | * Simplified routines (crash dump) use one command and one response. | |
51 | */ | |
52 | struct kdb1ca { | |
53 | long ca_xxx; | |
54 | short ca_cmdint; | |
55 | short ca_rspint; | |
56 | long ca_rspdsc; | |
57 | long ca_cmddsc; | |
58 | }; | |
59 | ||
60 | /* | |
61 | * Asserting KDB_MAP in values placed in mscp_seq.seq_buffer tells | |
62 | * the KDB to use mscp_seq.seq_mapbase as a set of PTEs and seq_buffer | |
63 | * as an offset value. Hence we need no mappings; the KDB50 reads | |
64 | * the hardware page tables directly. (Without KDB_MAP, seq_bufer | |
65 | * represents the physical memory address instead, and seq_mapbase is | |
66 | * unused.) | |
67 | */ | |
68 | #define KDB_MAP 0x80000000 | |
69 | #define KDB_PHYS 0 /* pseudo flag */ | |
70 | ||
71 | /* | |
72 | * KDB statistics. | |
73 | */ | |
74 | #define KS_MAXC 32 | |
75 | ||
76 | struct kdbstats { | |
77 | int ks_sys; /* transfers done from Sysmap */ | |
78 | int ks_paget; /* transfers done from Usrptmap */ | |
79 | int ks_contig; /* transfers done from contiguous user map */ | |
80 | int ks_copies; /* transfers done from pte copies */ | |
81 | int ks_mapwait; /* number of out-of-map waits */ | |
82 | int ks_cmd[KS_MAXC];/* commands started at once */ | |
83 | int ks_inval; /* copies due to !PG_V */ | |
84 | }; |