VirtualBox

Changeset 80531 in vbox for trunk/src/VBox/Devices/build


Ignore:
Timestamp:
Sep 1, 2019 11:03:34 PM (5 years ago)
Author:
vboxsync
Message:

VMM,Devices: Some PDM device model refactoring. bugref:9218

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/build/VBoxDD.cpp

    r78799 r80531  
    146146        return rc;
    147147#endif
    148 #ifdef VBOX_ACPI
    149148    rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
    150149    if (RT_FAILURE(rc))
    151150        return rc;
    152 #endif
    153151    rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceDMA);
    154152    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/build/VBoxDD2.h

    r76565 r80531  
    7171
    7272#endif /* !VBOX_INCLUDED_SRC_build_VBoxDD2_h */
    73 
  • trunk/src/VBox/Devices/build/VBoxDDR0.cpp

    r76553 r80531  
    2020*   Header Files                                                                                                                 *
    2121*********************************************************************************************************************************/
    22 #include <iprt/types.h>
     22#define LOG_GROUP LOG_GROUP_DEV
     23#include <VBox/log.h>
     24#include <VBox/sup.h>
     25#include <VBox/vmm/pdmdev.h>
     26
     27#include "VBoxDD.h"
    2328
    2429
     
    3136#endif
    3237
     38/**
     39 * Pointer to the ring-0 device registrations for VBoxDDR0.
     40 */
     41static PCPDMDEVREGR0 g_apVBoxDDR0DevRegs[] =
     42{
     43    &g_DevicePCI,
     44    &g_DevicePciIch9,
     45    &g_DeviceIOAPIC,
     46    &g_DevicePS2KeyboardMouse,
     47    &g_DevicePIIX3IDE,
     48    &g_DeviceI8254,
     49    &g_DeviceI8259,
     50    &g_DeviceHPET,
     51    &g_DeviceSmc,
     52    /// @todo &g_DeviceFlash,
     53    &g_DeviceMC146818,
     54    &g_DeviceVga,
     55    &g_DeviceVMMDev,
     56    &g_DevicePCNet,
     57#ifdef VBOX_WITH_E1000
     58    &g_DeviceE1000,
     59#endif
     60#ifdef VBOX_WITH_VIRTIO
     61    &g_DeviceVirtioNet,
     62#endif
     63    &g_DeviceICHAC97,
     64    &g_DeviceHDA,
     65#ifdef VBOX_WITH_VUSB
     66    &g_DeviceOHCI,
     67#endif
     68#ifdef VBOX_WITH_EHCI_IMPL
     69    &g_DeviceEHCI,
     70#endif
     71#ifdef VBOX_WITH_XHCI_IMPL
     72    &g_DeviceXHCI,
     73#endif
     74    &g_DeviceACPI,
     75    &g_DeviceDMA,
     76    &g_DeviceSerialPort,
     77    &g_DeviceOxPcie958,
     78    &g_DeviceParallelPort,
     79#ifdef VBOX_WITH_AHCI
     80    &g_DeviceAHCI,
     81#endif
     82#ifdef VBOX_WITH_BUSLOGIC
     83    &g_DeviceBusLogic,
     84#endif
     85    &g_DevicePCIBridge,
     86    &g_DevicePciIch9Bridge,
     87#ifdef VBOX_WITH_LSILOGIC
     88    &g_DeviceLsiLogicSCSI,
     89    &g_DeviceLsiLogicSAS,
     90#endif
     91#ifdef VBOX_WITH_NVME_IMPL
     92    &g_DeviceNVMe,
     93#endif
     94#ifdef VBOX_WITH_VIRTIO_SCSI
     95    &g_DeviceVirtioSCSI,
     96#endif
     97#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
     98    &g_DevicePciRaw,
     99#endif
     100    &g_DeviceGIMDev,
     101#ifdef VBOX_WITH_NEW_LPC_DEVICE
     102    &g_DeviceLPC,
     103#endif
     104};
     105
     106/**
     107 * Module device registration record for VBoxDDR0.
     108 */
     109static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
     110{
     111    /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
     112    /* .cDevRegs = */   RT_ELEMENTS(g_apVBoxDDR0DevRegs),
     113    /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
     114    /* .hMod = */       NULL,
     115    /* .ListEntry = */  { NULL, NULL },
     116};
     117
     118
     119DECLEXPORT(int)  ModuleInit(void *hMod)
     120{
     121    LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
     122    return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
     123}
     124
     125
     126DECLEXPORT(void) ModuleTerm(void *hMod)
     127{
     128    LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
     129    PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
     130}
     131
     132
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