summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:17:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:17:27 +0000
commitf215e02bf85f68d3a6106c2a1f4f7f063f819064 (patch)
tree6bb5b92c046312c4e95ac2620b10ddf482d3fa8b /src/VBox/Devices/build
parentInitial commit. (diff)
downloadvirtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.tar.xz
virtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.zip
Adding upstream version 7.0.14-dfsg.upstream/7.0.14-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/build')
-rw-r--r--src/VBox/Devices/build/Makefile.kup0
-rw-r--r--src/VBox/Devices/build/VBoxDD.cpp495
-rw-r--r--src/VBox/Devices/build/VBoxDD.d53
-rw-r--r--src/VBox/Devices/build/VBoxDD.h245
-rw-r--r--src/VBox/Devices/build/VBoxDD2.cpp78
-rw-r--r--src/VBox/Devices/build/VBoxDD2.h90
-rw-r--r--src/VBox/Devices/build/VBoxDDR0.cpp155
-rw-r--r--src/VBox/Devices/build/VBoxDDUDeps.cpp65
8 files changed, 1181 insertions, 0 deletions
diff --git a/src/VBox/Devices/build/Makefile.kup b/src/VBox/Devices/build/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/VBox/Devices/build/Makefile.kup
diff --git a/src/VBox/Devices/build/VBoxDD.cpp b/src/VBox/Devices/build/VBoxDD.cpp
new file mode 100644
index 00000000..36b12c69
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.cpp
@@ -0,0 +1,495 @@
+/* $Id: VBoxDD.cpp $ */
+/** @file
+ * VBoxDD - Built-in drivers & devices (part 1).
+ */
+
+/*
+ * Copyright (C) 2006-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_DEV
+#include <VBox/vmm/pdm.h>
+#include <VBox/version.h>
+#include <iprt/errcore.h>
+#include <VBox/usb.h>
+
+#include <VBox/log.h>
+#include <iprt/assert.h>
+
+#include "VBoxDD.h"
+
+
+/*********************************************************************************************************************************
+* Global Variables *
+*********************************************************************************************************************************/
+const void *g_apvVBoxDDDependencies[] =
+{
+ NULL,
+};
+
+
+/**
+ * Register builtin devices.
+ *
+ * @returns VBox status code.
+ * @param pCallbacks Pointer to the callback table.
+ * @param u32Version VBox version number.
+ */
+extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
+{
+ LogFlow(("VBoxDevicesRegister: u32Version=%#x\n", u32Version));
+ AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
+ int rc;
+
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCI);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcArch);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcBios);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceIOAPIC);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePS2KeyboardMouse);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePIIX3IDE);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8254);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8259);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceHPET);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSmc);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceFlash);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_EFI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEFI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceMC146818);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVga);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVMMDev);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCNet);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_E1000
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceE1000);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_VIRTIO
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtioNet);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceDP8390);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_Device3C501);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_INIP
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceINIP);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceICHAC97);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSB16);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceHDA);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_VUSB
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceOHCI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_EHCI_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_XHCI_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceXHCI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceDMA);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceFloppyController);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSerialPort);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceOxPcie958);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceParallelPort);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_AHCI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAHCI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_BUSLOGIC
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceBusLogic);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCIBridge);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9Bridge);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_LSILOGIC
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLsiLogicSCSI);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLsiLogicSAS);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_NVME_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceNVMe);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_VIRTIO_SCSI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtioSCSI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciRaw);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceGIMDev);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_VIRTUALKD
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtualKD);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_IOMMU_AMD
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceIommuAmd);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_IOMMU_INTEL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceIommuIntel);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceQemuFwCfg);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_TPM
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceTpm);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+
+ return VINF_SUCCESS;
+}
+
+
+/**
+ * Register builtin drivers.
+ *
+ * @returns VBox status code.
+ * @param pCallbacks Pointer to the callback table.
+ * @param u32Version VBox version number.
+ */
+extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
+{
+ LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
+ AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
+
+ int rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMouseQueue);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvKeyboardQueue);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVD);
+ if (RT_FAILURE(rc))
+ return rc;
+#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDVD);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostFloppy);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNAT);
+ if (RT_FAILURE(rc))
+ return rc;
+#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostInterface);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_UDPTUNNEL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvUDPTunnel);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_VDE
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVDE);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvIntNet);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvDedicatedNic);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNetSniffer);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_NETSHAPER
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNetShaper);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_VMNET
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVMNet);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif /* VBOX_WITH_VMNET */
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAUDIO);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_AUDIO_DEBUG
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDebugAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostValidationKitAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostNullAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#if defined(RT_OS_WINDOWS)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDSound);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostAudioWas);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#if defined(RT_OS_DARWIN)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostCoreAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_AUDIO_ALSA
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostALSAAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_AUDIO_OSS
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_AUDIO_PULSE
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostPulseAudio);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvACPI);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAcpiCpu);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_VUSB
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVUSBRootHub);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_USB_VIDEO_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostWebcam);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNamedPipe);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvTCP);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvUDP);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRawFile);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvChar);
+ if (RT_FAILURE(rc))
+ return rc;
+#if defined(RT_OS_LINUX) || defined(VBOX_WITH_WIN_PARPORT_SUP)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostParallel);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD)
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_SCSI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_DRV_DISK_INTEGRITY
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvDiskIntegrity);
+ if (RT_FAILURE(rc))
+ return rc;
+
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRamDisk);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvPciRaw);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvIfTrace);
+ if (RT_FAILURE(rc))
+ return rc;
+#ifdef VBOX_WITH_TPM
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvTpmEmu);
+ if (RT_FAILURE(rc))
+ return rc;
+
+# ifdef RT_OS_LINUX
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvTpmHost);
+ if (RT_FAILURE(rc))
+ return rc;
+# endif
+
+# ifdef VBOX_WITH_LIBTPMS
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvTpmEmuTpms);
+ if (RT_FAILURE(rc))
+ return rc;
+# endif
+
+# ifdef VBOX_WITH_CLOUD_NET
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvCloudTunnel);
+ if (RT_FAILURE(rc))
+ return rc;
+# endif
+#endif
+
+ return VINF_SUCCESS;
+}
+
+
+/**
+ * Register builtin USB device.
+ *
+ * @returns VBox status code.
+ * @param pCallbacks Pointer to the callback table.
+ * @param u32Version VBox version number.
+ */
+extern "C" DECLEXPORT(int) VBoxUsbRegister(PCPDMUSBREGCB pCallbacks, uint32_t u32Version)
+{
+ int rc = VINF_SUCCESS;
+ RT_NOREF1(u32Version);
+
+#ifdef VBOX_WITH_USB
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbDevProxy);
+ if (RT_FAILURE(rc))
+ return rc;
+# ifdef VBOX_WITH_SCSI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbMsd);
+ if (RT_FAILURE(rc))
+ return rc;
+# endif
+#endif
+#ifdef VBOX_WITH_VUSB
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbHidKbd);
+ if (RT_FAILURE(rc))
+ return rc;
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbHidMou);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_USB_VIDEO_IMPL
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DevWebcam);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+
+ return rc;
+}
diff --git a/src/VBox/Devices/build/VBoxDD.d b/src/VBox/Devices/build/VBoxDD.d
new file mode 100644
index 00000000..182c6629
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.d
@@ -0,0 +1,53 @@
+/* $Id: VBoxDD.d $ */
+/** @file
+ * VBoxDD - Static dtrace probes
+ */
+
+/*
+ * Copyright (C) 2009-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+provider vboxdd
+{
+ probe hgcmcall__enter(void *pvCmd, uint32_t idFunction, uint32_t idClient, uint32_t cbCmd);
+ probe hgcmcall__completed__req(void *pvCmd, int rc);
+ probe hgcmcall__completed__emt(void *pvCmd, int rc);
+ probe hgcmcall__completed__done(void *pvCmd, uint32_t idFunction, uint32_t idClient, int rc);
+
+ probe ahci__req__submit(void *pvReq, int iTxDir, uint64_t offStart, uint64_t cbXfer);
+ probe ahci__req__completed(void *pvReq, int rcReq, uint64_t offStart, uint64_t cbXfer);
+
+ probe hda__stream__setup(uint32_t idxStream, int32_t rc, uint32_t uHz, uint64_t cTicksPeriod, uint32_t cbPeriod);
+ probe hda__stream__reset(uint32_t idxStream);
+ probe hda__stream__dma__out(uint32_t idxStream, uint32_t cb, uint64_t off);
+ probe hda__stream__dma__in(uint32_t idxStream, uint32_t cb, uint64_t off);
+ probe hda__stream__dma__flowerror(uint32_t idxStream, uint32_t cbFree, uint32_t cbPeriod, int32_t fOverflow);
+
+ probe audio__mixer__sink__aio__out(uint32_t idxStream, uint32_t cb, uint64_t off);
+ probe audio__mixer__sink__aio__in(uint32_t idxStream, uint32_t cb, uint64_t off);
+};
+
+#pragma D attributes Evolving/Evolving/Common provider vboxdd provider
+#pragma D attributes Private/Private/Unknown provider vboxdd module
+#pragma D attributes Private/Private/Unknown provider vboxdd function
+#pragma D attributes Evolving/Evolving/Common provider vboxdd name
+#pragma D attributes Evolving/Evolving/Common provider vboxdd args
+
diff --git a/src/VBox/Devices/build/VBoxDD.h b/src/VBox/Devices/build/VBoxDD.h
new file mode 100644
index 00000000..9350f428
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.h
@@ -0,0 +1,245 @@
+/* $Id: VBoxDD.h $ */
+/** @file
+ * Built-in drivers & devices (part 1) header.
+ */
+
+/*
+ * Copyright (C) 2006-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+#ifndef VBOX_INCLUDED_SRC_build_VBoxDD_h
+#define VBOX_INCLUDED_SRC_build_VBoxDD_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <VBox/vmm/pdm.h>
+
+RT_C_DECLS_BEGIN
+
+/** The default BIOS logo data. */
+extern const unsigned char g_abVgaDefBiosLogo[];
+extern const unsigned char g_abVgaDefBiosLogoNY[];
+/** The size of the default BIOS logo data. */
+extern const unsigned g_cbVgaDefBiosLogo;
+extern const unsigned g_cbVgaDefBiosLogoNY;
+
+
+extern const PDMDEVREG g_DevicePCI;
+extern const PDMDEVREG g_DevicePciIch9;
+extern const PDMDEVREG g_DevicePcArch;
+extern const PDMDEVREG g_DevicePcBios;
+extern const PDMDEVREG g_DeviceIOAPIC;
+extern const PDMDEVREG g_DevicePS2KeyboardMouse;
+extern const PDMDEVREG g_DeviceI8254;
+extern const PDMDEVREG g_DeviceI8259;
+extern const PDMDEVREG g_DeviceHPET;
+extern const PDMDEVREG g_DeviceSmc;
+extern const PDMDEVREG g_DeviceFlash;
+extern const PDMDEVREG g_DeviceMC146818;
+extern const PDMDEVREG g_DevicePIIX3IDE;
+extern const PDMDEVREG g_DeviceFloppyController;
+extern const PDMDEVREG g_DeviceVga;
+extern const PDMDEVREG g_DeviceVMMDev;
+extern const PDMDEVREG g_DevicePCNet;
+#ifdef VBOX_WITH_E1000
+extern const PDMDEVREG g_DeviceE1000;
+#endif
+#ifdef VBOX_WITH_VIRTIO
+extern const PDMDEVREG g_DeviceVirtioNet;
+#endif
+extern const PDMDEVREG g_DeviceDP8390;
+extern const PDMDEVREG g_Device3C501;
+#ifdef VBOX_WITH_INIP
+extern const PDMDEVREG g_DeviceINIP;
+#endif
+extern const PDMDEVREG g_DeviceICHAC97;
+extern const PDMDEVREG g_DeviceSB16;
+extern const PDMDEVREG g_DeviceHDA;
+extern const PDMDEVREG g_DeviceOHCI;
+extern const PDMDEVREG g_DeviceEHCI;
+extern const PDMDEVREG g_DeviceXHCI;
+extern const PDMDEVREG g_DeviceACPI;
+extern const PDMDEVREG g_DeviceDMA;
+extern const PDMDEVREG g_DeviceFloppyController;
+extern const PDMDEVREG g_DeviceSerialPort;
+extern const PDMDEVREG g_DeviceOxPcie958;
+extern const PDMDEVREG g_DeviceParallelPort;
+#ifdef VBOX_WITH_AHCI
+extern const PDMDEVREG g_DeviceAHCI;
+#endif
+#ifdef VBOX_WITH_BUSLOGIC
+extern const PDMDEVREG g_DeviceBusLogic;
+#endif
+extern const PDMDEVREG g_DevicePCIBridge;
+extern const PDMDEVREG g_DevicePciIch9Bridge;
+#ifdef VBOX_WITH_LSILOGIC
+extern const PDMDEVREG g_DeviceLsiLogicSCSI;
+extern const PDMDEVREG g_DeviceLsiLogicSAS;
+#endif
+#ifdef VBOX_WITH_NVME_IMPL
+extern const PDMDEVREG g_DeviceNVMe;
+#endif
+#ifdef VBOX_WITH_VIRTIO_SCSI
+extern const PDMDEVREG g_DeviceVirtioSCSI;
+#endif
+#ifdef VBOX_WITH_EFI
+extern const PDMDEVREG g_DeviceEFI;
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+extern const PDMDEVREG g_DevicePciRaw;
+#endif
+extern const PDMDEVREG g_DeviceGIMDev;
+extern const PDMDEVREG g_DeviceLPC;
+#ifdef VBOX_WITH_VIRTUALKD
+extern const PDMDEVREG g_DeviceVirtualKD;
+#endif
+extern const PDMDEVREG g_DeviceQemuFwCfg;
+#ifdef VBOX_WITH_TPM
+extern const PDMDEVREG g_DeviceTpm;
+#endif
+
+extern const PDMDRVREG g_DrvMouseQueue;
+extern const PDMDRVREG g_DrvKeyboardQueue;
+extern const PDMDRVREG g_DrvVBoxHDD;
+extern const PDMDRVREG g_DrvVD;
+extern const PDMDRVREG g_DrvHostDVD;
+extern const PDMDRVREG g_DrvHostFloppy;
+extern const PDMDRVREG g_DrvISCSI;
+extern const PDMDRVREG g_DrvISCSITransportTcp;
+#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+extern const PDMDRVREG g_DrvHostInterface;
+#endif
+#ifdef VBOX_WITH_UDPTUNNEL
+extern const PDMDRVREG g_DrvUDPTunnel;
+#endif
+#ifdef VBOX_WITH_VDE
+extern const PDMDRVREG g_DrvVDE;
+#endif
+extern const PDMDRVREG g_DrvIntNet;
+extern const PDMDRVREG g_DrvDedicatedNic;
+extern const PDMDRVREG g_DrvNAT;
+#ifdef VBOX_WITH_NETSHAPER
+extern const PDMDRVREG g_DrvNetShaper;
+#endif /* VBOX_WITH_NETSHAPER */
+#ifdef VBOX_WITH_VMNET
+extern const PDMDRVREG g_DrvVMNet;
+#endif /* VBOX_WITH_VMNET */
+extern const PDMDRVREG g_DrvNetSniffer;
+extern const PDMDRVREG g_DrvAUDIO;
+#ifdef VBOX_WITH_AUDIO_DEBUG
+extern const PDMDRVREG g_DrvHostDebugAudio;
+#endif
+#ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
+extern const PDMDRVREG g_DrvHostValidationKitAudio;
+#endif
+extern const PDMDRVREG g_DrvHostNullAudio;
+extern DECL_HIDDEN_DATA(struct PDMIHOSTAUDIO) const g_DrvHostAudioNull;
+#if defined(RT_OS_WINDOWS)
+extern const PDMDRVREG g_DrvHostDSound;
+extern const PDMDRVREG g_DrvHostAudioWas;
+#endif
+#if defined(RT_OS_DARWIN)
+extern const PDMDRVREG g_DrvHostCoreAudio;
+#endif
+#ifdef VBOX_WITH_AUDIO_OSS
+extern const PDMDRVREG g_DrvHostOSSAudio;
+#endif
+#ifdef VBOX_WITH_AUDIO_ALSA
+extern const PDMDRVREG g_DrvHostALSAAudio;
+#endif
+#ifdef VBOX_WITH_AUDIO_PULSE
+extern const PDMDRVREG g_DrvHostPulseAudio;
+#endif
+extern const PDMDRVREG g_DrvACPI;
+extern const PDMDRVREG g_DrvAcpiCpu;
+extern const PDMDRVREG g_DrvVUSBRootHub;
+#ifdef VBOX_WITH_USB_VIDEO_IMPL
+extern const PDMDRVREG g_DrvHostWebcam;
+#endif
+extern const PDMDRVREG g_DrvChar;
+extern const PDMDRVREG g_DrvNamedPipe;
+extern const PDMDRVREG g_DrvTCP;
+extern const PDMDRVREG g_DrvUDP;
+extern const PDMDRVREG g_DrvRawFile;
+extern const PDMDRVREG g_DrvHostParallel;
+extern const PDMDRVREG g_DrvHostSerial;
+#ifdef VBOX_WITH_DRV_DISK_INTEGRITY
+extern const PDMDRVREG g_DrvDiskIntegrity;
+extern const PDMDRVREG g_DrvRamDisk;
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+extern const PDMDRVREG g_DrvPciRaw;
+#endif
+
+#ifdef VBOX_WITH_USB
+extern const PDMUSBREG g_UsbDevProxy;
+extern const PDMUSBREG g_UsbMsd;
+#endif
+#ifdef VBOX_WITH_VUSB
+extern const PDMUSBREG g_UsbHid;
+extern const PDMUSBREG g_UsbHidKbd;
+extern const PDMUSBREG g_UsbHidMou;
+#endif
+#ifdef VBOX_WITH_USB_VIDEO_IMPL
+extern const PDMUSBREG g_DevWebcam;
+#endif
+
+#ifdef VBOX_WITH_SCSI
+extern const PDMDRVREG g_DrvSCSI;
+#endif
+
+extern const PDMDRVREG g_DrvIfTrace;
+#ifdef VBOX_WITH_TPM
+extern const PDMDRVREG g_DrvTpmEmu;
+# ifdef RT_OS_LINUX
+extern const PDMDRVREG g_DrvTpmHost;
+# endif
+# ifdef VBOX_WITH_LIBTPMS
+extern const PDMDRVREG g_DrvTpmEmuTpms;
+# endif
+# ifdef VBOX_WITH_CLOUD_NET
+extern const PDMDRVREG g_DrvCloudTunnel;
+# endif
+#endif
+
+#ifdef VBOX_WITH_IOMMU_AMD
+extern const PDMDEVREG g_DeviceIommuAmd;
+#endif
+#ifdef VBOX_WITH_IOMMU_INTEL
+extern const PDMDEVREG g_DeviceIommuIntel;
+#endif
+
+/* VBoxAcpi.cpp */
+int acpiPrepareDsdt(PPDMDEVINS pDevIns, void **ppvPtr, size_t *pcbDsdt);
+int acpiCleanupDsdt(PPDMDEVINS pDevIns, void *pvPtr);
+int acpiPrepareSsdt(PPDMDEVINS pDevIns, void **ppvPtr, size_t *pcbSsdt);
+int acpiCleanupSsdt(PPDMDEVINS pDevIns, void *pvPtr);
+
+#ifdef VBOX_WITH_TPM
+int acpiPrepareTpmSsdt(PPDMDEVINS pDevIns, void **ppvPtr, size_t *pcbSsdt);
+int acpiCleanupTpmSsdt(PPDMDEVINS pDevIns, void *pvPtr);
+#endif
+
+RT_C_DECLS_END
+
+#endif /* !VBOX_INCLUDED_SRC_build_VBoxDD_h */
+
diff --git a/src/VBox/Devices/build/VBoxDD2.cpp b/src/VBox/Devices/build/VBoxDD2.cpp
new file mode 100644
index 00000000..9009724e
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD2.cpp
@@ -0,0 +1,78 @@
+/* $Id: VBoxDD2.cpp $ */
+/** @file
+ * VBoxDD2 - Built-in drivers & devices part 2.
+ *
+ * These drivers and devices are in separate modules because of LGPL.
+ */
+
+/*
+ * Copyright (C) 2006-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_DEV
+#include <VBox/vmm/pdm.h>
+#include <VBox/version.h>
+#include <iprt/errcore.h>
+
+#include <VBox/log.h>
+#include <iprt/assert.h>
+
+#include "VBoxDD2.h"
+
+
+/*********************************************************************************************************************************
+* Global Variables *
+*********************************************************************************************************************************/
+const void *g_apvVBoxDDDependencies2[] =
+{
+ (void *)&g_abPcBiosBinary386,
+ (void *)&g_abPcBiosBinary286,
+ (void *)&g_abPcBiosBinary8086,
+ (void *)&g_abVgaBiosBinary386,
+ (void *)&g_abVgaBiosBinary286,
+ (void *)&g_abVgaBiosBinary8086,
+#ifdef VBOX_WITH_PXE_ROM
+ (void *)&g_abNetBiosBinary,
+#endif
+};
+
+
+/**
+ * Register builtin devices.
+ *
+ * @returns VBox status code.
+ * @param pCallbacks Pointer to the callback table.
+ * @param u32Version VBox version number.
+ */
+extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
+{
+ LogFlow(("VBoxDevicesRegister: u32Version=%#x\n", u32Version));
+ AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
+
+ RT_NOREF(pCallbacks);
+
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/Devices/build/VBoxDD2.h b/src/VBox/Devices/build/VBoxDD2.h
new file mode 100644
index 00000000..98b003bf
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD2.h
@@ -0,0 +1,90 @@
+/* $Id: VBoxDD2.h $ */
+/** @file
+ * Built-in drivers & devices part 2 header.
+ *
+ * These drivers and devices are in separate modules because of LGPL.
+ */
+
+/*
+ * Copyright (C) 2006-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+#ifndef VBOX_INCLUDED_SRC_build_VBoxDD2_h
+#define VBOX_INCLUDED_SRC_build_VBoxDD2_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <VBox/vmm/pdm.h>
+
+RT_C_DECLS_BEGIN
+
+#ifdef IN_VBOXDD2
+extern DECLEXPORT(const unsigned char) g_abPcBiosBinary386[];
+extern DECLEXPORT(const unsigned) g_cbPcBiosBinary386;
+extern DECLEXPORT(const unsigned char) g_abPcBiosBinary286[];
+extern DECLEXPORT(const unsigned) g_cbPcBiosBinary286;
+extern DECLEXPORT(const unsigned char) g_abPcBiosBinary8086[];
+extern DECLEXPORT(const unsigned) g_cbPcBiosBinary8086;
+extern DECLEXPORT(const unsigned char) g_abVgaBiosBinary386[];
+extern DECLEXPORT(const unsigned) g_cbVgaBiosBinary386;
+extern DECLEXPORT(const unsigned char) g_abVgaBiosBinary286[];
+extern DECLEXPORT(const unsigned) g_cbVgaBiosBinary286;
+extern DECLEXPORT(const unsigned char) g_abVgaBiosBinary8086[];
+extern DECLEXPORT(const unsigned) g_cbVgaBiosBinary8086;
+# ifdef VBOX_WITH_PXE_ROM
+extern DECLEXPORT(const unsigned char) g_abNetBiosBinary[];
+extern DECLEXPORT(const unsigned) g_cbNetBiosBinary;
+# endif
+# ifdef VBOX_WITH_EFI_IN_DD2
+extern DECLEXPORT(const unsigned char) g_abEfiFirmware32[];
+extern DECLEXPORT(const unsigned) g_cbEfiFirmware32;
+extern DECLEXPORT(const unsigned char) g_abEfiFirmware64[];
+extern DECLEXPORT(const unsigned) g_cbEfiFirmware64;
+# endif
+#else /* !IN_VBOXDD2 */
+extern DECLIMPORT(const unsigned char) g_abPcBiosBinary386[];
+extern DECLIMPORT(const unsigned) g_cbPcBiosBinary386;
+extern DECLIMPORT(const unsigned char) g_abPcBiosBinary286[];
+extern DECLIMPORT(const unsigned) g_cbPcBiosBinary286;
+extern DECLIMPORT(const unsigned char) g_abPcBiosBinary8086[];
+extern DECLIMPORT(const unsigned) g_cbPcBiosBinary8086;
+extern DECLIMPORT(const unsigned char) g_abVgaBiosBinary386[];
+extern DECLIMPORT(const unsigned) g_cbVgaBiosBinary386;
+extern DECLIMPORT(const unsigned char) g_abVgaBiosBinary286[];
+extern DECLIMPORT(const unsigned) g_cbVgaBiosBinary286;
+extern DECLIMPORT(const unsigned char) g_abVgaBiosBinary8086[];
+extern DECLIMPORT(const unsigned) g_cbVgaBiosBinary8086;
+# ifdef VBOX_WITH_PXE_ROM
+extern DECLIMPORT(const unsigned char) g_abNetBiosBinary[];
+extern DECLIMPORT(const unsigned) g_cbNetBiosBinary;
+# endif
+# ifdef VBOX_WITH_EFI_IN_DD2
+extern DECLIMPORT(const unsigned char) g_abEfiFirmware32[];
+extern DECLIMPORT(const unsigned) g_cbEfiFirmware32;
+extern DECLIMPORT(const unsigned char) g_abEfiFirmware64[];
+extern DECLIMPORT(const unsigned) g_cbEfiFirmware64;
+# endif
+#endif /* !IN_VBOXDD2 */
+
+RT_C_DECLS_END
+
+#endif /* !VBOX_INCLUDED_SRC_build_VBoxDD2_h */
diff --git a/src/VBox/Devices/build/VBoxDDR0.cpp b/src/VBox/Devices/build/VBoxDDR0.cpp
new file mode 100644
index 00000000..0a37bda5
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDDR0.cpp
@@ -0,0 +1,155 @@
+/* $Id: VBoxDDR0.cpp $ */
+/** @file
+ * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
+ */
+
+/*
+ * Copyright (C) 2011-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_DEV
+#include <VBox/log.h>
+#include <VBox/sup.h>
+#include <VBox/vmm/pdmdev.h>
+
+#include "VBoxDD.h"
+
+
+/*********************************************************************************************************************************
+* Global Variables *
+*********************************************************************************************************************************/
+#if defined(RT_OS_SOLARIS) && defined(IN_RING0)
+/* Dependency information for the native solaris loader. */
+extern "C" { char _depends_on[] = "vboxdrv VMMR0.r0"; }
+#endif
+
+/**
+ * Pointer to the ring-0 device registrations for VBoxDDR0.
+ */
+static PCPDMDEVREGR0 g_apVBoxDDR0DevRegs[] =
+{
+ &g_DevicePCI,
+ &g_DevicePciIch9,
+ &g_DeviceIOAPIC,
+ &g_DevicePS2KeyboardMouse,
+ &g_DevicePIIX3IDE,
+ &g_DeviceI8254,
+ &g_DeviceI8259,
+ &g_DeviceHPET,
+ &g_DeviceSmc,
+ &g_DeviceFlash,
+ &g_DeviceMC146818,
+ &g_DeviceVga,
+ &g_DeviceVMMDev,
+ &g_DevicePCNet,
+#ifdef VBOX_WITH_E1000
+ &g_DeviceE1000,
+#endif
+#ifdef VBOX_WITH_VIRTIO
+ &g_DeviceVirtioNet,
+#endif
+ &g_DeviceDP8390,
+ &g_Device3C501,
+ &g_DeviceICHAC97,
+ &g_DeviceHDA,
+#ifdef VBOX_WITH_VUSB
+ &g_DeviceOHCI,
+#endif
+#ifdef VBOX_WITH_EHCI_IMPL
+ &g_DeviceEHCI,
+#endif
+#ifdef VBOX_WITH_XHCI_IMPL
+ &g_DeviceXHCI,
+#endif
+ &g_DeviceACPI,
+ &g_DeviceDMA,
+ &g_DeviceSerialPort,
+ &g_DeviceOxPcie958,
+ &g_DeviceParallelPort,
+#ifdef VBOX_WITH_AHCI
+ &g_DeviceAHCI,
+#endif
+#ifdef VBOX_WITH_BUSLOGIC
+ &g_DeviceBusLogic,
+#endif
+ &g_DevicePCIBridge,
+ &g_DevicePciIch9Bridge,
+#ifdef VBOX_WITH_LSILOGIC
+ &g_DeviceLsiLogicSCSI,
+ &g_DeviceLsiLogicSAS,
+#endif
+#ifdef VBOX_WITH_NVME_IMPL
+ &g_DeviceNVMe,
+#endif
+#ifdef VBOX_WITH_EFI
+ &g_DeviceEFI,
+#endif
+#ifdef VBOX_WITH_VIRTIO_SCSI
+ &g_DeviceVirtioSCSI,
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+ &g_DevicePciRaw,
+#endif
+ &g_DeviceGIMDev,
+#ifdef VBOX_WITH_NEW_LPC_DEVICE
+ &g_DeviceLPC,
+#endif
+#ifdef VBOX_WITH_IOMMU_AMD
+ &g_DeviceIommuAmd,
+#endif
+#ifdef VBOX_WITH_IOMMU_INTEL
+ &g_DeviceIommuIntel,
+#endif
+#ifdef VBOX_WITH_TPM
+ &g_DeviceTpm,
+#endif
+};
+
+/**
+ * Module device registration record for VBoxDDR0.
+ */
+static PDMDEVMODREGR0 g_VBoxDDR0ModDevReg =
+{
+ /* .u32Version = */ PDM_DEVMODREGR0_VERSION,
+ /* .cDevRegs = */ RT_ELEMENTS(g_apVBoxDDR0DevRegs),
+ /* .papDevRegs = */ &g_apVBoxDDR0DevRegs[0],
+ /* .hMod = */ NULL,
+ /* .ListEntry = */ { NULL, NULL },
+};
+
+
+DECLEXPORT(int) ModuleInit(void *hMod)
+{
+ LogFlow(("VBoxDDR0/ModuleInit: %p\n", hMod));
+ return PDMR0DeviceRegisterModule(hMod, &g_VBoxDDR0ModDevReg);
+}
+
+
+DECLEXPORT(void) ModuleTerm(void *hMod)
+{
+ LogFlow(("VBoxDDR0/ModuleTerm: %p\n", hMod));
+ PDMR0DeviceDeregisterModule(hMod, &g_VBoxDDR0ModDevReg);
+}
+
diff --git a/src/VBox/Devices/build/VBoxDDUDeps.cpp b/src/VBox/Devices/build/VBoxDDUDeps.cpp
new file mode 100644
index 00000000..62f591cc
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDDUDeps.cpp
@@ -0,0 +1,65 @@
+/* $Id: VBoxDDUDeps.cpp $ */
+/** @file
+ * VBoxDDU - For dragging in library objects.
+ */
+
+/*
+ * Copyright (C) 2007-2023 Oracle and/or its affiliates.
+ *
+ * This file is part of VirtualBox base platform packages, as
+ * available from https://www.virtualbox.org.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, in version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#include <VBox/types.h>
+#include <VBox/vd.h>
+#ifdef VBOX_WITH_USB
+# include <VBox/usblib.h>
+# include <VBox/usbfilter.h>
+# ifdef RT_OS_OS2
+# include <os2.h>
+# include <usbcalls.h>
+# endif
+#endif
+
+/** Just a dummy global structure containing a bunch of
+ * function pointers to code which is wanted in the link.
+ */
+struct CLANG11WEIRDNESS { PFNRT pfn; } g_apfnVBoxDDUDeps[] =
+{
+ { (PFNRT)VDInit },
+ { (PFNRT)VDIfCreateVfsStream },
+ { (PFNRT)VDIfCreateFromVfsStream },
+ { (PFNRT)VDCreateVfsFileFromDisk },
+ { (PFNRT)VDIfTcpNetInstDefaultCreate },
+#ifdef VBOX_WITH_USB
+ { (PFNRT)USBFilterInit },
+ { (PFNRT)USBLibHashSerial },
+# ifdef RT_OS_OS2
+ { (PFNRT)UsbOpen },
+# endif
+# if defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) /* PORTME */
+ { (PFNRT)USBLibInit },
+# endif
+#endif /* VBOX_WITH_USB */
+ { NULL },
+};
+