Home | History | Annotate | Line # | Download | only in include
sysarch.h revision 1.16
      1  1.16   dyoung /* $NetBSD: sysarch.h,v 1.16 2011/07/17 04:30:56 dyoung Exp $ */
      2   1.4  thorpej 
      3   1.4  thorpej /*-
      4   1.4  thorpej  * Copyright (c) 2000 The NetBSD Foundation, Inc.
      5   1.4  thorpej  * All rights reserved.
      6   1.4  thorpej  *
      7   1.4  thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8   1.4  thorpej  * by Jason R. Thorpe.
      9   1.4  thorpej  *
     10   1.4  thorpej  * Redistribution and use in source and binary forms, with or without
     11   1.4  thorpej  * modification, are permitted provided that the following conditions
     12   1.4  thorpej  * are met:
     13   1.4  thorpej  * 1. Redistributions of source code must retain the above copyright
     14   1.4  thorpej  *    notice, this list of conditions and the following disclaimer.
     15   1.4  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.4  thorpej  *    notice, this list of conditions and the following disclaimer in the
     17   1.4  thorpej  *    documentation and/or other materials provided with the distribution.
     18   1.4  thorpej  *
     19   1.4  thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20   1.4  thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21   1.4  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22   1.4  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23   1.4  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24   1.4  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25   1.4  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26   1.4  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27   1.4  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28   1.4  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29   1.4  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     30   1.4  thorpej  */
     31   1.3     ross 
     32   1.3     ross #ifndef _ALPHA_SYSARCH_H_
     33   1.3     ross #define _ALPHA_SYSARCH_H_
     34   1.3     ross 
     35  1.15   dyoung #include <sys/types.h>
     36  1.15   dyoung #include <sys/stdint.h>
     37  1.15   dyoung 
     38   1.3     ross #include <machine/ieeefp.h>
     39   1.1      cgd 
     40   1.1      cgd /*
     41   1.3     ross  * Architecture specific syscalls (ALPHA)
     42   1.1      cgd  */
     43   1.1      cgd 
     44   1.4  thorpej #define	ALPHA_FPGETMASK			0
     45   1.4  thorpej #define	ALPHA_FPSETMASK			1
     46   1.4  thorpej #define	ALPHA_FPSETSTICKY		2
     47   1.8     ross #define	ALPHA_FPGETSTICKY		6
     48   1.9  thorpej #define	ALPHA_GET_FP_C			7
     49   1.9  thorpej #define	ALPHA_SET_FP_C			8
     50   1.7     ross 
     51   1.3     ross struct alpha_fp_except_args {
     52   1.3     ross 	fp_except mask;
     53   1.9  thorpej };
     54   1.9  thorpej 
     55   1.9  thorpej struct alpha_fp_c_args {
     56   1.9  thorpej 	uint64_t fp_c;
     57   1.3     ross };
     58   1.1      cgd 
     59  1.15   dyoung #ifdef _KERNEL
     60  1.15   dyoung #include <machine/bus_defs.h>
     61  1.15   dyoung 
     62  1.15   dyoung #define	ALPHA_BUS_GET_WINDOW_COUNT	3
     63  1.15   dyoung #define	ALPHA_BUS_GET_WINDOW		4
     64  1.15   dyoung #define	ALPHA_PCI_CONF_READWRITE	5
     65   1.4  thorpej struct alpha_bus_get_window_count_args {
     66   1.4  thorpej 	u_int type;
     67   1.4  thorpej 	u_int count;	/* output */
     68   1.4  thorpej };
     69   1.4  thorpej 
     70   1.4  thorpej struct alpha_bus_get_window_args {
     71   1.4  thorpej 	u_int type;
     72   1.4  thorpej 	u_int window;
     73   1.4  thorpej 	struct alpha_bus_space_translation *translation; /* output */
     74   1.4  thorpej };
     75   1.4  thorpej 
     76   1.4  thorpej #define	ALPHA_BUS_TYPE_PCI_IO		0
     77   1.4  thorpej #define	ALPHA_BUS_TYPE_PCI_MEM		1
     78   1.4  thorpej #define	ALPHA_BUS_TYPE_MAX		1
     79   1.4  thorpej 
     80  1.16   dyoung struct alpha_pci_conf_readwrite_args {
     81  1.16   dyoung 	int write;
     82  1.16   dyoung 	u_int bus;
     83  1.16   dyoung 	u_int device;
     84  1.16   dyoung 	u_int function;
     85  1.16   dyoung 	u_int reg;
     86  1.16   dyoung 	u_int32_t val;
     87  1.16   dyoung };
     88  1.16   dyoung 
     89   1.4  thorpej extern	u_int alpha_bus_window_count[];
     90   1.5  thorpej extern	int (*alpha_bus_get_window)(int, int,
     91   1.5  thorpej 	    struct alpha_bus_space_translation *);
     92   1.4  thorpej extern	struct alpha_pci_chipset *alpha_pci_chipset;
     93   1.4  thorpej #else
     94  1.10   kleink #include <sys/cdefs.h>
     95  1.10   kleink 
     96  1.10   kleink __BEGIN_DECLS
     97   1.5  thorpej int	sysarch(int, void *);
     98  1.10   kleink __END_DECLS
     99   1.4  thorpej #endif /* _KERNEL */
    100   1.1      cgd 
    101   1.3     ross #endif /* !_ALPHA_SYSARCH_H_ */
    102