VirtualBox

Changeset 64451 in vbox for trunk


Ignore:
Timestamp:
Oct 28, 2016 10:14:32 AM (8 years ago)
Author:
vboxsync
Message:

DevPci: Share the pfnSetConfigCallbacksR3 implementation.

Location:
trunk/src/VBox/Devices/Bus
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r64450 r64451  
    15111511
    15121512/**
    1513  * @interface_method_impl{PDMPCIBUSREG,pfnSetConfigCallbacksR3}
    1514  */
    1515 static DECLCALLBACK(void)
    1516 pciR3CommonSetConfigCallbacks(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
    1517                               PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld)
    1518 {
    1519     NOREF(pDevIns);
    1520 
    1521     if (ppfnReadOld)
    1522         *ppfnReadOld = pPciDev->Int.s.pfnConfigRead;
    1523     pPciDev->Int.s.pfnConfigRead  = pfnRead;
    1524 
    1525     if (ppfnWriteOld)
    1526         *ppfnWriteOld = pPciDev->Int.s.pfnConfigWrite;
    1527     pPciDev->Int.s.pfnConfigWrite = pfnWrite;
    1528 }
    1529 
    1530 
    1531 /**
    15321513 * @interface_method_impl{PDMPCIBUSREG,pfnFakePCIBIOSR3}
    15331514 */
     
    16951676    PciBusReg.pfnRegisterMsiR3        = NULL;
    16961677    PciBusReg.pfnIORegionRegisterR3   = devpciR3CommonIORegionRegister;
    1697     PciBusReg.pfnSetConfigCallbacksR3 = pciR3CommonSetConfigCallbacks;
     1678    PciBusReg.pfnSetConfigCallbacksR3 = devpciR3CommonSetConfigCallbacks;
    16981679    PciBusReg.pfnSetIrqR3             = pciSetIrq;
    16991680    PciBusReg.pfnFakePCIBIOSR3        = pciR3FakePCIBIOS;
     
    20322013    PciBusReg.pfnRegisterMsiR3        = NULL;
    20332014    PciBusReg.pfnIORegionRegisterR3   = devpciR3CommonIORegionRegister;
    2034     PciBusReg.pfnSetConfigCallbacksR3 = pciR3CommonSetConfigCallbacks;
     2015    PciBusReg.pfnSetConfigCallbacksR3 = devpciR3CommonSetConfigCallbacks;
    20352016    PciBusReg.pfnSetIrqR3             = pcibridgeSetIrq;
    20362017    PciBusReg.pfnFakePCIBIOSR3        = NULL; /* Only needed for the first bus. */
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r64450 r64451  
    946946}
    947947
    948 static DECLCALLBACK(void) ich9pciSetConfigCallbacks(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
     948
     949/**
     950 * @interface_method_impl{PDMPCIBUSREG,pfnSetConfigCallbacksR3}
     951 */
     952DECLCALLBACK(void) devpciR3CommonSetConfigCallbacks(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev,
     953                                                    PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
    949954                                                    PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld)
    950955{
     
    959964    pPciDev->Int.s.pfnConfigWrite = pfnWrite;
    960965}
     966
    961967
    962968static int ich9pciR3CommonSaveExec(PDEVPCIBUS pBus, PSSMHANDLE pSSM)
     
    24002406    PciBusReg.pfnRegisterMsiR3        = ich9pciRegisterMsi;
    24012407    PciBusReg.pfnIORegionRegisterR3   = devpciR3CommonIORegionRegister;
    2402     PciBusReg.pfnSetConfigCallbacksR3 = ich9pciSetConfigCallbacks;
     2408    PciBusReg.pfnSetConfigCallbacksR3 = devpciR3CommonSetConfigCallbacks;
    24032409    PciBusReg.pfnSetIrqR3             = ich9pciSetIrq;
    24042410    PciBusReg.pfnFakePCIBIOSR3        = ich9pciFakePCIBIOS;
     
    26722678    PciBusReg.pfnRegisterMsiR3        = ich9pciRegisterMsi;
    26732679    PciBusReg.pfnIORegionRegisterR3   = devpciR3CommonIORegionRegister;
    2674     PciBusReg.pfnSetConfigCallbacksR3 = ich9pciSetConfigCallbacks;
     2680    PciBusReg.pfnSetConfigCallbacksR3 = devpciR3CommonSetConfigCallbacks;
    26752681    PciBusReg.pfnSetIrqR3             = ich9pcibridgeSetIrq;
    26762682    PciBusReg.pfnFakePCIBIOSR3        = NULL; /* Only needed for the first bus. */
  • trunk/src/VBox/Devices/Bus/DevPciInternal.h

    r64450 r64451  
    187187DECLCALLBACK(int)  devpciR3CommonIORegionRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iRegion, RTGCPHYS cbRegion,
    188188                                                  PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback);
     189DECLCALLBACK(void) devpciR3CommonSetConfigCallbacks(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev,
     190                                                    PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
     191                                                    PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld);
    189192
    190193#endif
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