VirtualBox

Changeset 80722 in vbox for trunk/include


Ignore:
Timestamp:
Sep 11, 2019 9:21:47 AM (5 years ago)
Author:
vboxsync
Message:

PDM,PCI: More PDMPCIDEV related refactoring work, mainly concerned with eliminating unnecessary pointers. bugref:9218

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdev.h

    r80704 r80722  
    50355035    RTR3PTR                         pvInstanceDataForRCR3;
    50365036
     5037    /** Pointer to the PCI devices for this device.
     5038     * (Allocated after the shared instance data.)  */
     5039    R3PTRTYPE(struct PDMPCIDEV *)   apPciDevs[8];
     5040
    50375041    /** Temporarily. */
    50385042    R0PTRTYPE(struct PDMDEVINSR0 *) pDevInsR0RemoveMe;
     
    50595063
    50605064/** Current PDMDEVINSR3 version number. */
    5061 #define PDM_DEVINSR3_VERSION        PDM_VERSION_MAKE(0xff82, 1, 0)
     5065#define PDM_DEVINSR3_VERSION        PDM_VERSION_MAKE(0xff82, 2, 0)
    50625066
    50635067/** Converts a pointer to the PDMDEVINSR3::IBase to a pointer to PDMDEVINS. */
     
    51075111    /** Ring-0 pointer to the raw-mode instance data. */
    51085112    RTR0PTR                         pvInstanceDataForRCR0;
     5113
     5114    /** Pointer to the PCI devices for this device.
     5115     * (Allocated after the shared instance data.)  */
     5116    R0PTRTYPE(struct PDMPCIDEV *)   apPciDevs[8];
     5117
    51095118#if HC_ARCH_BITS == 32
    51105119    /** Align the internal data more naturally. */
     
    51275136
    51285137/** Current PDMDEVINSR0 version number. */
    5129 #define PDM_DEVINSR0_VERSION        PDM_VERSION_MAKE(0xff83, 1, 0)
     5138#define PDM_DEVINSR0_VERSION        PDM_VERSION_MAKE(0xff83, 2, 0)
    51305139
    51315140
     
    51585167     */
    51595168    RGPTRTYPE(PPDMCRITSECT)         pCritSectRoRC;
    5160     /** Pointer to the ring-0 device registration structure.  */
    5161     RGPTRTYPE(PCPDMDEVREGR0)        pReg;
     5169    /** Pointer to the raw-mode device registration structure.  */
     5170    RGPTRTYPE(PCPDMDEVREGRC)        pReg;
     5171    /** Pointer to the PCI devices for this device.
     5172     * (Allocated after the shared instance data.)  */
     5173    RGPTRTYPE(struct PDMPCIDEV *)   apPciDevs[8];
    51625174
    51635175    /** Internal data. */
     
    51765188
    51775189/** Current PDMDEVINSR0 version number. */
    5178 #define PDM_DEVINSRC_VERSION        PDM_VERSION_MAKE(0xff84, 1, 0)
     5190#define PDM_DEVINSRC_VERSION        PDM_VERSION_MAKE(0xff84, 2, 0)
    51795191
    51805192
  • trunk/include/VBox/vmm/pdmpcidevint.h

    r76585 r80722  
    132132    /** Pointer to the next PDM device associate with the PDM device. (R3 ptr) */
    133133    R3PTRTYPE(PPDMPCIDEV)           pNextR3;
    134     /** Pointer to the internal PDM PCI bus for the device. (R3 ptr) */
    135     R3PTRTYPE(struct PDMPCIBUS *)   pPdmBusR3;
    136 
    137     /** Pointer to the PDM device the PCI device belongs to. (R0 ptr)  */
    138     PPDMDEVINSR0                    pDevInsR0;
    139134    /** Pointer to the next PDM device associate with the PDM device. (R0 ptr) */
    140135    R0PTRTYPE(PPDMPCIDEV)           pNextR0;
    141     /** Pointer to the internal PDM PCI bus for the device. (R0 ptr) */
    142     R0PTRTYPE(struct PDMPCIBUS *)   pPdmBusR0;
    143 
    144     /** Pointer to the PDM device the PCI device belongs to. (RC ptr)  */
    145     PPDMDEVINSRC                    pDevInsRC;
    146     /** Pointer to the next PDM device associate with the PDM device. (RC ptr) */
    147     RCPTRTYPE(PPDMPCIDEV)           pNextRC;
    148     /** Pointer to the internal PDM PCI bus for the device. (RC ptr) */
    149     RCPTRTYPE(struct PDMPCIBUS *)   pPdmBusRC;
    150136
    151137    /** The CFGM device configuration index (default, PciDev1..255).
     
    156142    /** Set if the it can be reassigned to a different PCI function number. */
    157143    bool                            fReassignableFunNo;
    158     /** Alignment padding.   */
     144    /** Alignment padding - used by ICH9 for region swapping (DevVGA hack).   */
    159145    uint8_t                         bPadding0;
     146    /** Index into the PDM internal bus array (PDM::aPciBuses). */
     147    uint8_t                         idxPdmBus;
     148    /** Index into PDMDEVINSR3::apPciDevs. */
     149    uint8_t                         idxPciDevs;
     150
     151    /** Alignment padding. */
     152    uint8_t                         abPadding1[2+4+4];
     153    RTR0PTR                         apR0PaddingPdm2[2];
     154    RTR3PTR                         pR3PaddingPdm3;
    160155    /** @} */
    161156
     
    166161    /** Pointer to the PCI bus of the device. (R3 ptr) */
    167162    R3PTRTYPE(struct DEVPCIBUS *)   pBusR3;
    168     /** Page used for MSI-X state.             (R3 ptr) */
     163    /** Page used for MSI-X state.            (R3 ptr) */
    169164    R3PTRTYPE(void *)               pMsixPageR3;
    170165    /** Read config callback. */
     
    179174    R3PTRTYPE(PFNPCIBRIDGECONFIGWRITE) pfnBridgeConfigWrite;
    180175
    181     /** Pointer to the PCI bus of the device. (R0 ptr) */
     176    /** Pointer to the PCI bus of the device. (R0 ptr)
     177     * @note Only used by ich9pcibridgeSetIrq to find the host (root) bus. */
    182178    R0PTRTYPE(struct DEVPCIBUS *)   pBusR0;
    183     /** Page used for MSI-X state.             (R0 ptr) */
     179    /** Page used for MSI-X state.            (R0 ptr) */
    184180    R0PTRTYPE(void *)               pMsixPageR0;
    185181
    186     /** Pointer to the PCI bus of the device. (RC ptr) */
     182    /** Pointer to the PCI bus of the device. (RC ptr)
     183     * @note Only used by ich9pcibridgeSetIrq to find the host (root) bus. */
    187184    RCPTRTYPE(struct DEVPCIBUS *)   pBusRC;
    188     /** Page used for MSI-X state.             (RC ptr) */
     185    /** Page used for MSI-X state.            (RC ptr) */
    189186    RCPTRTYPE(void *)               pMsixPageRC;
    190187
     
    212209#if HC_ARCH_BITS == 32
    213210    /** Add padding to align aIORegions to an 8 byte boundary. */
    214     uint8_t                         abPadding1[12];
     211    uint8_t                         abPadding2[12];
    215212#endif
    216213
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