summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:46 +0000
commitf8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch)
tree26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/Devices/build
parentInitial commit. (diff)
downloadvirtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.tar.xz
virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.zip
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/VBox/Devices/build/Makefile.kup0
-rw-r--r--src/VBox/Devices/build/VBoxDD.cpp426
-rw-r--r--src/VBox/Devices/build/VBoxDD.d34
-rw-r--r--src/VBox/Devices/build/VBoxDD.h198
-rw-r--r--src/VBox/Devices/build/VBoxDD2.cpp74
-rw-r--r--src/VBox/Devices/build/VBoxDD2.h73
-rw-r--r--src/VBox/Devices/build/VBoxDDR0.cpp32
-rw-r--r--src/VBox/Devices/build/VBoxDDUDeps.cpp54
8 files changed, 891 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..27575337
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.cpp
@@ -0,0 +1,426 @@
+/* $Id: VBoxDD.cpp $ */
+/** @file
+ * VBoxDD - Built-in drivers & devices (part 1).
+ */
+
+/*
+ * Copyright (C) 2006-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+/*********************************************************************************************************************************
+* 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
+#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
+#ifdef VBOX_ACPI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+ 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_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;
+#ifdef VBOX_WITH_NEW_LPC_DEVICE
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_VIRTUALKD
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtualKD);
+ 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
+ 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;
+#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
+
+ 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..854aa248
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.d
@@ -0,0 +1,34 @@
+/* $Id: VBoxDD.d $ */
+/** @file
+ * VBoxDD - Static dtrace probes
+ */
+
+/*
+ * Copyright (C) 2009-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+provider vboxdd
+{
+ probe hgcmcall__enter(void *pvCmd, unsigned int idFunction, unsigned int idClient, unsigned int cbCmd);
+ probe hgcmcall__completed__req(void *pvCmd, int rc);
+ probe hgcmcall__completed__emt(void *pvCmd, int rc);
+ probe hgcmcall__completed__done(void *pvCmd, unsigned int idFunction, unsigned int 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);
+};
+
+#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..228f5b03
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD.h
@@ -0,0 +1,198 @@
+/* $Id: VBoxDD.h $ */
+/** @file
+ * Built-in drivers & devices (part 1) header.
+ */
+
+/*
+ * Copyright (C) 2006-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#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
+#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_EFI
+extern const PDMDEVREG g_DeviceEFI;
+#endif
+#ifdef VBOX_WITH_PCI_PASSTHROUGH_IMPL
+extern const PDMDEVREG g_DevicePciRaw;
+#endif
+extern const PDMDEVREG g_DeviceGIMDev;
+#ifdef VBOX_WITH_NEW_LPC_DEVICE
+extern const PDMDEVREG g_DeviceLPC;
+#endif
+#ifdef VBOX_WITH_VIRTUALKD
+extern const PDMDEVREG g_DeviceVirtualKD;
+#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 */
+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;
+#if defined(RT_OS_WINDOWS)
+extern const PDMDRVREG g_DrvHostDSound;
+#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
+
+
+/* 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);
+
+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..8e6d987e
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD2.cpp
@@ -0,0 +1,74 @@
+/* $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-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+/*********************************************************************************************************************************
+* 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));
+
+#ifndef VBOX_WITH_NEW_LPC_DEVICE
+ int rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);
+ if (RT_FAILURE(rc))
+ return rc;
+#else
+ RT_NOREF(pCallbacks);
+#endif
+
+ 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..b5ee7e72
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDD2.h
@@ -0,0 +1,73 @@
+/* $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-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#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
+#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
+#endif /* !IN_VBOXDD2 */
+
+#ifndef VBOX_WITH_NEW_LPC_DEVICE
+extern const PDMDEVREG g_DeviceLPC;
+#endif
+
+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..c1fb9e4f
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDDR0.cpp
@@ -0,0 +1,32 @@
+/* $Id: VBoxDDR0.cpp $ */
+/** @file
+ * VBoxDDR0 - Built-in drivers & devices (part 1), ring-0 module.
+ */
+
+/*
+ * Copyright (C) 2011-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+/*********************************************************************************************************************************
+* Header Files *
+*********************************************************************************************************************************/
+#include <iprt/types.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
+
diff --git a/src/VBox/Devices/build/VBoxDDUDeps.cpp b/src/VBox/Devices/build/VBoxDDUDeps.cpp
new file mode 100644
index 00000000..94b0aff9
--- /dev/null
+++ b/src/VBox/Devices/build/VBoxDDUDeps.cpp
@@ -0,0 +1,54 @@
+/* $Id: VBoxDDUDeps.cpp $ */
+/** @file
+ * VBoxDDU - For dragging in library objects.
+ */
+
+/*
+ * Copyright (C) 2007-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+/*********************************************************************************************************************************
+* 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.
+ */
+PFNRT g_apfnVBoxDDUDeps[] =
+{
+ (PFNRT)VDInit,
+ (PFNRT)VDIfCreateVfsStream,
+ (PFNRT)VDIfCreateFromVfsStream,
+ (PFNRT)VDCreateVfsFileFromDisk,
+#ifdef VBOX_WITH_USB
+ (PFNRT)USBFilterInit,
+ (PFNRT)USBLibHashSerial,
+# ifdef RT_OS_OS2
+ (PFNRT)UsbOpen,
+# endif
+# if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) /* PORTME */
+ (PFNRT)USBLibInit,
+# endif
+#endif /* VBOX_WITH_USB */
+ NULL
+};
+