VBoxPciInternal.h revision 464697bd4c58e78f3b3eecc1d51904482bae27f8
/* $Id$ */
/** @file
* VBoxPci - PCI driver (Host), Internal Header.
*/
/*
* Copyright (C) 2011 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.
*/
#ifndef ___VBoPciInternal_h___
#define ___VBoxPciInternal_h___
#include <iprt/semaphore.h>
/* Forward declaration. */
typedef struct VBOXRAWPCIGLOBALS *PVBOXRAWPCIGLOBALS;
typedef struct VBOXRAWPCIINS *PVBOXRAWPCIINS;
/**
* The per-instance data of the VBox raw PCI interface.
*
* This is data associated with a host PCI card which
* the filter driver has been or may be attached to. When possible it is
* attached dynamically, but this may not be possible on all OSes so we have
* to be flexible about things.
*
*/
typedef struct VBOXRAWPCIINS
{
/** Pointer to the globals. */
/** The spinlock protecting the state variables and host interface handle. */
/** Pointer to the next device in the list. */
/** Reference count. */
/* Host PCI address of this device. */
#ifdef RT_OS_LINUX
#endif
/** The session this interface is associated with. */
/** The SUPR0 object id. */
void *pvObj;
/** Port, given to the outside world. */
/**
* The global data of the VBox PCI driver.
*
* This contains the bit required for communicating with support driver, VBoxDrv
* (start out as SupDrv).
*/
typedef struct VBOXRAWPCIGLOBALS
{
/** Mutex protecting the list of instances and state changes. */
/** Pointer to a list of instance data. */
/** The raw PCI interface factory. */
/** The SUPDRV component factory registration. */
/** The number of current factory references. */
int32_t volatile cFactoryRefs;
/** Whether the IDC connection is open or not.
* This is only for cleaning up correctly after the separate IDC init on Windows. */
bool fIDCOpen;
/** The SUPDRV IDC handle (opaque struct). */
#ifdef RT_OS_LINUX
struct module * pciStubModule;
#endif
bool *pfPresent,
DECLHIDDEN(int) vboxPciOsDevPciCfgWrite(PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue);
DECLHIDDEN(int) vboxPciOsDevPciCfgRead (PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue);
#endif