xref: /netbsd-src/sys/dev/qbus/ubareg.h (revision 6a6027692662ba623e7bf5274322989a7b5d1440)
1*6a602769Sragge /*	$NetBSD: ubareg.h,v 1.17 2017/05/22 17:22:29 ragge Exp $	*/
2520d8c03Sragge 
367585227Sragge /*
467585227Sragge  * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
5520d8c03Sragge  *
6520d8c03Sragge  * Redistribution and use in source and binary forms, with or without
7520d8c03Sragge  * modification, are permitted provided that the following conditions
8520d8c03Sragge  * are met:
9520d8c03Sragge  * 1. Redistributions of source code must retain the above copyright
10520d8c03Sragge  *    notice, this list of conditions and the following disclaimer.
11520d8c03Sragge  * 2. Redistributions in binary form must reproduce the above copyright
12520d8c03Sragge  *    notice, this list of conditions and the following disclaimer in the
13520d8c03Sragge  *    documentation and/or other materials provided with the distribution.
14520d8c03Sragge  *
1567585227Sragge  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1667585227Sragge  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1767585227Sragge  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1867585227Sragge  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1967585227Sragge  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2067585227Sragge  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2167585227Sragge  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2267585227Sragge  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2367585227Sragge  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2467585227Sragge  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25520d8c03Sragge  */
26520d8c03Sragge 
27520d8c03Sragge /*
2867585227Sragge  * UNIBUS/Qbus map table definitions. Not unlike VAX page tables.
2967585227Sragge  * This type of map table is used in more devices than Unibus devices.
30520d8c03Sragge  */
3167585227Sragge #define	UBA_V		0x80000000	/* PTE entry is valid */
3267585227Sragge #define	UBA_BDPMASK	0x01e00000	/* BDP entries */
3367585227Sragge #define	UBA_BDPSHIFT	21
3467585227Sragge #define	UBA_PFN		0x001fffff	/* PFN map */
35520d8c03Sragge 
3667585227Sragge #define	UBA_PGSHIFT	9
3767585227Sragge #define	UBA_NBPG	(1 << 9)	/* Size of a Unibus map page */
3867585227Sragge #define	UBA_PGOFSET	(UBA_NBPG - 1)
39520d8c03Sragge 
4067585227Sragge #define	UBAIOSIZE	(8*1024)	/* 8K I/O space */
41520d8c03Sragge 
42