Changeset 109212 in vbox
- Timestamp:
- May 9, 2025 6:25:38 AM (10 days ago)
- svn:sync-xref-src-repo-rev:
- 168790
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmgic.h
r108716 r109212 127 127 * Cannot be NIL_PCIBDF. 128 128 * @param pMsi The MSI to send. 129 * @param uEventId The event ID specified by the device.130 129 * @param uTagSrc The IRQ tag and source (for tracing). 131 130 */ 132 DECLR3CALLBACKMEMBER(int, pfnSendMsi, (PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t u EventId, uint32_t uTagSrc));131 DECLR3CALLBACKMEMBER(int, pfnSendMsi, (PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc)); 133 132 134 133 /** @name Reserved for future (MBZ). -
trunk/src/VBox/Devices/Bus/DevPciGenericEcam.cpp
r106061 r109212 318 318 "|IntPinB" 319 319 "|IntPinC" 320 "|IntPinD", ""); 320 "|IntPinD" 321 "|Msi", ""); 321 322 322 323 int rc = pHlp->pfnCFGMQueryU64Def(pCfg, "MmioEcamBase", &pPciRoot->u64PciConfigMMioAddress, 0); … … 344 345 AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"IntPinD\""))); 345 346 347 bool fMsi; 348 rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Msi", &fMsi, false); 349 AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"Msi\""))); 350 346 351 Log(("PCI: fUseIoApic=%RTbool McfgBase=%#RX64 McfgLength=%#RX64 fR0Enabled=%RTbool fRCEnabled=%RTbool\n", pPciRoot->fUseIoApic, 347 352 pPciRoot->u64PciConfigMMioAddress, pPciRoot->u64PciConfigMMioLength, pDevIns->fR0Enabled, pDevIns->fRCEnabled)); 348 Log(("PCI: IntPinA=%u IntPinB=%u IntPinC=%u IntPinD=%u \n", pPciRoot->u.GenericEcam.auPciIrqNr[0],349 pPciRoot->u.GenericEcam.auPciIrqNr[1], pPciRoot->u.GenericEcam.auPciIrqNr[2], pPciRoot->u.GenericEcam.auPciIrqNr[3] ));353 Log(("PCI: IntPinA=%u IntPinB=%u IntPinC=%u IntPinD=%u fMsi=%RTbool\n", pPciRoot->u.GenericEcam.auPciIrqNr[0], 354 pPciRoot->u.GenericEcam.auPciIrqNr[1], pPciRoot->u.GenericEcam.auPciIrqNr[2], pPciRoot->u.GenericEcam.auPciIrqNr[3], fMsi)); 350 355 351 356 /* … … 376 381 PciBusReg.u32Version = PDM_PCIBUSREGCC_VERSION; 377 382 PciBusReg.pfnRegisterR3 = devpciR3CommonRegisterDevice; 378 PciBusReg.pfnRegisterMsiR3 = NULL;383 PciBusReg.pfnRegisterMsiR3 = fMsi ? devpciR3CommonRegisterMsi : NULL; 379 384 PciBusReg.pfnIORegionRegisterR3 = devpciR3CommonIORegionRegister; 380 385 PciBusReg.pfnInterceptConfigAccesses = devpciR3CommonInterceptConfigAccesses; … … 518 523 * Validate and read configuration. 519 524 */ 520 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "ExpressEnabled|ExpressPortType ", "");525 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "ExpressEnabled|ExpressPortType|Msi", ""); 521 526 522 527 /* check if we're supposed to implement a PCIe bridge. */ … … 532 537 Log(("PCI/bridge#%u: fR0Enabled=%RTbool fRCEnabled=%RTbool fExpress=%RTbool uExpressPortType=%u (%s)\n", 533 538 iInstance, pDevIns->fR0Enabled, pDevIns->fRCEnabled, fExpress, uExpressPortType, szExpressPortType)); 539 540 bool fMsi; 541 rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Msi", &fMsi, false); 542 AssertRCReturn(rc, PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to query boolean value \"Msi\""))); 534 543 535 544 /* … … 550 559 PciBusReg.u32Version = PDM_PCIBUSREGCC_VERSION; 551 560 PciBusReg.pfnRegisterR3 = devpcibridgeR3CommonRegisterDevice; 552 PciBusReg.pfnRegisterMsiR3 = NULL;561 PciBusReg.pfnRegisterMsiR3 = fMsi ? devpciR3CommonRegisterMsi : NULL; 553 562 PciBusReg.pfnIORegionRegisterR3 = devpciR3CommonIORegionRegister; 554 563 PciBusReg.pfnInterceptConfigAccesses = devpciR3CommonInterceptConfigAccesses; -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r106061 r109212 997 997 998 998 999 static DECLCALLBACK(int) ich9pciRegisterMsi(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PPDMMSIREG pMsiReg)999 DECLCALLBACK(int) devpciR3CommonRegisterMsi(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PPDMMSIREG pMsiReg) 1000 1000 { 1001 1001 //PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS); … … 3387 3387 PciBusReg.u32Version = PDM_PCIBUSREGCC_VERSION; 3388 3388 PciBusReg.pfnRegisterR3 = devpciR3CommonRegisterDevice; 3389 PciBusReg.pfnRegisterMsiR3 = ich9pciRegisterMsi;3389 PciBusReg.pfnRegisterMsiR3 = devpciR3CommonRegisterMsi; 3390 3390 PciBusReg.pfnIORegionRegisterR3 = devpciR3CommonIORegionRegister; 3391 3391 PciBusReg.pfnInterceptConfigAccesses = devpciR3CommonInterceptConfigAccesses; … … 3697 3697 PciBusReg.u32Version = PDM_PCIBUSREGCC_VERSION; 3698 3698 PciBusReg.pfnRegisterR3 = devpcibridgeR3CommonRegisterDevice; 3699 PciBusReg.pfnRegisterMsiR3 = ich9pciRegisterMsi;3699 PciBusReg.pfnRegisterMsiR3 = devpciR3CommonRegisterMsi; 3700 3700 PciBusReg.pfnIORegionRegisterR3 = devpciR3CommonIORegionRegister; 3701 3701 PciBusReg.pfnInterceptConfigAccesses = devpciR3CommonInterceptConfigAccesses; -
trunk/src/VBox/Devices/Bus/DevPciInternal.h
r106061 r109212 272 272 DECLCALLBACK(int) devpcibridgeR3CommonRegisterDevice(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t fFlags, 273 273 uint8_t uPciDevNo, uint8_t uPciFunNo, const char *pszName); 274 DECLCALLBACK(int) devpciR3CommonRegisterMsi(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PPDMMSIREG pMsiReg); 274 275 DECLCALLBACK(int) devpciR3CommonIORegionRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, 275 276 RTGCPHYS cbRegion, PCIADDRESSSPACE enmType, uint32_t fFlags, -
trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
r109112 r109212 469 469 InsertConfigNode(pRoot, "Devices", &pDevices); 470 470 471 InsertConfigNode(pDevices, "pci-generic-ecam-bridge", NULL); 471 InsertConfigNode(pDevices, "pci-generic-ecam-bridge", &pDev); 472 InsertConfigNode(pDev, "0", &pInst); 473 InsertConfigNode(pInst, "Config", &pCfg); 474 if (fGicIts == TRUE) 475 InsertConfigInteger(pCfg, "Msi", 1); 472 476 473 477 InsertConfigNode(pDevices, "platform", &pDev); … … 828 832 InsertConfigInteger(pCfg, "IntPinC", aPinIrqs[2]); 829 833 InsertConfigInteger(pCfg, "IntPinD", aPinIrqs[3]); 834 if (fGicIts == TRUE) 835 InsertConfigInteger(pCfg, "Msi", 1); 830 836 vrc = RTFdtNodeAddF(hFdt, "pcie@%RGp", GCPhysPciMmio); VRC(); 831 837 vrc = RTFdtNodePropertyAddCellsU32(hFdt, "interrupt-map-mask", 4, 0xf800, 0, 0, 7); VRC(); -
trunk/src/VBox/VMM/VMMAll/GITSAll.cpp
r109206 r109212 1001 1001 * @interface_method_impl{PDMGICBACKEND,pfnSendMsi} 1002 1002 */ 1003 DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uEventId, uint32_t uTagSrc) 1004 { 1005 Log4Func(("uBusDevFn=%#RX32 uEventId=%#RX32\n", uBusDevFn, uEventId)); 1006 RT_NOREF(pVM, uBusDevFn, pMsi, uEventId, uTagSrc); 1003 DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc) 1004 { 1005 AssertPtrReturn(pMsi, VERR_INVALID_PARAMETER); 1006 Log4Func(("uBusDevFn=%#RX32 Msi.Addr=%#RX64 Msi.Data=%#RX32\n", uBusDevFn, pMsi->Addr.u64, pMsi->Data.u32)); 1007 RT_NOREF(pVM, uBusDevFn, pMsi, uTagSrc); 1008 AssertMsgFailed(("uBusDevFn=%#RX32 Msi.Addr=%#RX64 Msi.Data=%#RX32\n", uBusDevFn, pMsi->Addr.u64, pMsi->Data.u32)); 1007 1009 return VERR_NOT_IMPLEMENTED; 1008 1010 } -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r107308 r109212 275 275 { 276 276 Log9(("PDMIoApicSendMsi: addr=%#RX64 data=%#RX32 tag=%#x src=%#x\n", pMsi->Addr.u64, pMsi->Data.u32, uTagSrc, uBusDevFn)); 277 #ifdef VBOX_VMM_TARGET_ARMV8 278 PCPDMGICBACKEND pGic = &pVM->pdm.s.Ic.u.armv8.GicBackend; 279 if (pGic->pfnSendMsi) 280 pGic->pfnSendMsi(pVM, uBusDevFn, pMsi, uTagSrc); 281 #else 277 282 PCPDMIOAPIC pIoApic = &pVM->pdm.s.IoApic; 278 # ifdef IN_RING0283 # ifdef IN_RING0 279 284 if (pIoApic->pDevInsR0) 280 285 pIoApic->pfnSendMsiR0(pIoApic->pDevInsR0, uBusDevFn, pMsi, uTagSrc); … … 295 300 AssertMsgFailed(("We're out of devhlp queue items!!!\n")); 296 301 } 297 # else302 # else 298 303 if (pIoApic->pDevInsR3) 299 304 { … … 301 306 pIoApic->pfnSendMsiR3(pIoApic->pDevInsR3, uBusDevFn, pMsi, uTagSrc); 302 307 } 308 # endif 303 309 #endif 304 310 } -
trunk/src/VBox/VMM/include/GITSInternal.h
r109206 r109212 276 276 277 277 DECL_HIDDEN_CALLBACK(void) gitsInit(PGITSDEV pGitsDev); 278 DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t u EventId, uint32_t uTagSrc);278 DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uTagSrc); 279 279 DECL_HIDDEN_CALLBACK(uint64_t) gitsMmioReadCtrl(PCGITSDEV pGitsDev, uint16_t offReg, unsigned cb); 280 280 DECL_HIDDEN_CALLBACK(uint64_t) gitsMmioReadTranslate(PCGITSDEV pGitsDev, uint16_t offReg, unsigned cb);
Note:
See TracChangeset
for help on using the changeset viewer.