VirtualBox

Changeset 35986 in vbox


Ignore:
Timestamp:
Feb 15, 2011 5:50:34 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70057
Message:

raw PCI: device open/close

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/rawpci.h

    r35959 r35986  
    3232RT_C_DECLS_BEGIN
    3333
     34/**
     35 * Handle for the raw PCI device.
     36 */
     37typedef RTR0PTR PCIRAWDEVHANDLE;
     38
     39
     40/** Parameters buffer for PCIRAWR0_DO_OPEN_DEVICE call */
     41typedef struct
     42{
     43    /* in */
     44    uint32_t PciAddress;
     45    uint32_t fFlags;
     46    /* out */
     47    PCIRAWDEVHANDLE Device;
     48} PCIRAWREQOPENDEVICE;
     49
     50/** Parameters buffer for PCIRAWR0_DO_CLOSE_DEVICE call */
     51typedef struct
     52{
     53    /* in */
     54    uint32_t fFlags;
     55} PCIRAWREQCLOSEDEVICE;
     56
     57
    3458/** Parameters buffer for PCIRAWR0_DO_GET_REGION_INFO call */
    3559typedef struct
     
    130154} PCIRAWREQPCICFGREAD;
    131155
    132 
    133 /**
    134  * Handle for the raw PCI device.
    135  */
    136 typedef RTR0PTR PCIRAWDEVHANDLE;
    137 
    138156/**
    139157 * Request buffer use for communication with the driver.
     
    154172    union
    155173    {
     174        PCIRAWREQOPENDEVICE    aOpenDevice;
     175        PCIRAWREQCLOSEDEVICE   aCloseDevice;
    156176        PCIRAWREQGETREGIONINFO aGetRegionInfo;
    157177        PCIRAWREQMAPREGION     aMapRegion;
     
    172192typedef enum PCIRAWR0OPERATION
    173193{
     194    /* Open device. */
     195    PCIRAWR0_DO_OPEN_DEVICE,
     196    /* Close device. */
     197    PCIRAWR0_DO_CLOSE_DEVICE,
    174198    /* Get PCI region info. */
    175199    PCIRAWR0_DO_GET_REGION_INFO,
  • trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c

    r35959 r35986  
    3939
    4040
     41#define DEVPORT_2_VBOXRAWPCIINS(pPort) \
     42    ( (PVBOXRAWPCIINS)((uint8_t *)pPort - RT_OFFSETOF(VBOXRAWPCIINS, DevPort)) )
     43
     44
    4145/**
    4246 * Implements the SUPDRV component factor interface query method.
     
    7478 * @copydoc RAWPCIDEVPORT:: pfnRetain
    7579 */
    76 DECLHIDDEN(void) vboxPciDevRetain(PRAWPCIDEVPORT pThis)
     80DECLHIDDEN(void) vboxPciDevRetain(PRAWPCIDEVPORT pPort)
    7781{
    7882}
     
    8185 * @copydoc RAWPCIDEVPORT:: pfnRelease
    8286 */
    83 DECLHIDDEN(void) vboxPciDevRelease(PRAWPCIDEVPORT pThis)
    84 {
    85 }
    86 
    87 /**
    88  * @copydoc RAWPCIDEVPORT:: pfnRelease
    89  */
    90 DECLHIDDEN(int) vboxPciDevInit(PRAWPCIDEVPORT pThis, uint32_t fFlags)
    91 {
    92     return VINF_SUCCESS;
     87DECLHIDDEN(void) vboxPciDevRelease(PRAWPCIDEVPORT pPort)
     88{
     89}
     90
     91/**
     92 * @copydoc RAWPCIDEVPORT:: pfnInit
     93 */
     94DECLHIDDEN(int) vboxPciDevInit(PRAWPCIDEVPORT pPort, uint32_t fFlags)
     95{
     96    PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort);
     97
     98    int rc = vboxPciOsDevInit(pThis, fFlags);
     99
     100    return rc;
    93101}
    94102
     
    144152}
    145153
    146 
    147154/**
    148155 * @copydoc RAWPCIFACTORY::pfnCreateAndConnect
  • trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h

    r35946 r35986  
    8888DECLHIDDEN(void) vboxPciShutdown(PVBOXRAWPCIGLOBALS pGlobals);
    8989
     90DECLHIDDEN(int)  vboxPciOsDevInit  (PVBOXRAWPCIINS pIns, uint32_t fFlags);
     91DECLHIDDEN(int)  vboxPciOsDevDeinit(PVBOXRAWPCIINS pIns, uint32_t fFlags);
     92
    9093RT_C_DECLS_END
    9194
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette