1 /* $NetBSD: sysarch.h,v 1.12 2007/03/04 05:59:11 christos Exp $ */
4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _ALPHA_SYSARCH_H_
33 #define _ALPHA_SYSARCH_H_
35 #include <machine/bus.h>
36 #include <machine/ieeefp.h>
39 * Architecture specific syscalls (ALPHA)
42 #define ALPHA_FPGETMASK 0
43 #define ALPHA_FPSETMASK 1
44 #define ALPHA_FPSETSTICKY 2
45 #define ALPHA_BUS_GET_WINDOW_COUNT 3
46 #define ALPHA_BUS_GET_WINDOW 4
47 #define ALPHA_PCI_CONF_READWRITE 5
48 #define ALPHA_FPGETSTICKY 6
49 #define ALPHA_GET_FP_C 7
50 #define ALPHA_SET_FP_C 8
52 struct alpha_fp_except_args
{
56 struct alpha_fp_c_args
{
60 struct alpha_bus_get_window_count_args
{
62 u_int count
; /* output */
65 struct alpha_bus_get_window_args
{
68 struct alpha_bus_space_translation
*translation
; /* output */
71 #define ALPHA_BUS_TYPE_PCI_IO 0
72 #define ALPHA_BUS_TYPE_PCI_MEM 1
73 #define ALPHA_BUS_TYPE_MAX 1
75 struct alpha_pci_conf_readwrite_args
{
85 extern u_int alpha_bus_window_count
[];
86 extern int (*alpha_bus_get_window
)(int, int,
87 struct alpha_bus_space_translation
*);
88 extern struct alpha_pci_chipset
*alpha_pci_chipset
;
90 #include <sys/cdefs.h>
92 struct alpha_bus_window
{
95 struct alpha_bus_space_translation abw_abst
;
99 int alpha_bus_getwindows(int, struct alpha_bus_window
**);
100 int alpha_bus_mapwindow(struct alpha_bus_window
*);
101 void alpha_bus_unmapwindow(struct alpha_bus_window
*);
103 void *alpha_pci_mem_map(bus_addr_t
, bus_size_t
, int,
104 struct alpha_bus_space_translation
*);
105 void alpha_pci_mem_unmap(struct alpha_bus_space_translation
*,
106 void *addr
, bus_size_t
);
108 u_int32_t
alpha_pci_conf_read(u_int
, u_int
, u_int
, u_int
);
109 void alpha_pci_conf_write(u_int
, u_int
, u_int
, u_int
, u_int32_t
);
111 int sysarch(int, void *);
115 #endif /* !_ALPHA_SYSARCH_H_ */