Changeset 36218 in vbox
- Timestamp:
- Mar 9, 2011 9:32:02 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/rawpci.h
r36153 r36218 158 158 } PCIRAWREQPCICFGREAD; 159 159 160 /** Parameters buffer for PCIRAWR0_DO_REGISTER_R0_IRQ_HANDLER call. */ 161 typedef 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. */ 172 typedef struct 173 { 174 /* in */ 175 int32_t iHostIrq; 176 } PCIRAWREQUNREGISTERR0IRQHANDLER; 177 160 178 /** 161 179 * Request buffer use for communication with the driver. … … 187 205 PCIRAWREQPCICFGWRITE aPciCfgWrite; 188 206 PCIRAWREQPCICFGREAD aPciCfgRead; 207 PCIRAWREQREGISTERR0IRQHANDLER aRegisterR0IrqHandler; 208 PCIRAWREQUNREGISTERR0IRQHANDLER aUnregisterR0IrqHandler; 189 209 } u; 190 210 } PCIRAWSENDREQ; … … 218 238 /* Perform PCI config read. */ 219 239 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, 220 244 /** The usual 32-bit type blow up. */ 221 245 PCIRAWR0_DO_32BIT_HACK = 0x7fffffff … … 225 249 typedef struct RAWPCIFACTORY *PRAWPCIFACTORY; 226 250 typedef 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 */ 258 typedef DECLCALLBACK(void) FNRAWPCIISR(void *pvContext, int32_t iIrq); 259 typedef FNRAWPCIISR *PFNRAWPCIISR; 227 260 228 261 /** … … 332 365 uint32_t Register, 333 366 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)); 334 389 335 390 /** Structure version number. (RAWPCIDEVPORT_VERSION) */ -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r36203 r36218 1658 1658 return; 1659 1659 1660 Log(("BIOS init device: %02x: :%02x.%d\n", uBus, uDevFn >> 3, uDevFn & 7));1660 Log(("BIOS init device: %02x:%02x.%d\n", uBus, uDevFn >> 3, uDevFn & 7)); 1661 1661 1662 1662 switch (uDevClass) … … 2296 2296 pciDevIsMsixCapable(pPciDev) ? " MSI-X" : "" 2297 2297 ); 2298 if ( !pciDevIsPassthrough(pPciDev) && PCIDevGetInterruptPin(pPciDev) != 0)2299 pHlp->pfnPrintf(pHlp, " IRQ%d", PCIDevGetInterruptLine(pPciDev));2298 if (ich9pciGetByte(pPciDev, VBOX_PCI_INTERRUPT_PIN) != 0) 2299 pHlp->pfnPrintf(pHlp, " IRQ%d", ich9pciGetByte(pPciDev, VBOX_PCI_INTERRUPT_LINE)); 2300 2300 2301 2301 pHlp->pfnPrintf(pHlp, "\n"); … … 2618 2618 2619 2619 /** @todo: other chipset devices shall be registered too */ 2620 /** @todo: what to with bridges? */2621 2620 2622 2621 PDMDevHlpDBGFInfoRegister(pDevIns, "pci", "Display PCI bus status. (no arguments)", ich9pciInfo); … … 2642 2641 if (pciDevIsPassthrough(pDev)) 2643 2642 { 2644 // implementreset handler2645 AssertFailed();2643 // no reset handler - we can do what we need in PDM reset handler 2644 // @todo: is it correct? 2646 2645 } 2647 2646 else -
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r35346 r36218 289 289 { "RTThreadUserWait", (void *)RTThreadUserWait }, 290 290 { "RTThreadUserWaitNoResume", (void *)RTThreadUserWaitNoResume }, 291 #else 292 /** 293 * @todo: remove me, once above code enabled. 294 * We need RTThreadCreate/RTThreadWait in the PCI driver. 295 */ 296 { "RTThreadCreate", (void *)RTThreadCreate }, 297 { "RTThreadWait", (void *)RTThreadWait }, 291 298 #endif 292 299 { "RTThreadPreemptIsEnabled", (void *)RTThreadPreemptIsEnabled }, -
trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
r36153 r36218 187 187 188 188 int rc = vboxPciOsDevPciCfgWrite(pThis, Register, pValue); 189 190 return rc; 191 } 192 193 DECLHIDDEN(int) vboxPciDevRegisterIrqHandler(PRAWPCIDEVPORT pPort, PFNRAWPCIISR pfnHandler, void* pIrqContext, int32_t *piHostIrq) 194 { 195 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 196 int rc; 197 198 pThis->pfnIrqHandler = pfnHandler; 199 pThis->pIrqContext = pIrqContext; 200 rc = vboxPciOsDevRegisterIrqHandler(pThis, pfnHandler, pIrqContext, piHostIrq); 201 if (RT_FAILURE(rc)) 202 { 203 pThis->pfnIrqHandler = NULL; 204 pThis->pIrqContext = NULL; 205 *piHostIrq = -1; 206 } 207 208 return rc; 209 } 210 211 DECLHIDDEN(int) vboxPciDevUnregisterIrqHandler(PRAWPCIDEVPORT pPort, int32_t iHostIrq) 212 { 213 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 214 215 int rc = vboxPciOsDevUnregisterIrqHandler(pThis, iHostIrq); 189 216 190 217 return rc; … … 226 253 pNew->DevPort.pfnPciCfgRead = vboxPciDevPciCfgRead; 227 254 pNew->DevPort.pfnPciCfgWrite = vboxPciDevPciCfgWrite; 228 255 pNew->DevPort.pfnPciCfgRead = vboxPciDevPciCfgRead; 256 pNew->DevPort.pfnPciCfgWrite = vboxPciDevPciCfgWrite; 257 pNew->DevPort.pfnRegisterIrqHandler = vboxPciDevRegisterIrqHandler; 258 pNew->DevPort.pfnUnregisterIrqHandler = vboxPciDevUnregisterIrqHandler; 229 259 pNew->DevPort.u32VersionEnd = RAWPCIDEVPORT_VERSION; 230 260 … … 284 314 } 285 315 286 287 288 289 316 static DECLHIDDEN(bool) vboxPciCanUnload(PVBOXRAWPCIGLOBALS pGlobals) 290 317 { -
trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
r36153 r36218 65 65 /** Port, given to the outside world. */ 66 66 RAWPCIDEVPORT DevPort; 67 68 PFNRAWPCIISR pfnIrqHandler; 69 void *pIrqContext; 67 70 } VBOXRAWPCIINS; 68 71 … … 103 106 DECLHIDDEN(int) vboxPciOsDevInit (PVBOXRAWPCIINS pIns, uint32_t fFlags); 104 107 DECLHIDDEN(int) vboxPciOsDevDeinit(PVBOXRAWPCIINS pIns, uint32_t fFlags); 108 105 109 DECLHIDDEN(int) vboxPciOsDevGetRegionInfo(PVBOXRAWPCIINS pIns, 106 110 int32_t iRegion, … … 120 124 uint64_t u64RegionSize, 121 125 RTR0PTR RegionBase); 126 122 127 DECLHIDDEN(int) vboxPciOsDevPciCfgWrite(PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue); 123 128 DECLHIDDEN(int) vboxPciOsDevPciCfgRead (PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue); 129 130 DECLHIDDEN(int) vboxPciOsDevRegisterIrqHandler (PVBOXRAWPCIINS pIns, PFNRAWPCIISR pfnHandler, void* pIrqContext, int32_t *piHostIrq); 131 DECLHIDDEN(int) vboxPciOsDevUnregisterIrqHandler(PVBOXRAWPCIINS pIns, int32_t iHostIrq); 124 132 125 133 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.