xref: /onnv-gate/usr/src/uts/common/sys/agp/agptarget_io.h (revision 11260:eb8c6f2097e8)
10Sstevel@tonic-gate /*
2*11260SMiao.Chen@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
30Sstevel@tonic-gate  * Use is subject to license terms.
40Sstevel@tonic-gate  */
50Sstevel@tonic-gate 
60Sstevel@tonic-gate #ifndef	_SYS_AGPTARGET_IO_H
70Sstevel@tonic-gate #define	_SYS_AGPTARGET_IO_H
80Sstevel@tonic-gate 
90Sstevel@tonic-gate #ifdef __cplusplus
100Sstevel@tonic-gate extern "C" {
110Sstevel@tonic-gate #endif
120Sstevel@tonic-gate 
130Sstevel@tonic-gate #ifdef _KERNEL
140Sstevel@tonic-gate 
150Sstevel@tonic-gate #define	AGPTARGET_NAME		"agptarget"
160Sstevel@tonic-gate #define	AGPTARGET_DEVLINK	"/dev/agp/agptarget"
170Sstevel@tonic-gate 
180Sstevel@tonic-gate /* macros for layered ioctls */
190Sstevel@tonic-gate #define	AGPTARGETIOC_BASE		'M'
200Sstevel@tonic-gate #define	CHIP_DETECT		_IOR(AGPTARGETIOC_BASE, 30, int)
210Sstevel@tonic-gate #define	I8XX_GET_PREALLOC_SIZE	_IOR(AGPTARGETIOC_BASE, 31, size_t)
220Sstevel@tonic-gate #define	AGP_TARGET_GETINFO	_IOR(AGPTARGETIOC_BASE, 32, i_agp_info_t)
230Sstevel@tonic-gate #define	AGP_TARGET_SET_GATTADDR	_IOW(AGPTARGETIOC_BASE, 33, uint32_t)
240Sstevel@tonic-gate #define	AGP_TARGET_SETCMD	_IOW(AGPTARGETIOC_BASE, 34, uint32_t)
250Sstevel@tonic-gate #define	AGP_TARGET_FLUSH_GTLB	_IO(AGPTARGETIOC_BASE, 35)
260Sstevel@tonic-gate #define	AGP_TARGET_CONFIGURE	_IO(AGPTARGETIOC_BASE, 36)
270Sstevel@tonic-gate #define	AGP_TARGET_UNCONFIG	_IO(AGPTARGETIOC_BASE, 37)
28*11260SMiao.Chen@Sun.COM #define	INTEL_CHIPSET_FLUSH_SETUP	_IO(AGPTARGETIOC_BASE, 38)
29*11260SMiao.Chen@Sun.COM #define	INTEL_CHIPSET_FLUSH	_IO(AGPTARGETIOC_BASE, 39)
30*11260SMiao.Chen@Sun.COM #define	INTEL_CHIPSET_FLUSH_FREE	_IO(AGPTARGETIOC_BASE, 40)
310Sstevel@tonic-gate 
320Sstevel@tonic-gate /* Internal agp info struct */
330Sstevel@tonic-gate typedef struct _i_agp_info {
340Sstevel@tonic-gate 	agp_version_t	iagp_ver;
350Sstevel@tonic-gate 	uint32_t	iagp_devid;	/* bridge vendor + device */
360Sstevel@tonic-gate 	uint32_t	iagp_mode;	/* mode of brdige */
370Sstevel@tonic-gate 	uint64_t	iagp_aperbase;	/* base of aperture */
380Sstevel@tonic-gate 	size_t		iagp_apersize;	/* aperture range size in bytes */
390Sstevel@tonic-gate } i_agp_info_t;
400Sstevel@tonic-gate 
410Sstevel@tonic-gate 
420Sstevel@tonic-gate #endif /* _KERNEL */
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #ifdef __cplusplus
450Sstevel@tonic-gate }
460Sstevel@tonic-gate #endif
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #endif /* _SYS_AGPTARGET_IO_H */
49