VirtualBox

Changeset 36218 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Mar 9, 2011 9:32:02 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70430
Message:

PCI: interrupts work

File:
1 edited

Legend:

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

    r36153 r36218  
    158158} PCIRAWREQPCICFGREAD;
    159159
     160/** Parameters buffer for PCIRAWR0_DO_REGISTER_R0_IRQ_HANDLER call. */
     161typedef struct
     162{
     163    /* in */
     164    int32_t              iGuestIrq;
     165    RTR0PTR              pfnHandler;
     166    RTR0PTR              pfnHandlerContext;
     167    /* out */
     168    int32_t              iHostIrq;
     169} PCIRAWREQREGISTERR0IRQHANDLER;
     170
     171/** Parameters buffer for PCIRAWR0_DO_UNREGISTER_R0_IRQ_HANDLER call. */
     172typedef struct
     173{
     174    /* in */
     175    int32_t              iHostIrq;
     176} PCIRAWREQUNREGISTERR0IRQHANDLER;
     177
    160178/**
    161179 * Request buffer use for communication with the driver.
     
    187205        PCIRAWREQPCICFGWRITE   aPciCfgWrite;
    188206        PCIRAWREQPCICFGREAD    aPciCfgRead;
     207        PCIRAWREQREGISTERR0IRQHANDLER   aRegisterR0IrqHandler;
     208        PCIRAWREQUNREGISTERR0IRQHANDLER aUnregisterR0IrqHandler;
    189209    } u;
    190210} PCIRAWSENDREQ;
     
    218238    /* Perform PCI config read. */
    219239    PCIRAWR0_DO_PCICFG_READ,
     240    /* Register device IRQ R0 handler. */
     241    PCIRAWR0_DO_REGISTER_R0_IRQ_HANDLER,
     242    /* Unregister device IRQ R0 handler. */
     243    PCIRAWR0_DO_UNREGISTER_R0_IRQ_HANDLER,
    220244    /** The usual 32-bit type blow up. */
    221245    PCIRAWR0_DO_32BIT_HACK = 0x7fffffff
     
    225249typedef struct RAWPCIFACTORY *PRAWPCIFACTORY;
    226250typedef struct RAWPCIDEVPORT *PRAWPCIDEVPORT;
     251
     252/**
     253 * Interrupt service routine callback.
     254 *
     255 * @param   pvContext       Opaque user data which to the handler.
     256 * @param   iIrq            Interrupt number.
     257 */
     258typedef DECLCALLBACK(void) FNRAWPCIISR(void *pvContext, int32_t iIrq);
     259typedef FNRAWPCIISR *PFNRAWPCIISR;
    227260
    228261/**
     
    332365                                               uint32_t          Register,
    333366                                               PCIRAWMEMLOC      *pValue));
     367
     368    /**
     369     * Request to register interrupt handler.
     370     *
     371     * @param   pPort       Pointer to this structure.
     372     * @param   pfnHandler  Pointer to the handler.
     373     * @param   pIrqContext Context passed to the handler.
     374     * @param   piHostIrq   Which host IRQ is used.
     375     */
     376    DECLR0CALLBACKMEMBER(int,  pfnRegisterIrqHandler,(PRAWPCIDEVPORT pPort,
     377                                                      PFNRAWPCIISR pfnHandler,
     378                                                      void* pIrqContext,
     379                                                      int32_t *piHostIrq));
     380
     381    /**
     382     * Request to unregister interrupt handler.
     383     *
     384     * @param   pPort       Pointer to this structure.
     385     * @param   iHostIrq    Which host IRQ was used (retured by earlier pfnRegisterIrqHandler).
     386     */
     387    DECLR0CALLBACKMEMBER(int,  pfnUnregisterIrqHandler,(PRAWPCIDEVPORT pPort,
     388                                                        int32_t iHostIrq));
    334389
    335390    /** Structure version number. (RAWPCIDEVPORT_VERSION) */
Note: See TracChangeset for help on using the changeset viewer.

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