VirtualBox

Changeset 32037 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 27, 2010 10:23:14 AM (14 years ago)
Author:
vboxsync
Message:

PCI work: make ICH9 PCI an additional device, not alternative implementation

Location:
trunk/src/VBox/Devices
Files:
1 edited
1 moved

Legend:

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

    r31992 r32037  
    11/* $Id$ */
    22/** @file
    3  * DevPCI - PCI BUS Device.
     3 * DevPCI - ICH9 southbridge PCI bus emulation Device.
    44 */
    55
     
    6565} PCIBUS, *PPCIBUS;
    6666
    67 /**
    68  * PIIX3 ISA Bridge state.
    69  */
    70 typedef struct
    71 {
    72     /** The PCI device of the bridge. */
    73     PCIDEVICE dev;
    74 } PIIX3, *PPIIX3;
    75 
    7667
    7768/** @def PCI_IRQ_PINS
     
    10495#endif
    10596
    106     /** ISA bridge state. */
    107     PIIX3               PIIX3State;
    10897    /** PCI bus which is attached to the host-to-PCI bridge. */
    10998    PCIBUS              PciBus;
     
    128117#ifdef IN_RING3
    129118
    130 static DECLCALLBACK(int) pciConstruct(PPDMDEVINS pDevIns,
    131                                       int        iInstance,
    132                                       PCFGMNODE  pCfg)
     119static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns,
     120                                          int        iInstance,
     121                                          PCFGMNODE  pCfg)
    133122{
    134123    int rc;
    135124    Assert(iInstance == 0);
    136    
     125
    137126    /*
    138127     * Validate and read configuration.
     
    147136        return PDMDEV_SET_ERROR(pDevIns, rc,
    148137                                N_("Configuration error: Failed to query boolean value \"IOAPIC\""));
    149    
     138
    150139    /* check if RC code is enabled. */
    151140    bool fGCEnabled;
     
    166155     * Init data and register the PCI bus.
    167156     */
    168     PPCIGLOBALS pGlobals = PDMINS_2_DATA(pDevIns, PPCIGLOBALS);   
     157    PPCIGLOBALS pGlobals = PDMINS_2_DATA(pDevIns, PPCIGLOBALS);
    169158    pGlobals->fUseIoApic          = fUseIoApic;
    170    
     159
    171160    return VINF_SUCCESS;
    172161}
     
    175164 * @copydoc FNPDMDEVRELOCATE
    176165 */
    177 static DECLCALLBACK(void) pciRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
     166static DECLCALLBACK(void) ich9pciRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    178167{
    179168}
     
    182171 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    183172 */
    184 static DECLCALLBACK(int)   pcibridgeConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
     173static DECLCALLBACK(int)   ich9pcibridgeConstruct(PPDMDEVINS pDevIns,
     174                                                  int        iInstance,
     175                                                  PCFGMNODE  pCfg)
    185176{
    186177    int rc;
     
    213204 * @copydoc FNPDMDEVRESET
    214205 */
    215 static DECLCALLBACK(void) pcibridgeReset(PPDMDEVINS pDevIns)
     206static DECLCALLBACK(void) ich9pcibridgeReset(PPDMDEVINS pDevIns)
    216207{
    217208}
     
    221212 * @copydoc FNPDMDEVRELOCATE
    222213 */
    223 static DECLCALLBACK(void) pcibridgeRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
     214static DECLCALLBACK(void) ich9pcibridgeRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    224215{
    225216}
     
    228219 * The PCI bus device registration structure.
    229220 */
    230 const PDMDEVREG g_DevicePCI =
     221const PDMDEVREG g_DevicePciIch9 =
    231222{
    232223    /* u32Version */
    233224    PDM_DEVREG_VERSION,
    234225    /* szName */
    235     "pci",
     226    "ich9pci",
    236227    /* szRCMod */
    237228    "VBoxDDGC.gc",
     
    239230    "VBoxDDR0.r0",
    240231    /* pszDescription */
    241     "i440FX PCI bridge and PIIX3 ISA bridge.",
     232    "ICH9 PCI bridge",
    242233    /* fFlags */
    243234    PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     
    249240    sizeof(PCIGLOBALS),
    250241    /* pfnConstruct */
    251     pciConstruct,
     242    ich9pciConstruct,
    252243    /* pfnDestruct */
    253244    NULL,
    254245    /* pfnRelocate */
    255     pciRelocate,
     246    ich9pciRelocate,
    256247    /* pfnIOCtl */
    257248    NULL,
     
    284275 * for the PCI-to-PCI bridge.
    285276 */
    286 const PDMDEVREG g_DevicePCIBridge =
     277const PDMDEVREG g_DevicePciIch9Bridge =
    287278{
    288279    /* u32Version */
    289280    PDM_DEVREG_VERSION,
    290281    /* szName */
    291     "pcibridge",
     282    "ich9pcibridge",
    292283    /* szRCMod */
    293284    "VBoxDDGC.gc",
     
    295286    "VBoxDDR0.r0",
    296287    /* pszDescription */
    297     "82801 Mobile PCI to PCI bridge",
     288    "ICH9 PCI to PCI bridge",
    298289    /* fFlags */
    299290    PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     
    305296    sizeof(PCIBUS),
    306297    /* pfnConstruct */
    307     pcibridgeConstruct,
     298    ich9pcibridgeConstruct,
    308299    /* pfnDestruct */
    309300    NULL,
    310301    /* pfnRelocate */
    311     pcibridgeRelocate,
     302    ich9pcibridgeRelocate,
    312303    /* pfnIOCtl */
    313304    NULL,
     
    315306    NULL,
    316307    /* pfnReset */
    317     pcibridgeReset,
     308    ich9pcibridgeReset,
    318309    /* pfnSuspend */
    319310    NULL,
  • trunk/src/VBox/Devices/Makefile.kmk

    r31911 r32037  
    187187endif
    188188
    189 ifdef VBOX_WITH_NEWPCI
    190  DevPCI.cpp           := Bus/DevPCI-new.cpp
    191 else
    192  DevPCI.cpp           := Bus/DevPCI.cpp
    193 endif
    194 
    195 
    196189VBoxDD_LIBS             = \
    197190        $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
     
    304297        Input/UsbKbd.cpp \
    305298        Input/UsbMouse.cpp \
    306         $(DevPCI.cpp) \
     299        Bus/DevPCI.cpp \
     300        $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,) \
    307301        Graphics/DevVGA.cpp \
    308302        Storage/DevATA.cpp \
     
    537531
    538532# For finding PCIInternal.h from VBox/pci.h.
    539 $(DevPCI.cpp)_INCS      = Bus
     533Bus/DevPCI.cpp_INCS      = Bus
     534Bus/DevPciIch9.cpp_INCS  = Bus
    540535
    541536# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
     
    556551        $(PATH_SUB_CURRENT)
    557552 VBoxDDGC_SOURCES        = \
    558         $(DevPCI.cpp) \
     553        Bus/DevPCI.cpp \
     554        $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,) \
    559555        Graphics/DevVGA.cpp \
    560556        Input/DevPS2.cpp \
     
    667663        $(PATH_SUB_CURRENT)
    668664VBoxDDR0_SOURCES        = \
    669         $(DevPCI.cpp) \
     665        Bus/DevPCI.cpp \
     666        $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,) \
    670667        Graphics/DevVGA.cpp \
    671668        Input/DevPS2.cpp \
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