xref: /minix3/sys/arch/x86/include/bus_funcs.h (revision 1cd76c751364e6270e8d5a0daebc6d3d169baf4d)
1*1cd76c75SBen Gras /*	$NetBSD: bus_funcs.h,v 1.1 2011/07/01 17:10:01 dyoung Exp $	*/
2*1cd76c75SBen Gras 
3*1cd76c75SBen Gras /*-
4*1cd76c75SBen Gras  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
5*1cd76c75SBen Gras  * All rights reserved.
6*1cd76c75SBen Gras  *
7*1cd76c75SBen Gras  * This code is derived from software contributed to The NetBSD Foundation
8*1cd76c75SBen Gras  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9*1cd76c75SBen Gras  * NASA Ames Research Center.
10*1cd76c75SBen Gras  *
11*1cd76c75SBen Gras  * Redistribution and use in source and binary forms, with or without
12*1cd76c75SBen Gras  * modification, are permitted provided that the following conditions
13*1cd76c75SBen Gras  * are met:
14*1cd76c75SBen Gras  * 1. Redistributions of source code must retain the above copyright
15*1cd76c75SBen Gras  *    notice, this list of conditions and the following disclaimer.
16*1cd76c75SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
17*1cd76c75SBen Gras  *    notice, this list of conditions and the following disclaimer in the
18*1cd76c75SBen Gras  *    documentation and/or other materials provided with the distribution.
19*1cd76c75SBen Gras  *
20*1cd76c75SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21*1cd76c75SBen Gras  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22*1cd76c75SBen Gras  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23*1cd76c75SBen Gras  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24*1cd76c75SBen Gras  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25*1cd76c75SBen Gras  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26*1cd76c75SBen Gras  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27*1cd76c75SBen Gras  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28*1cd76c75SBen Gras  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29*1cd76c75SBen Gras  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30*1cd76c75SBen Gras  * POSSIBILITY OF SUCH DAMAGE.
31*1cd76c75SBen Gras  */
32*1cd76c75SBen Gras 
33*1cd76c75SBen Gras /*
34*1cd76c75SBen Gras  * Copyright (c) 1996 Charles M. Hannum.  All rights reserved.
35*1cd76c75SBen Gras  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
36*1cd76c75SBen Gras  *
37*1cd76c75SBen Gras  * Redistribution and use in source and binary forms, with or without
38*1cd76c75SBen Gras  * modification, are permitted provided that the following conditions
39*1cd76c75SBen Gras  * are met:
40*1cd76c75SBen Gras  * 1. Redistributions of source code must retain the above copyright
41*1cd76c75SBen Gras  *    notice, this list of conditions and the following disclaimer.
42*1cd76c75SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
43*1cd76c75SBen Gras  *    notice, this list of conditions and the following disclaimer in the
44*1cd76c75SBen Gras  *    documentation and/or other materials provided with the distribution.
45*1cd76c75SBen Gras  * 3. All advertising materials mentioning features or use of this software
46*1cd76c75SBen Gras  *    must display the following acknowledgement:
47*1cd76c75SBen Gras  *      This product includes software developed by Christopher G. Demetriou
48*1cd76c75SBen Gras  *	for the NetBSD Project.
49*1cd76c75SBen Gras  * 4. The name of the author may not be used to endorse or promote products
50*1cd76c75SBen Gras  *    derived from this software without specific prior written permission
51*1cd76c75SBen Gras  *
52*1cd76c75SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
53*1cd76c75SBen Gras  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
54*1cd76c75SBen Gras  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55*1cd76c75SBen Gras  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
56*1cd76c75SBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
57*1cd76c75SBen Gras  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
58*1cd76c75SBen Gras  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59*1cd76c75SBen Gras  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60*1cd76c75SBen Gras  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
61*1cd76c75SBen Gras  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62*1cd76c75SBen Gras  */
63*1cd76c75SBen Gras 
64*1cd76c75SBen Gras #ifndef _X86_BUS_FUNCS_H_
65*1cd76c75SBen Gras #define _X86_BUS_FUNCS_H_
66*1cd76c75SBen Gras 
67*1cd76c75SBen Gras extern bus_space_tag_t x86_bus_space_mem;
68*1cd76c75SBen Gras extern bus_space_tag_t x86_bus_space_io;
69*1cd76c75SBen Gras 
70*1cd76c75SBen Gras int	_x86_memio_map(bus_space_tag_t t, bus_addr_t addr,
71*1cd76c75SBen Gras 	    bus_size_t size, int flags, bus_space_handle_t *bshp);
72*1cd76c75SBen Gras void	_x86_memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh,
73*1cd76c75SBen Gras 	    bus_size_t size, bus_addr_t *);
74*1cd76c75SBen Gras 
75*1cd76c75SBen Gras #endif /* _X86_BUS_FUNCS_H_ */
76