VirtualBox

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

Last change on this file since 82331 was 81512, checked in by vboxsync, 5 years ago

DevFlash: Converted to new style and added and enabled ring-0 bits. bugref:9218

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/* $Id: VBoxDDR0.cpp 81512 2019-10-24 09:19:42Z vboxsync $ */
2/** @file
3 * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
4 */
5
6/*
7 * Copyright (C) 2011-2019 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_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_EFI
95 &g_DeviceEFI,
96#endif
97#ifdef VBOX_WITH_VIRTIO_SCSI
98 &g_DeviceVirtioSCSI,
99#endif
100#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
101 &g_DevicePciRaw,
102#endif
103 &g_DeviceGIMDev,
104#ifdef VBOX_WITH_NEW_LPC_DEVICE
105 &g_DeviceLPC,
106#endif
107};
108
109/**
110 * Module device registration record for VBoxDDR0.
111 */
112static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
113{
114 /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
115 /* .cDevRegs = */ RT_ELEMENTS(g_apVBoxDDR0DevRegs),
116 /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
117 /* .hMod = */ NULL,
118 /* .ListEntry = */ { NULL, NULL },
119};
120
121
122DECLEXPORT(int) ModuleInit(void *hMod)
123{
124 LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
125 return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
126}
127
128
129DECLEXPORT(void) ModuleTerm(void *hMod)
130{
131 LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
132 PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
133}
134
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