xref: /titanic_41/usr/src/uts/common/sys/agp/agptarget_io.h (revision a31148363f598def767ac48c5d82e1572e44b935)
1 /*
2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef	_SYS_AGPTARGET_IO_H
7 #define	_SYS_AGPTARGET_IO_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #ifdef _KERNEL
14 
15 #define	AGPTARGET_NAME		"agptarget"
16 #define	AGPTARGET_DEVLINK	"/dev/agp/agptarget"
17 
18 /* macros for layered ioctls */
19 #define	AGPTARGETIOC_BASE		'M'
20 #define	CHIP_DETECT		_IOR(AGPTARGETIOC_BASE, 30, int)
21 #define	I8XX_GET_PREALLOC_SIZE	_IOR(AGPTARGETIOC_BASE, 31, size_t)
22 #define	AGP_TARGET_GETINFO	_IOR(AGPTARGETIOC_BASE, 32, i_agp_info_t)
23 #define	AGP_TARGET_SET_GATTADDR	_IOW(AGPTARGETIOC_BASE, 33, uint32_t)
24 #define	AGP_TARGET_SETCMD	_IOW(AGPTARGETIOC_BASE, 34, uint32_t)
25 #define	AGP_TARGET_FLUSH_GTLB	_IO(AGPTARGETIOC_BASE, 35)
26 #define	AGP_TARGET_CONFIGURE	_IO(AGPTARGETIOC_BASE, 36)
27 #define	AGP_TARGET_UNCONFIG	_IO(AGPTARGETIOC_BASE, 37)
28 #define	INTEL_CHIPSET_FLUSH_SETUP	_IO(AGPTARGETIOC_BASE, 38)
29 #define	INTEL_CHIPSET_FLUSH	_IO(AGPTARGETIOC_BASE, 39)
30 #define	INTEL_CHIPSET_FLUSH_FREE	_IO(AGPTARGETIOC_BASE, 40)
31 
32 /* Internal agp info struct */
33 typedef struct _i_agp_info {
34 	agp_version_t	iagp_ver;
35 	uint32_t	iagp_devid;	/* bridge vendor + device */
36 	uint32_t	iagp_mode;	/* mode of brdige */
37 	uint64_t	iagp_aperbase;	/* base of aperture */
38 	size_t		iagp_apersize;	/* aperture range size in bytes */
39 } i_agp_info_t;
40 
41 
42 #endif /* _KERNEL */
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* _SYS_AGPTARGET_IO_H */
49