xref: /netbsd-src/sys/dev/bi/kdbreg.h (revision 7991f5a7b8fc83a3d55dc2a1767cca3b84103969)
1*7991f5a7Sandvar /*	$NetBSD: kdbreg.h,v 1.6 2021/07/24 21:31:36 andvar Exp $	*/
2af86c7daSragge /*
3af86c7daSragge  * Copyright (c) 1988 Regents of the University of California.
4af86c7daSragge  * All rights reserved.
5af86c7daSragge  *
6af86c7daSragge  * This code is derived from software contributed to Berkeley by
7af86c7daSragge  * Chris Torek.
8af86c7daSragge  *
9af86c7daSragge  * Redistribution and use in source and binary forms, with or without
10af86c7daSragge  * modification, are permitted provided that the following conditions
11af86c7daSragge  * are met:
12af86c7daSragge  * 1. Redistributions of source code must retain the above copyright
13af86c7daSragge  *    notice, this list of conditions and the following disclaimer.
14af86c7daSragge  * 2. Redistributions in binary form must reproduce the above copyright
15af86c7daSragge  *    notice, this list of conditions and the following disclaimer in the
16af86c7daSragge  *    documentation and/or other materials provided with the distribution.
17aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
18af86c7daSragge  *    may be used to endorse or promote products derived from this software
19af86c7daSragge  *    without specific prior written permission.
20af86c7daSragge  *
21af86c7daSragge  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22af86c7daSragge  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23af86c7daSragge  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24af86c7daSragge  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25af86c7daSragge  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26af86c7daSragge  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27af86c7daSragge  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28af86c7daSragge  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29af86c7daSragge  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30af86c7daSragge  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31af86c7daSragge  * SUCH DAMAGE.
32af86c7daSragge  *
33af86c7daSragge  *	@(#)kdbreg.h	7.3 (Berkeley) 6/28/90
34af86c7daSragge  */
35af86c7daSragge 
36af86c7daSragge /*
37af86c7daSragge  * The KDB50 registers are embedded inside the bi interface
38af86c7daSragge  * general-purpose registers.
39af86c7daSragge  */
4094b8f863Sragge #ifdef notdef
41af86c7daSragge struct	kdb_regs {
42af86c7daSragge 	struct	biiregs kdb_bi;
43af86c7daSragge 	short	kdb_xxx;	/* first half of GPR 0 unused */
44af86c7daSragge 	short	kdb_ip;		/* initialisation and polling */
45af86c7daSragge 	short	kdb_sa;		/* status & address (r/o half) */
46af86c7daSragge 	short	kdb_sw;		/* status & address (w/o half) */
47af86c7daSragge };
4894b8f863Sragge #endif
4994b8f863Sragge 
5094b8f863Sragge #define	KDB_IP	0xf2
5194b8f863Sragge #define	KDB_SA	0xf4
5294b8f863Sragge #define	KDB_SW	0xf6
53af86c7daSragge 
54af86c7daSragge #define KDBSR_BITS \
55af86c7daSragge "\20\20ERR\17STEP4\16STEP3\15STEP2\14STEP1\13oldNV\12oldQB\11DI\10IE\1GO"
56af86c7daSragge 
57af86c7daSragge /*
58af86c7daSragge  * Asserting KDB_MAP in values placed in mscp_seq.seq_buffer tells
59af86c7daSragge  * the KDB to use mscp_seq.seq_mapbase as a set of PTEs and seq_buffer
60af86c7daSragge  * as an offset value.  Hence we need no mappings; the KDB50 reads
61*7991f5a7Sandvar  * the hardware page tables directly.  (Without KDB_MAP, seq_buffer
62af86c7daSragge  * represents the physical memory address instead, and seq_mapbase is
63af86c7daSragge  * unused.)
64af86c7daSragge  */
65af86c7daSragge #define	KDB_MAP		0x80000000
66af86c7daSragge #define	KDB_PHYS	0		/* pseudo flag */
67