17c478bd9Sstevel@tonic-gate /* 2*0035d21cSmiao chen - Sun Microsystems - Beijing China * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate #ifndef _SYS_AGPTARGET_IO_H 77c478bd9Sstevel@tonic-gate #define _SYS_AGPTARGET_IO_H 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate #ifdef __cplusplus 107c478bd9Sstevel@tonic-gate extern "C" { 117c478bd9Sstevel@tonic-gate #endif 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gate #ifdef _KERNEL 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gate #define AGPTARGET_NAME "agptarget" 167c478bd9Sstevel@tonic-gate #define AGPTARGET_DEVLINK "/dev/agp/agptarget" 177c478bd9Sstevel@tonic-gate 187c478bd9Sstevel@tonic-gate /* macros for layered ioctls */ 197c478bd9Sstevel@tonic-gate #define AGPTARGETIOC_BASE 'M' 207c478bd9Sstevel@tonic-gate #define CHIP_DETECT _IOR(AGPTARGETIOC_BASE, 30, int) 217c478bd9Sstevel@tonic-gate #define I8XX_GET_PREALLOC_SIZE _IOR(AGPTARGETIOC_BASE, 31, size_t) 227c478bd9Sstevel@tonic-gate #define AGP_TARGET_GETINFO _IOR(AGPTARGETIOC_BASE, 32, i_agp_info_t) 237c478bd9Sstevel@tonic-gate #define AGP_TARGET_SET_GATTADDR _IOW(AGPTARGETIOC_BASE, 33, uint32_t) 247c478bd9Sstevel@tonic-gate #define AGP_TARGET_SETCMD _IOW(AGPTARGETIOC_BASE, 34, uint32_t) 257c478bd9Sstevel@tonic-gate #define AGP_TARGET_FLUSH_GTLB _IO(AGPTARGETIOC_BASE, 35) 267c478bd9Sstevel@tonic-gate #define AGP_TARGET_CONFIGURE _IO(AGPTARGETIOC_BASE, 36) 277c478bd9Sstevel@tonic-gate #define AGP_TARGET_UNCONFIG _IO(AGPTARGETIOC_BASE, 37) 28*0035d21cSmiao chen - Sun Microsystems - Beijing China #define INTEL_CHIPSET_FLUSH_SETUP _IO(AGPTARGETIOC_BASE, 38) 29*0035d21cSmiao chen - Sun Microsystems - Beijing China #define INTEL_CHIPSET_FLUSH _IO(AGPTARGETIOC_BASE, 39) 30*0035d21cSmiao chen - Sun Microsystems - Beijing China #define INTEL_CHIPSET_FLUSH_FREE _IO(AGPTARGETIOC_BASE, 40) 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate /* Internal agp info struct */ 337c478bd9Sstevel@tonic-gate typedef struct _i_agp_info { 347c478bd9Sstevel@tonic-gate agp_version_t iagp_ver; 357c478bd9Sstevel@tonic-gate uint32_t iagp_devid; /* bridge vendor + device */ 367c478bd9Sstevel@tonic-gate uint32_t iagp_mode; /* mode of brdige */ 377c478bd9Sstevel@tonic-gate uint64_t iagp_aperbase; /* base of aperture */ 387c478bd9Sstevel@tonic-gate size_t iagp_apersize; /* aperture range size in bytes */ 397c478bd9Sstevel@tonic-gate } i_agp_info_t; 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #ifdef __cplusplus 457c478bd9Sstevel@tonic-gate } 467c478bd9Sstevel@tonic-gate #endif 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #endif /* _SYS_AGPTARGET_IO_H */ 49