VirtualBox

source: vbox/trunk/src/VBox/Devices/build/VBoxDDR0.cpp@ 95506

Last change on this file since 95506 was 93560, checked in by vboxsync, 3 years ago

Added emulation of several classic Ethernet adapters.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/* $Id: VBoxDDR0.cpp 93560 2022-02-03 06:37:40Z vboxsync $ */
2/** @file
3 * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
4 */
5
6/*
7 * Copyright (C) 2011-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
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"
28
29
30/*********************************************************************************************************************************
31* Global Variables *
32*********************************************************************************************************************************/
33#if defined(RT_OS_SOLARIS) && defined(IN_RING0)
34/* Dependency information for the native solaris loader. */
35extern "C" { char _depends_on[] = "vboxdrv VMMR0.r0"; }
36#endif
37
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 &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_DeviceDP8390,
64 &g_Device3C501,
65 &g_DeviceICHAC97,
66 &g_DeviceHDA,
67#ifdef VBOX_WITH_VUSB
68 &g_DeviceOHCI,
69#endif
70#ifdef VBOX_WITH_EHCI_IMPL
71 &g_DeviceEHCI,
72#endif
73#ifdef VBOX_WITH_XHCI_IMPL
74 &g_DeviceXHCI,
75#endif
76 &g_DeviceACPI,
77 &g_DeviceDMA,
78 &g_DeviceSerialPort,
79 &g_DeviceOxPcie958,
80 &g_DeviceParallelPort,
81#ifdef VBOX_WITH_AHCI
82 &g_DeviceAHCI,
83#endif
84#ifdef VBOX_WITH_BUSLOGIC
85 &g_DeviceBusLogic,
86#endif
87 &g_DevicePCIBridge,
88 &g_DevicePciIch9Bridge,
89#ifdef VBOX_WITH_LSILOGIC
90 &g_DeviceLsiLogicSCSI,
91 &g_DeviceLsiLogicSAS,
92#endif
93#ifdef VBOX_WITH_NVME_IMPL
94 &g_DeviceNVMe,
95#endif
96#ifdef VBOX_WITH_EFI
97 &g_DeviceEFI,
98#endif
99#ifdef VBOX_WITH_VIRTIO_SCSI
100 &g_DeviceVirtioSCSI,
101#endif
102#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
103 &g_DevicePciRaw,
104#endif
105 &g_DeviceGIMDev,
106#ifdef VBOX_WITH_NEW_LPC_DEVICE
107 &g_DeviceLPC,
108#endif
109#ifdef VBOX_WITH_IOMMU_AMD
110 &g_DeviceIommuAmd,
111#endif
112#ifdef VBOX_WITH_IOMMU_INTEL
113 &g_DeviceIommuIntel,
114#endif
115#ifdef VBOX_WITH_TPM
116 &g_DeviceTpm,
117#endif
118};
119
120/**
121 * Module device registration record for VBoxDDR0.
122 */
123static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
124{
125 /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
126 /* .cDevRegs = */ RT_ELEMENTS(g_apVBoxDDR0DevRegs),
127 /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
128 /* .hMod = */ NULL,
129 /* .ListEntry = */ { NULL, NULL },
130};
131
132
133DECLEXPORT(int) ModuleInit(void *hMod)
134{
135 LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
136 return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
137}
138
139
140DECLEXPORT(void) ModuleTerm(void *hMod)
141{
142 LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
143 PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
144}
145
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette