VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp@ 102493

Last change on this file since 102493 was 100038, checked in by vboxsync, 18 months ago

Main: Start simple ResourceStore implementation similar to NvramStore but without all the file loading and saving as it will contain only resources created on the fly when the VM is created, bugref:10467

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 100038 2023-06-01 18:18:08Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
9 *
10 * This file is part of VirtualBox base platform packages, as
11 * available from https://www.virtualbox.org.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation, in version 3 of the
16 * License.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses>.
25 *
26 * SPDX-License-Identifier: GPL-3.0-only
27 */
28
29
30/*********************************************************************************************************************************
31* Header Files *
32*********************************************************************************************************************************/
33#define LOG_GROUP LOG_GROUP_MAIN
34#include "LoggingNew.h"
35
36#include "MouseImpl.h"
37#include "KeyboardImpl.h"
38#include "DisplayImpl.h"
39#include "VMMDev.h"
40#include "NvramStoreImpl.h"
41#ifdef VBOX_WITH_AUDIO_VRDE
42# include "DrvAudioVRDE.h"
43#endif
44#ifdef VBOX_WITH_AUDIO_RECORDING
45# include "DrvAudioRec.h"
46#endif
47#include "UsbWebcamInterface.h"
48#ifdef VBOX_WITH_USB_CARDREADER
49# include "UsbCardReader.h"
50#endif
51#include "ConsoleImpl.h"
52#ifdef VBOX_WITH_PCI_PASSTHROUGH
53# include "PCIRawDevImpl.h"
54#endif
55#ifdef VBOX_WITH_VIRT_ARMV8
56# include "ResourceStoreImpl.h"
57#endif
58
59#include <VBox/vmm/pdmdrv.h>
60#include <VBox/version.h>
61
62
63/**
64 * Register the main drivers.
65 *
66 * @returns VBox status code.
67 * @param pCallbacks Pointer to the callback table.
68 * @param u32Version VBox version number.
69 */
70extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
71{
72 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
73 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
74
75 int vrc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
76 if (RT_FAILURE(vrc))
77 return vrc;
78
79 vrc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
80 if (RT_FAILURE(vrc))
81 return vrc;
82
83 vrc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
84 if (RT_FAILURE(vrc))
85 return vrc;
86
87 vrc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
88 if (RT_FAILURE(vrc))
89 return vrc;
90#ifdef VBOX_WITH_AUDIO_VRDE
91 vrc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
92 if (RT_FAILURE(vrc))
93 return vrc;
94#endif
95#ifdef VBOX_WITH_AUDIO_RECORDING
96 vrc = pCallbacks->pfnRegister(pCallbacks, &AudioVideoRec::DrvReg);
97 if (RT_FAILURE(vrc))
98 return vrc;
99#endif
100
101 vrc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
102 if (RT_FAILURE(vrc))
103 return vrc;
104
105#ifdef VBOX_WITH_USB_CARDREADER
106 vrc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
107 if (RT_FAILURE(vrc))
108 return vrc;
109#endif
110
111 vrc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
112 if (RT_FAILURE(vrc))
113 return vrc;
114
115#ifdef VBOX_WITH_PCI_PASSTHROUGH
116 vrc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
117 if (RT_FAILURE(vrc))
118 return vrc;
119#endif
120
121 vrc = pCallbacks->pfnRegister(pCallbacks, &NvramStore::DrvReg);
122 if (RT_FAILURE(vrc))
123 return vrc;
124
125#ifdef VBOX_WITH_VIRT_ARMV8
126 vrc = pCallbacks->pfnRegister(pCallbacks, &ResourceStore::DrvReg);
127 if (RT_FAILURE(vrc))
128 return vrc;
129#endif
130
131 return VINF_SUCCESS;
132}
133/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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