VirtualBox

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

Last change on this file since 92901 was 91214, checked in by vboxsync, 3 years ago

Devices/: Make the TPM device accessible from R0, bugref:10075

  • 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 91214 2021-09-10 17:59:05Z vboxsync $ */
2/** @file
3 * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
4 */
5
6/*
7 * Copyright (C) 2011-2020 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#ifdef VBOX_WITH_VIRTIO_NET_1_0
64 &g_DeviceVirtioNet_1_0,
65#endif
66 &g_DeviceICHAC97,
67 &g_DeviceHDA,
68#ifdef VBOX_WITH_VUSB
69 &g_DeviceOHCI,
70#endif
71#ifdef VBOX_WITH_EHCI_IMPL
72 &g_DeviceEHCI,
73#endif
74#ifdef VBOX_WITH_XHCI_IMPL
75 &g_DeviceXHCI,
76#endif
77 &g_DeviceACPI,
78 &g_DeviceDMA,
79 &g_DeviceSerialPort,
80 &g_DeviceOxPcie958,
81 &g_DeviceParallelPort,
82#ifdef VBOX_WITH_AHCI
83 &g_DeviceAHCI,
84#endif
85#ifdef VBOX_WITH_BUSLOGIC
86 &g_DeviceBusLogic,
87#endif
88 &g_DevicePCIBridge,
89 &g_DevicePciIch9Bridge,
90#ifdef VBOX_WITH_LSILOGIC
91 &g_DeviceLsiLogicSCSI,
92 &g_DeviceLsiLogicSAS,
93#endif
94#ifdef VBOX_WITH_NVME_IMPL
95 &g_DeviceNVMe,
96#endif
97#ifdef VBOX_WITH_EFI
98 &g_DeviceEFI,
99#endif
100#ifdef VBOX_WITH_VIRTIO_SCSI
101 &g_DeviceVirtioSCSI,
102#endif
103#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
104 &g_DevicePciRaw,
105#endif
106 &g_DeviceGIMDev,
107#ifdef VBOX_WITH_NEW_LPC_DEVICE
108 &g_DeviceLPC,
109#endif
110#ifdef VBOX_WITH_IOMMU_AMD
111 &g_DeviceIommuAmd,
112#endif
113#ifdef VBOX_WITH_IOMMU_INTEL
114 &g_DeviceIommuIntel,
115#endif
116#ifdef VBOX_WITH_TPM
117 &g_DeviceTpm,
118#endif
119};
120
121/**
122 * Module device registration record for VBoxDDR0.
123 */
124static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
125{
126 /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
127 /* .cDevRegs = */ RT_ELEMENTS(g_apVBoxDDR0DevRegs),
128 /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
129 /* .hMod = */ NULL,
130 /* .ListEntry = */ { NULL, NULL },
131};
132
133
134DECLEXPORT(int) ModuleInit(void *hMod)
135{
136 LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
137 return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
138}
139
140
141DECLEXPORT(void) ModuleTerm(void *hMod)
142{
143 LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
144 PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
145}
146
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