PDMInternal.h revision cee5f4e7e4f238fc5b3436abdf3c915275017f6e
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * PDM - Internal header file.
c7814cf6e1240a519cbec0441e033d0e2470ed00vboxsync * Copyright (C) 2006 InnoTek Systemberatung GmbH
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * available from http://www.virtualbox.org. This file is free software;
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * you can redistribute it and/or modify it under the terms of the GNU
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * General Public License as published by the Free Software Foundation,
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * If you received this file as part of a commercial VirtualBox
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * distribution, then only the terms of your commercial VirtualBox
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * license agreement apply instead of the previous paragraph.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** @defgroup grp_pdm_int Internal
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * @ingroup grp_pdm
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * @internal
63a23b6d96aca4c8545d3c3e89cc454af7ba3da6vboxsync/** Pointer to a PDM Device. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a pointer to a PDM Device. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a PDM Driver. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a pointer to a PDM Driver. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a PDM Logical Unit. */
ebe097ee2ebebb775a1e816af91b4ea67c52b0bdvboxsync/** Pointer to a pointer to a PDM Logical Unit. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a PDM PCI Bus instance. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a DMAC instance. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/** Pointer to a RTC instance. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * Private instance data.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsynctypedef struct PDMDEVINSINT
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the next instance (HC Ptr).
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * (Head is pointed to by PDM::pDevInstances.) */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the next per device instance (HC Ptr).
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * (Head is pointed to by PDMDEV::pInstances.) */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to device structure - HC Ptr. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM this instance was created for - HC Ptr. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM this instance was created for - GC Ptr. */
683371bbf37760161d1b8454ce978acf89bbb04fvboxsync /** Pointer to the list of logical units associated with the device. (FIFO) */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Configuration handle to the instance node. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** HC pointer to associated PCI device structure. */
8a179f8f39b6114b304505d4fb79a987d5e5a623vboxsync /** GC pointer to associated PCI device structure. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** HC pointer to associated PCI bus structure. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** GC pointer to associated PCI bus structure. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * Private instance data.
4bfa7b58e362a1bca0628643c352c137900bf01avboxsynctypedef struct PDMDRVINSINT
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the driver instance above.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This is NULL for the topmost drive. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the driver instance below.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This is NULL for the bottommost driver. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the logical unit this driver chained on. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to driver structure from which this was instantiated. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM this instance was created for. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Flag indicating that the driver is being detached and destroyed.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * (Helps detect potential recursive detaching.) */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Configuration handle to the instance node. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * Private critical section data.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** The critical section core which is shared with IPRT. */
97935332ee43e27b4b0448a9fab59374e4ed148avboxsync /** Pointer to the next critical section.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This chain is used for relocating pVMGC and device cleanup. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Owner identifier.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This is pDevIns if the owner is a device. Similarily for a driver or service.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * PDMR3CritSectInit() sets this to point to the critsect itself. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM - R3Ptr. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM - R0Ptr. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Pointer to the VM - GCPtr. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** R0/GC lock contention. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** R0/GC unlock contention. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** R3 lock contention. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync /** Profiling the time the section is locked. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync/* Must be included after PDMDEVINSINT is defined. */
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync# error "Invalid header PDM order. Include PDMInternal.h before VBox/pdm.h!"
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * PDM Logical Unit.
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * This typically the representation of a physical port on a
18e02d8d60d50fb098bbf009186f36bfb430a780vboxsync * device, like for instance the PS/2 keyboard port on the
typedef struct PDMLUN
const char *pszDesc;
} PDMLUN;
typedef struct PDMDEV
} PDMDEV;
typedef struct PDMDRV
} PDMDRV;
typedef struct PDMPIC
} PDMPIC;
typedef struct PDMAPIC
DECLR3CALLBACKMEMBER(void, pfnBusDeliverR3,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
DECLR0CALLBACKMEMBER(void, pfnBusDeliverR0,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
DECLGCCALLBACKMEMBER(void, pfnBusDeliverGC,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
} PDMAPIC;
typedef struct PDMIOAPIC
} PDMIOAPIC;
typedef struct PDMPCIBUS
DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
DECLR3CALLBACKMEMBER(int, pfnRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, const char *pszName, int iDev));
DECLR3CALLBACKMEMBER(int, pfnIORegionRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iRegion, uint32_t cbRegion,
DECLR3CALLBACKMEMBER(int, pfnSaveExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
DECLR3CALLBACKMEMBER(int, pfnLoadExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
DECLR0CALLBACKMEMBER(void, pfnSetIrqR0,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
DECLGCCALLBACKMEMBER(void, pfnSetIrqGC,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
} PDMPCIBUS;
#ifdef IN_RING3
typedef struct PDMDMAC
} PDMDMAC;
typedef struct PDMRTC
} PDMRTC;
typedef enum PDMMODTYPE
typedef struct PDMMOD
void *pvBits;
} PDMMOD;
typedef enum PDMQUEUETYPE
} PDMQUEUETYPE;
typedef struct PDMQUEUE
} Dev;
} Drv;
} Int;
} Ext;
struct PDMQUEUEFREEITEM
} PDMQUEUE;
typedef enum PDMDEVHLPTASKOP
typedef struct PDMDEVHLPTASK
union PDMDEVHLPTASKPARAMS
struct PDMDEVHLPTASKSETIRQ
int iIrq;
int iLevel;
} SetIRQ;
typedef struct PDM
#ifdef VBOX_WITH_PDM_LOCK
} PDM;
#ifdef IN_RING3
int pdmR3CritSectInitDevice(PVM pVM, PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, const char *pszName);
int pdmR3DevFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun);
#ifdef VBOX_WITH_PDM_LOCK