VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1/* $Id: VBoxDDR0.cpp 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
4 */
5
6/*
7 * Copyright (C) 2011-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#define LOG_GROUP LOG_GROUP_DEV
33#include <VBox/log.h>
34#include <VBox/sup.h>
35#include <VBox/vmm/pdmdev.h>
36
37#include "VBoxDD.h"
38
39
40/*********************************************************************************************************************************
41* Global Variables *
42*********************************************************************************************************************************/
43#if defined(RT_OS_SOLARIS) && defined(IN_RING0)
44/* Dependency information for the native solaris loader. */
45extern "C" { char _depends_on[] = "vboxdrv VMMR0.r0"; }
46#endif
47
48/**
49 * Pointer to the ring-0 device registrations for VBoxDDR0.
50 */
51static PCPDMDEVREGR0 g_apVBoxDDR0DevRegs[] =
52{
53 &g_DevicePCI,
54 &g_DevicePciIch9,
55 &g_DeviceIOAPIC,
56 &g_DevicePS2KeyboardMouse,
57 &g_DevicePIIX3IDE,
58 &g_DeviceI8254,
59 &g_DeviceI8259,
60 &g_DeviceHPET,
61 &g_DeviceSmc,
62 &g_DeviceFlash,
63 &g_DeviceMC146818,
64 &g_DeviceVga,
65 &g_DeviceVMMDev,
66 &g_DevicePCNet,
67#ifdef VBOX_WITH_E1000
68 &g_DeviceE1000,
69#endif
70#ifdef VBOX_WITH_VIRTIO
71 &g_DeviceVirtioNet,
72#endif
73 &g_DeviceDP8390,
74 &g_Device3C501,
75 &g_DeviceICHAC97,
76 &g_DeviceHDA,
77#ifdef VBOX_WITH_VUSB
78 &g_DeviceOHCI,
79#endif
80#ifdef VBOX_WITH_EHCI_IMPL
81 &g_DeviceEHCI,
82#endif
83#ifdef VBOX_WITH_XHCI_IMPL
84 &g_DeviceXHCI,
85#endif
86 &g_DeviceACPI,
87 &g_DeviceDMA,
88 &g_DeviceSerialPort,
89 &g_DeviceOxPcie958,
90 &g_DeviceParallelPort,
91#ifdef VBOX_WITH_AHCI
92 &g_DeviceAHCI,
93#endif
94#ifdef VBOX_WITH_BUSLOGIC
95 &g_DeviceBusLogic,
96#endif
97 &g_DevicePCIBridge,
98 &g_DevicePciIch9Bridge,
99#ifdef VBOX_WITH_LSILOGIC
100 &g_DeviceLsiLogicSCSI,
101 &g_DeviceLsiLogicSAS,
102#endif
103#ifdef VBOX_WITH_NVME_IMPL
104 &g_DeviceNVMe,
105#endif
106#ifdef VBOX_WITH_EFI
107 &g_DeviceEFI,
108#endif
109#ifdef VBOX_WITH_VIRTIO_SCSI
110 &g_DeviceVirtioSCSI,
111#endif
112#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
113 &g_DevicePciRaw,
114#endif
115 &g_DeviceGIMDev,
116#ifdef VBOX_WITH_NEW_LPC_DEVICE
117 &g_DeviceLPC,
118#endif
119#ifdef VBOX_WITH_IOMMU_AMD
120 &g_DeviceIommuAmd,
121#endif
122#ifdef VBOX_WITH_IOMMU_INTEL
123 &g_DeviceIommuIntel,
124#endif
125#ifdef VBOX_WITH_TPM
126 &g_DeviceTpm,
127#endif
128};
129
130/**
131 * Module device registration record for VBoxDDR0.
132 */
133static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
134{
135 /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
136 /* .cDevRegs = */ RT_ELEMENTS(g_apVBoxDDR0DevRegs),
137 /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
138 /* .hMod = */ NULL,
139 /* .ListEntry = */ { NULL, NULL },
140};
141
142
143DECLEXPORT(int) ModuleInit(void *hMod)
144{
145 LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
146 return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
147}
148
149
150DECLEXPORT(void) ModuleTerm(void *hMod)
151{
152 LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
153 PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
154}
155
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use