/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <vm/seg_kmem.h>
#include <sys/ddi_impldefs.h>
#include <sys/visual_io.h>
#include <sys/ddidmareq.h>
#include <sys/tnf_probe.h>
#include "gfx_private.h"
#ifdef __xpv
#include <sys/hypervisor.h>
#endif
/*
* Create a kva mapping for a pa (start..start+size) with
* the specified cache attributes (mode).
*/
{
int hat_flags;
if (size == 0)
return (0);
#ifdef __xpv
/*
* The hypervisor doesn't allow r/w mappings to some pages, such as
* page tables, gdt, etc. Detect %cr3 to notify users of this interface.
*/
return (0);
#endif
if (mode == GFXP_MEMORY_CACHED)
else if (mode == GFXP_MEMORY_WRITECOMBINED)
else /* GFXP_MEMORY_UNCACHED */
return (NULL);
#ifdef __xpv
#else
#endif
}
/*
* Destroy the mapping created by gfxp_map_kernel_space().
* Physical memory is not reclaimed.
*/
void
{
return;
}
/*
* For a VA return the pfn
*/
int
{
#ifdef __xpv
#else
#endif
return (0);
}
/*
* NOP now
*/
/* ARGSUSED */
void
{
}
int
{
int e;
/*
* Set an appropriate attribute from devacc_attr_dataorder
* to keep compatibility. The cache attributes are igonred
* if specified.
*/
} else if (accattrp->devacc_attr_dataorder ==
} else {
}
}
return (e);
}
int
{
int error = 0;
if (error)
return (error);
}
int
{
int error = 0;
if (error)
return (error);
}
{
#ifdef __xpv
#else
return ((gfx_maddr_t)paddr);
#endif
}