memobj-r0drv-solaris.h revision 501d4d0a7c979868ed43c39663aef7ece5fd6a50
/* $Id$ */
/** @file
* IPRT - Ring-0 Memory Objects - Segment driver, Solaris.
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "the-solaris-kernel.h"
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
typedef struct SEGVBOX_CRARGS
{
typedef SEGVBOX_CRARGS *PSEGVBOX_CRARGS;
typedef struct SEGVBOX_DATA
{
} SEGVBOX_DATA;
typedef SEGVBOX_DATA *PSEGVBOX_DATA;
static struct seg_ops s_SegVBoxOps;
static vnode_t s_segVBoxVnode;
{
/*
* Now load the locked mappings to the pages.
*/
{
}
return 0;
}
{
/*
* Duplicate a segment and return the new segment in 'pDstSeg'.
*/
return 0;
}
{
/** @todo make these into release assertions. */
{
panic("rtRt0SegVBoxSolUnmap");
}
return ENOTSUP;
return 0;
}
{
}
static int rtR0SegVBoxSolFault(struct hat *pHat, seg_t *pSeg, caddr_t virtAddr, size_t cb, enum fault_type FaultType,
{
/*
* We would demand fault if the (u)read() path would SEGOP_FAULT() on buffers mapped in via our
* segment driver i.e. prefaults before DMA. Don't fail in such case where we're called directly,
* see #5047.
*/
return 0;
}
{
return 0;
}
{
return EACCES;
}
{
return EINVAL;
}
{
return -1;
}
{
return 0;
}
{
*pVec++ = 1;
return cbLen;
}
static int rtR0SegVBoxSolLockOp(seg_t *pSeg, caddr_t virtAddr, size_t cb, int Attr, int Op, ulong_t *pLockMap, size_t off)
{
return 0;
}
{
if (iPage)
{
do
{
iPage--;
} while (iPage);
}
return 0;
}
{
}
{
return MAP_SHARED;
}
{
*ppVnode = &s_segVBoxVnode;
return 0;
}
{
return 0;
}
{
/* Nothing to do. */
}
static int rtR0SegVBoxSolPageLock(seg_t *pSeg, caddr_t virtAddr, size_t cb, page_t ***pppPage, enum lock_type LockType, enum seg_rw ReadWrite)
{
return ENOTSUP;
}
{
return ENOTSUP;
}
{
return ENODEV;
}
{
return NULL;
}
{
return 0;
}
static struct seg_ops s_SegVBoxOps =
{
NULL, /* swapout */
};
#endif /* !___r0drv_solaris_memobj_r0drv_solaris_h */