Home | History | Annotate | Line # | Download | only in include
      1  1.3     skrll /* $NetBSD: bus_user.h,v 1.3 2019/09/23 16:17:54 skrll Exp $ */
      2  1.1    dyoung /*
      3  1.1    dyoung  * XXX This file is a stopgap intended to keep NetBSD/alpha buildable
      4  1.1    dyoung  * XXX while developers figure out whether/how to expose to userland
      5  1.1    dyoung  * XXX the bus_space(9) and pci(9) facilities used by libalpha (which
      6  1.1    dyoung  * XXX is used by X11).
      7  1.1    dyoung  * XXX
      8  1.1    dyoung  * XXX Do NOT add new definitions to this file.
      9  1.1    dyoung  */
     10  1.1    dyoung #ifndef _ALPHA_BUS_USER_H_
     11  1.1    dyoung #define _ALPHA_BUS_USER_H_
     12  1.1    dyoung 
     13  1.1    dyoung #include <sys/types.h>
     14  1.1    dyoung 
     15  1.1    dyoung /*
     16  1.1    dyoung  * Addresses (in bus space).
     17  1.1    dyoung  */
     18  1.1    dyoung typedef u_long bus_addr_t;
     19  1.1    dyoung typedef u_long bus_size_t;
     20  1.1    dyoung 
     21  1.3     skrll #define PRIxBUSADDR	"lx"
     22  1.3     skrll #define PRIxBUSSIZE	"lx"
     23  1.3     skrll #define PRIuBUSSIZE	"lu"
     24  1.3     skrll 
     25  1.1    dyoung /*
     26  1.1    dyoung  * Translation of an Alpha bus address; INTERNAL USE ONLY.
     27  1.1    dyoung  */
     28  1.1    dyoung struct alpha_bus_space_translation {
     29  1.1    dyoung 	bus_addr_t	abst_bus_start;	/* start of bus window */
     30  1.1    dyoung 	bus_addr_t	abst_bus_end;	/* end of bus window */
     31  1.2  christos 	__paddr_t	abst_sys_start;	/* start of sysBus window */
     32  1.2  christos 	__paddr_t	abst_sys_end;	/* end of sysBus window */
     33  1.1    dyoung 	int		abst_addr_shift;/* address shift */
     34  1.1    dyoung 	int		abst_size_shift;/* size shift */
     35  1.1    dyoung 	int		abst_flags;	/* flags; see below */
     36  1.1    dyoung };
     37  1.1    dyoung 
     38  1.1    dyoung #define	ABST_BWX		0x01	/* use BWX to access the bus */
     39  1.1    dyoung #define	ABST_DENSE		0x02	/* space is dense */
     40  1.1    dyoung 
     41  1.1    dyoung #define	BUS_SPACE_MAP_LINEAR		0x02
     42  1.1    dyoung #define	BUS_SPACE_MAP_PREFETCHABLE     	0x04
     43  1.1    dyoung 
     44  1.1    dyoung #endif /* _ALPHA_BUS_USER_H_ */
     45