PDMInternal.h revision 7521bd76d764c3c9534c162e2a37fefb446f2071
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * PDM - Internal header file.
2a2b173b54c259e34320ce0acf26f18e9382ce2avboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * available from http://www.virtualbox.org. This file is free software;
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * you can redistribute it and/or modify it under the terms of the GNU
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * General Public License (GPL) as published by the Free Software
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync * additional information or have any questions.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync/** @defgroup grp_pdm_int Internal
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * @ingroup grp_pdm
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * @internal
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync/*******************************************************************************
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync* Structures and Typedefs *
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync*******************************************************************************/
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync/** Pointer to a PDM Device. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync/** Pointer to a pointer to a PDM Device. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync/** Pointer to a PDM USB Device. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync/** Pointer to a pointer to a PDM USB Device. */
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync/** Pointer to a PDM Driver. */
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync/** Pointer to a pointer to a PDM Driver. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync/** Pointer to a PDM Logical Unit. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync/** Pointer to a pointer to a PDM Logical Unit. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync/** Pointer to a PDM PCI Bus instance. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync/** Pointer to a DMAC instance. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync/** Pointer to a RTC instance. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync/** Pointer to an USB HUB registration record. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync * Private device instance data.
044af0d1e6474076366759db86f101778c5f20ccvboxsynctypedef struct PDMDEVINSINT
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to the next instance (HC Ptr).
044af0d1e6474076366759db86f101778c5f20ccvboxsync * (Head is pointed to by PDM::pDevInstances.) */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to the next per device instance (HC Ptr).
044af0d1e6474076366759db86f101778c5f20ccvboxsync * (Head is pointed to by PDMDEV::pInstances.) */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to device structure - HC Ptr. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to the VM this instance was created for - HC Ptr. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to the list of logical units associated with the device. (FIFO) */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Configuration handle to the instance node. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** HC pointer to associated PCI device structure. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** HC pointer to associated PCI bus structure. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** GC pointer to associated PCI device structure. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the VM this instance was created for - GC Ptr. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** GC pointer to associated PCI bus structure. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Alignment padding. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync * Private USB device instance data.
044af0d1e6474076366759db86f101778c5f20ccvboxsynctypedef struct PDMUSBINSINT
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** The UUID of this instance. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Pointer to the next instance.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * (Head is pointed to by PDM::pUsbInstances.) */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the next per USB device instance.
044af0d1e6474076366759db86f101778c5f20ccvboxsync * (Head is pointed to by PDMUSB::pInstances.) */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to device structure. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the VM this instance was created for. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the list of logical units associated with the device. (FIFO) */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** The per instance device configuration. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Same as pCfg if the configuration should be deleted when detaching the device. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** The global device configuration. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Pointer to the USB hub this device is attached to.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync * This is NULL if the device isn't connected to any HUB. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** The port number that we're connected to. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync * Private driver instance data.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctypedef struct PDMDRVINSINT
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Pointer to the driver instance above.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync * This is NULL for the topmost drive. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Pointer to the driver instance below.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * This is NULL for the bottommost driver. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the logical unit this driver chained on. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to driver structure from which this was instantiated. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the VM this instance was created for. */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Flag indicating that the driver is being detached and destroyed.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync * (Helps detect potential recursive detaching.) */
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync /** Configuration handle to the instance node. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync * Private critical section data.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** The critical section core which is shared with IPRT. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Pointer to the next critical section.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync * This chain is used for relocating pVMGC and device cleanup. */
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** Owner identifier.
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync * This is pDevIns if the owner is a device. Similarily for a driver or service.
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync * PDMR3CritSectInit() sets this to point to the critsect itself. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** Pointer to the VM - R3Ptr. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** Pointer to the VM - R0Ptr. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** Pointer to the VM - GCPtr. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** Event semaphore that is scheduled to be signaled upon leaving the
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync * critical section. This is Ring-3 only of course. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** R0/GC lock contention. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** R0/GC unlock contention. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** R3 lock contention. */
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync /** Profiling the time the section is locked. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef enum
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The usual invalid entry. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Device type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** USB Device type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Driver type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Internal type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** External type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The usual 32-bit hack. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * The internal structure for the thread.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMTHREADINT
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The VM pointer. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The event semaphore the thread blocks on. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the next thread. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The thread type. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync/* Must be included after PDMDEVINSINT is defined. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync# error "Invalid header PDM order. Include PDMInternal.h before VBox/pdm.h!"
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM Logical Unit.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * This typically the representation of a physical port on a
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * device, like for instance the PS/2 keyboard port on the
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * keyboard controller device. The LUNs are chained on the
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * device the belong to (PDMDEVINSINT::pLunsHC).
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMLUN
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** The LUN - The Logical Unit Number. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the next LUN. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the top driver in the driver chain. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the bottom driver in the driver chain. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the device instance which the LUN belongs to.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * Either this is set or pUsbIns is set. Both is never set at the same time. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the USB device instance which the LUN belongs to. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the device base interface. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Description of this LUN. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync const char *pszDesc;
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM Device.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMDEV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the next device (HC Ptr). */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Device name length. (search optimization) */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Registration structure. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Number of instances. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to chain of instances (HC Ptr). */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM USB Device.
0109a2240391a89f6556b1545e6cc57f9efab060vboxsynctypedef struct PDMUSB
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the next device (R3 Ptr). */
0109a2240391a89f6556b1545e6cc57f9efab060vboxsync /** Device name length. (search optimization) */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Registration structure. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Next instance number. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to chain of instances (R3 Ptr). */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM Driver.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMDRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the next device. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Registration structure. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Number of instances. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM registered PIC device.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMPIC
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the PIC device instance - HC. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnSetIrqHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnGetInterruptHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the PIC device instance - R0. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnSetIrqHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR0CALLBACKMEMBER(void, pfnSetIrqR0,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnGetInterruptHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR0CALLBACKMEMBER(int, pfnGetInterruptR0,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the PIC device instance - GC. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnSetIrqHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLGCCALLBACKMEMBER(void, pfnSetIrqGC,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMPICREG::pfnGetInterruptHC */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLGCCALLBACKMEMBER(int, pfnGetInterruptGC,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Alignment padding. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync * PDM registered APIC device.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMAPIC
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the APIC device instance - R3 Ptr. */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnGetInterruptR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(bool, pfnHasPendingIrqR3,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnSetBaseR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(void, pfnSetBaseR3,(PPDMDEVINS pDevIns, uint64_t u64Base));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnGetBaseR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(uint64_t, pfnGetBaseR3,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnSetTPRR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(void, pfnSetTPRR3,(PPDMDEVINS pDevIns, uint8_t u8TPR));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnGetTPRR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(uint8_t, pfnGetTPRR3,(PPDMDEVINS pDevIns));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync DECLR3CALLBACKMEMBER(void, pfnBusDeliverR3,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync /** Pointer to the APIC device instance - R0. */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnGetInterruptR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(int, pfnGetInterruptR0,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(bool, pfnHasPendingIrqR0,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnSetBaseR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(void, pfnSetBaseR0,(PPDMDEVINS pDevIns, uint64_t u64Base));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnGetBaseR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(uint64_t, pfnGetBaseR0,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnSetTPRR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(void, pfnSetTPRR0,(PPDMDEVINS pDevIns, uint8_t u8TPR));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnGetTPRR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(uint8_t, pfnGetTPRR0,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLR0CALLBACKMEMBER(void, pfnBusDeliverR0,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** Pointer to the APIC device instance - RC Ptr. */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnGetInterruptR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLRCCALLBACKMEMBER(int, pfnGetInterruptRC,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnHasPendingIrqR3 */
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync DECLRCCALLBACKMEMBER(bool, pfnHasPendingIrqRC,(PPDMDEVINS pDevIns));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync /** @copydoc PDMAPICREG::pfnSetBaseR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLRCCALLBACKMEMBER(void, pfnSetBaseRC,(PPDMDEVINS pDevIns, uint64_t u64Base));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMAPICREG::pfnGetBaseR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLRCCALLBACKMEMBER(uint64_t, pfnGetBaseRC,(PPDMDEVINS pDevIns));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMAPICREG::pfnSetTPRR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLRCCALLBACKMEMBER(void, pfnSetTPRRC,(PPDMDEVINS pDevIns, uint8_t u8TPR));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMAPICREG::pfnGetTPRR3 */
9af7167fa39f1f139899c989da973e59b9cccc3fvboxsync DECLRCCALLBACKMEMBER(uint8_t, pfnGetTPRRC,(PPDMDEVINS pDevIns));
9af7167fa39f1f139899c989da973e59b9cccc3fvboxsync /** @copydoc PDMAPICREG::pfnBusDeliverR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLRCCALLBACKMEMBER(void, pfnBusDeliverRC,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync * PDM registered I/O APIC device.
daa94352f51be2329ac8660f70396e03a7cb983bvboxsynctypedef struct PDMIOAPIC
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** Pointer to the APIC device instance - R3 Ptr. */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMIOAPICREG::pfnSetIrqR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** Pointer to the PIC device instance - R0. */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMIOAPICREG::pfnSetIrqR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLR0CALLBACKMEMBER(void, pfnSetIrqR0,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** Pointer to the APIC device instance - GC Ptr. */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync /** @copydoc PDMIOAPICREG::pfnSetIrqR3 */
daa94352f51be2329ac8660f70396e03a7cb983bvboxsync DECLGCCALLBACKMEMBER(void, pfnSetIrqRC,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
d6f8b76ab3b2ec0c270c96f9db6e2568fc41b5fevboxsync * PDM PCI Bus instance.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsynctypedef struct PDMPCIBUS
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync /** PCI bus number. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to PCI Bus device instance. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnSetIrqHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnRegisterHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(int, pfnRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, const char *pszName, int iDev));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnIORegionRegisterHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(int, pfnIORegionRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iRegion, uint32_t cbRegion,
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnSetConfigCallbacksHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(void, pfnSetConfigCallbacksR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead,
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync PPFNPCICONFIGREAD ppfnReadOld, PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnSaveExecHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(int, pfnSaveExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnLoadExecHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(int, pfnLoadExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnFakePCIBIOSHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR3CALLBACKMEMBER(int, pfnFakePCIBIOSR3,(PPDMDEVINS pDevIns));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the PIC device instance - R0. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnSetIrqHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLR0CALLBACKMEMBER(void, pfnSetIrqR0,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to PCI Bus device instance. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** @copydoc PDMPCIBUSREG::pfnSetIrqHC */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync DECLGCCALLBACKMEMBER(void, pfnSetIrqGC,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * PDM registered DMAC (DMA Controller) device.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsynctypedef struct PDMDMAC
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the DMAC device instance. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Copy of the registration structure. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync * PDM registered RTC (Real Time Clock) device.
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsynctypedef struct PDMRTC
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Pointer to the RTC device instance. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Copy of the registration structure. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync#endif /* IN_RING3 */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Module type.
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Guest context module. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Ring-0 (host) context module. */
31771163041e3661403a806eb3382d2a165c003bvboxsync /** Ring-3 (host) context module. */
31771163041e3661403a806eb3382d2a165c003bvboxsync/** The module name length including the terminator. */
31771163041e3661403a806eb3382d2a165c003bvboxsync * Loaded module instance.
31771163041e3661403a806eb3382d2a165c003bvboxsynctypedef struct PDMMOD
31771163041e3661403a806eb3382d2a165c003bvboxsync /** Module name. This is used for refering to
31771163041e3661403a806eb3382d2a165c003bvboxsync * the module internally, sort of like a handle. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Module type. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Loader module handle. Not used for R0 modules. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Loaded address.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * This is the 'handle' for R0 modules. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Old loaded address.
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync * This is used during relocation of GC modules. Not used for R0 modules. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Where the R3 HC bits are stored.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * This can be equal to ImageBase but doesn't have to. Not used for R0 modules. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to next module. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Module filename. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync/** Pointer to loaded module instance. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync/** Extra space in the free array. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Queue type.
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Device consumer. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Driver consumer. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Internal consumer. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** External consumer. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync/** Pointer to a PDM Queue. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync * PDM Queue.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsynctypedef struct PDMQUEUE
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Pointer to the next queue in the list. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Type specific data. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** PDMQUEUETYPE_DEV */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Pointer to consumer function. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the device instance owning the queue. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PDMQUEUETYPE_DRV */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to consumer function. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the driver instance owning the queue. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PDMQUEUETYPE_INTERNAL */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to consumer function. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PDMQUEUETYPE_EXTERNAL */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to consumer function. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to user argument. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Queue type. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The interval between checking the queue for events.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * The realtime timer below is used to do the waiting.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * If 0, the queue will use the VM_FF_PDM_QUEUE forced action. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Interval timer. Only used if cMilliesInterval is non-zero. */
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsync /** Pointer to the VM. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** LIFO of pending items - HC. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync R3R0PTRTYPE(PPDMQUEUEITEMCORE) volatile pPendingHC;
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the GC VM and indicator for GC enabled queue.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * If this is NULL, the queue cannot be used in GC.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** LIFO of pending items - GC. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Item size (bytes). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Number of items in the queue. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Index to the free head (where we insert). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Index to the free tail (where we remove). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Array of pointers to free items. Variable size. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the free item - HC Ptr. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the free item - GC Ptr. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Queue device helper task operation.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The usual invalid 0 entry. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** ISASetIrq */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PCISetIrq */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PCISetIrq */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The usual 32-bit hack. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Queued Device Helper Task.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The queue item core (don't touch). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the device instance (HC Ptr). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** This operation to perform. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Parameters to the operation. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * PDMDEVHLPTASKOP_ISA_SET_IRQ and PDMDEVHLPTASKOP_PCI_SET_IRQ.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The IRQ */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The new level. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync/** Pointer to a queued Device Helper Task. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync/** Pointer to a const queued Device Helper Task. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync * An USB hub registration record.
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsynctypedef struct PDMUSBHUB
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** The USB versions this hub support.
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync * Note that 1.1 hubs can take on 2.0 devices. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** The number of ports on the hub. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** The number of available ports (0..cPorts). */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** The driver instance of the hub. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** Copy of the to the registration structure. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync /** Pointer to the next hub in the list. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync/** Pointer to a const USB HUB registration record. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync/** Pointer to a PDM Async I/O template. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsynctypedef struct PDMASYNCCOMPLETIONTEMPLATE *PPDMASYNCCOMPLETIONTEMPLATE;
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsync/** Pointer to the main PDM Async completion structure. */
9b19ad593b379ebfcc8273f85b90763b14b1da63vboxsynctypedef struct PDMASYNCCOMPLETIONMANAGER *PPDMASYNCCOMPLETIONMANAGER;
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Converts a PDM pointer into a VM pointer.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * @returns Pointer to the VM structure the PDM is part of.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * @param pPDM Pointer to PDM instance data.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync#define PDM2VM(pPDM) ( (PVM)((char*)pPDM - pPDM->offVM) )
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * PDM VM Instance data.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Changes to this must checked against the padding of the cfgm union in VM!
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsynctypedef struct PDM
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Offset to the VM structure.
044af0d1e6474076366759db86f101778c5f20ccvboxsync * See PDM2VM(). */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** List of registered devices. (FIFO) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** List of devices instances. (FIFO) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** List of registered USB devices. (FIFO) */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync /** List of USB devices instances. (FIFO) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** List of registered drivers. (FIFO) */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync /** List of initialized critical sections. (LIFO) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** PCI Buses. */
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync /** The register PIC device. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync /** The registerd APIC device. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The registerd I/O APIC device. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The registered DMAC device. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The registered RTC device. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** The registered USB HUBs. (FIFO) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Queue in which devhlp tasks are queued for R3 execution - HC Ptr. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync /** Queue in which devhlp tasks are queued for R3 execution - GC Ptr. */
a1df400bbe9d64aad400442e56eb637019300a5evboxsync /** The number of entries in the apQueuedCritSectsLeaves table that's currnetly in use. */
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync /** Critical sections queued in GC/R0 because of contention preventing leave to complete. (R3 Ptrs)
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * We will return to Ring-3 ASAP, so this queue doesn't has to be very long. */
2d8870843ff566fee9bd3a6a5942414254106479vboxsync R3PTRTYPE(PPDMCRITSECT) apQueuedCritSectsLeaves[8];
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Linked list of timer driven PDM queues. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Linked list of force action driven PDM queues. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the queue which should be manually flushed - HCPtr.
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync * Only touched by EMT. */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Pointer to the queue which should be manually flushed - GCPtr. */
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync /** Head of the PDM Thread list. (singly linked) */
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync /** Tail of the PDM Thread list. (singly linked) */
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync /** Head of the asychronous tasks managers. (singly linked) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync R3PTRTYPE(PPDMASYNCCOMPLETIONMANAGER) pAsyncCompletionManagerHead;
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** Head of the templates. (singly linked) */
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync R3PTRTYPE(PPDMASYNCCOMPLETIONTEMPLATE) pAsyncCompletionTemplates;
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync /** TEMPORARY HACKS FOR NETWORK POLLING.
9d020a0622f95aec3aabaff436a495e88dbbd71avboxsync * @todo fix NAT and kill this!
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** The PDM lock.
044af0d1e6474076366759db86f101778c5f20ccvboxsync * This is used to protect everything that deals with interrupts, i.e.
044af0d1e6474076366759db86f101778c5f20ccvboxsync * the PIC, APIC, IOAPIC and PCI devices pluss some PDM functions. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync /** Number of times a critical section leave requesed needed to be queued for ring-3 execution. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync/** Pointer to PDM VM instance data. */
044af0d1e6474076366759db86f101778c5f20ccvboxsync * PDM data kept in the UVM.
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsynctypedef struct PDMUSERPERVM
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync /** Pointer to list of loaded modules. */
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync /** @todo move more stuff over here. */
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync/** Pointer to the PDM data kept in the UVM. */
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync/*******************************************************************************
682342827b0e80c493c820603508e79e76c42658vboxsync* Global Variables *
5eda82e218d35ae0691febd531e1bfc0324cc4a6vboxsync*******************************************************************************/
682342827b0e80c493c820603508e79e76c42658vboxsync/*******************************************************************************
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync* Internal Functions *
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsync*******************************************************************************/
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsyncint pdmR3CritSectInitDevice(PVM pVM, PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, const char *pszName);
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsyncint pdmR3CritSectDeleteDevice(PVM pVM, PPDMDEVINS pDevIns);
4a1654dd5b9f0ae4e149d909843a3ab07b8bec33vboxsyncPPDMDEV pdmR3DevLookup(PVM pVM, const char *pszName);
682342827b0e80c493c820603508e79e76c42658vboxsyncint pdmR3DevFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun);
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncPPDMUSB pdmR3UsbLookup(PVM pVM, const char *pszName);
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncint pdmR3UsbFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun);
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncint pdmR3UsbRegisterHub(PVM pVM, PPDMDRVINS pDrvIns, uint32_t fVersions, uint32_t cPorts, PCPDMUSBHUBREG pUsbHubReg, PPCPDMUSBHUBHLP ppUsbHubHlp);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncPPDMDRV pdmR3DrvLookup(PVM pVM, const char *pszName);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncchar * pdmR3FileR3(const char *pszFile, bool fShared = false);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3LoadR3U(PUVM pUVM, const char *pszFilename, const char *pszName);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncvoid pdmR3QueueRelocate(PVM pVM, RTGCINTPTR offDelta);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3ThreadCreateDevice(PVM pVM, PPDMDEVINS pDevIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDEV pfnThread,
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsync PFNPDMTHREADWAKEUPDEV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3ThreadCreateUsb(PVM pVM, PPDMDRVINS pUsbIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADUSB pfnThread,
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsync PFNPDMTHREADWAKEUPUSB pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3ThreadCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDRV pfnThread,
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsync PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3ThreadDestroyDevice(PVM pVM, PPDMDEVINS pDevIns);
c0e27f622f9bd6d9e77d2d959aab71d69dabf0d3vboxsyncint pdmR3ThreadDestroyUsb(PVM pVM, PPDMUSBINS pUsbIns);
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncint pdmR3ThreadDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns);
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#endif /* IN_RING3 */