xref: /titanic_50/usr/src/uts/common/sys/agp/agptarget_io.h (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
1 /*
2  * Copyright 2005 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifdef _KERNEL
16 
17 #define	AGPTARGET_NAME		"agptarget"
18 #define	AGPTARGET_DEVLINK	"/dev/agp/agptarget"
19 
20 /* macros for layered ioctls */
21 #define	AGPTARGETIOC_BASE		'M'
22 #define	CHIP_DETECT		_IOR(AGPTARGETIOC_BASE, 30, int)
23 #define	I8XX_GET_PREALLOC_SIZE	_IOR(AGPTARGETIOC_BASE, 31, size_t)
24 #define	AGP_TARGET_GETINFO	_IOR(AGPTARGETIOC_BASE, 32, i_agp_info_t)
25 #define	AGP_TARGET_SET_GATTADDR	_IOW(AGPTARGETIOC_BASE, 33, uint32_t)
26 #define	AGP_TARGET_SETCMD	_IOW(AGPTARGETIOC_BASE, 34, uint32_t)
27 #define	AGP_TARGET_FLUSH_GTLB	_IO(AGPTARGETIOC_BASE, 35)
28 #define	AGP_TARGET_CONFIGURE	_IO(AGPTARGETIOC_BASE, 36)
29 #define	AGP_TARGET_UNCONFIG	_IO(AGPTARGETIOC_BASE, 37)
30 
31 /* Internal agp info struct */
32 typedef struct _i_agp_info {
33 	agp_version_t	iagp_ver;
34 	uint32_t	iagp_devid;	/* bridge vendor + device */
35 	uint32_t	iagp_mode;	/* mode of brdige */
36 	uint64_t	iagp_aperbase;	/* base of aperture */
37 	size_t		iagp_apersize;	/* aperture range size in bytes */
38 } i_agp_info_t;
39 
40 
41 #endif /* _KERNEL */
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif /* _SYS_AGPTARGET_IO_H */
48