tdfx_linux.h revision 62028
11897Swollman/* 274462Salfred * Copyright (c) 2000 by Coleman Kane <cokane@FreeBSD.org> 374462Salfred * All rights reserved. 41897Swollman * 51897Swollman * Redistribution and use in source and binary forms, with or without 61897Swollman * modification, are permitted provided that the following conditions 71897Swollman * are met: 81897Swollman * 1. Redistributions of source code must retain the above copyright 91897Swollman * notice, this list of conditions and the following disclaimer. 1012798Swpaul * 2. Redistributions in binary form must reproduce the above copyright 111897Swollman * notice, this list of conditions and the following disclaimer in the 121897Swollman * documentation and/or other materials provided with the distribution. 131897Swollman * 3. All advertising materials mentioning features or use of this software 1412798Swpaul * must display the following acknowledgement: 151897Swollman * This product includes software developed by Gardner Buchanan. 161897Swollman * 4. The name of Gardner Buchanan may not be used to endorse or promote 171897Swollman * products derived from this software without specific prior written 1812798Swpaul * permission. 191897Swollman * 201897Swollman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 211897Swollman * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2212798Swpaul * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 231897Swollman * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 241897Swollman * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 251897Swollman * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2612798Swpaul * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 271897Swollman * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 281897Swollman * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 291897Swollman * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 301897Swollman * 3112798Swpaul * $FreeBSD: head/sys/dev/tdfx/tdfx_linux.h 62028 2000-06-24 06:20:55Z cokane $ 3212798Swpaul */ 3312798Swpaul 341897Swollman 3512798Swpaul#include <i386/linux/linux.h> 361897Swollman#include <i386/linux/linux_proto.h> 371897Swollman#include <i386/linux/linux_ioctl.h> 381897Swollman 391897Swollman/* 4012798Swpaul * This code was donated by Vladimir N. Silynaev to allow for defining 411897Swollman * ioctls within modules 421897Swollman */ 4312798Swpaul#define LINUX_IOCTL_SET(n,low,high) \ 441897Swollmanstatic linux_ioctl_function_t linux_ioctl_##n; \ 451897Swollmanstatic struct linux_ioctl_handler n##_handler = {linux_ioctl_##n, low, high}; \ 461897SwollmanSYSINIT(n##register, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 471897Swollmanlinux_ioctl_register_handler, &n##_handler); \ 481897SwollmanSYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,\ 491897Swollmanlinux_ioctl_unregister_handler, &n##_handler); 501897Swollman 511897Swollman/* Prototype for ioctl wrapper */ 5212798Swpaulstatic int linux_ioctl_tdfx(struct proc* p, struct linux_ioctl_args* args); 531897Swollman 5412798Swpaul/* Values for /dev/3dfx */ 5512798Swpaul/* Query IOCTLs */ 5612798Swpaul#define LINUX_IOCTL_TDFX_QUERY_BOARDS 0x3302 5717142Sjkh#define LINUX_IOCTL_TDFX_QUERY_FETCH 0x3303 5817142Sjkh#define LINUX_IOCTL_TDFX_QUERY_UPDATE 0x3304 5917142Sjkh 6017142Sjkh#define LINUX_IOCTL_TDFX_MIN 0x3300 6117142Sjkh#define LINUX_IOCTL_TDFX_MAX 0x330f 6217142Sjkh