agptarget.c revision 31c83a1b44505db718ee9088db1ce16bd9205d86
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * CDDL HEADER START
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * The contents of this file are subject to the terms of the
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Common Development and Distribution License (the "License").
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * You may not use this file except in compliance with the License.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * See the License for the specific language governing permissions
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * and limitations under the License.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * When distributing Covered Code, include this CDDL HEADER in each
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * If applicable, add the following below this CDDL HEADER, with the
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * fields enclosed by brackets "[]" replaced with your own identifying
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * information: Portions Copyright [yyyy] [name of copyright owner]
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * CDDL HEADER END
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Use is subject to license terms.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#pragma ident "%Z%%M% %I% %E% SMI"
int agptarget_debug_var = 0;
typedef struct agp_target_softstate {
typedef struct gms_mode {
} gms_mode_t;
static void *agptarget_glob_soft_handle;
static off_t
if (!value)
while (nextcap) {
return (nextcap);
static uint64_t
return (aper_base);
static size_t
case AGP_APER_4M:
case AGP_APER_8M:
case AGP_APER_16M:
case AGP_APER_32M:
case AGP_APER_64M:
case AGP_APER_128M:
case AGP_APER_256M:
case AGP_APER_512M:
case AGP_APER_1024M:
case AGP_APER_2048M:
case AGP_APER_4G:
regsize));
return (size);
#define GMS_SIZE(a) (sizeof (a) / sizeof (int))
int num_modes;
for (i = 0; i < num_modes; i++) {
static size_t
int gms_off;
kbytes = 0;
goto done;
done:
kbytes));
return (kbytes);
switch (cmd) {
case DDI_INFO_DEVT2DEVINFO:
case DDI_INFO_DEVT2INSTANCE:
return (rval);
int gms_off;
return (DDI_SUCCESS);
int gms_off;
return (DDI_SUCCESS);
int instance;
int status;
switch (cmd) {
case DDI_ATTACH:
case DDI_RESUME:
return (DDI_FAILURE);
return (DDI_FAILURE);
instance);
return (DDI_FAILURE);
instance);
return (DDI_FAILURE);
instance);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int instance;
return (DDI_FAILURE);
return (DDI_SUCCESS);
static char kernel_only[] =
return (ENXIO);
return (ENXIO);
switch (cmd) {
case CHIP_DETECT:
int type = 0;
type = 0;
return (EFAULT);
case I8XX_GET_PREALLOC_SIZE:
return (EINVAL);
return (EFAULT);
case AGP_TARGET_GETINFO:
return (EFAULT);
case AGP_TARGET_SET_GATTADDR:
return (EFAULT);
case AGP_TARGET_SETCMD:
return (EFAULT);
command);
case AGP_TARGET_FLUSH_GTLB:
case AGP_TARGET_CONFIGURE:
case AGP_TARGET_UNCONFIG:
value1);
return (ENXIO);
return (ENXIO);
return (ENXIO);
return (ENXIO);
_init(void)
int ret;
if (ret)
goto err1;
goto err2;
return (DDI_SUCCESS);
err2:
err1:
return (ret);
_fini(void)
int ret;
return (ret);