VBoxDD.cpp revision 025768eaba0c3e2fe6eccd3f52273faf7cb16139
52676b598e9afd834db7f3e62a983044038e92bevboxsync * VBoxDD - Built-in drivers & devices (part 1).
52676b598e9afd834db7f3e62a983044038e92bevboxsync * Copyright (C) 2006-2010 Oracle Corporation
52676b598e9afd834db7f3e62a983044038e92bevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
52676b598e9afd834db7f3e62a983044038e92bevboxsync * available from http://www.virtualbox.org. This file is free software;
52676b598e9afd834db7f3e62a983044038e92bevboxsync * you can redistribute it and/or modify it under the terms of the GNU
52676b598e9afd834db7f3e62a983044038e92bevboxsync * General Public License (GPL) as published by the Free Software
52676b598e9afd834db7f3e62a983044038e92bevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
52676b598e9afd834db7f3e62a983044038e92bevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
52676b598e9afd834db7f3e62a983044038e92bevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
52676b598e9afd834db7f3e62a983044038e92bevboxsync/*******************************************************************************
52676b598e9afd834db7f3e62a983044038e92bevboxsync* Header Files *
52676b598e9afd834db7f3e62a983044038e92bevboxsync*******************************************************************************/
52676b598e9afd834db7f3e62a983044038e92bevboxsync/*******************************************************************************
52676b598e9afd834db7f3e62a983044038e92bevboxsync* Global Variables *
52676b598e9afd834db7f3e62a983044038e92bevboxsync*******************************************************************************/
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * Register builtin devices.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @returns VBox status code.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @param pCallbacks Pointer to the callback table.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @param u32Version VBox version number.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsyncextern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync LogFlow(("VBoxDevicesRegister: u32Version=%#x\n", u32Version));
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCI);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcArch);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcBios);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePS2KeyboardMouse);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePIIX3IDE);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8254);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8259);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceHPET);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEFI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceMC146818);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVga);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVMMDev);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCNet);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceE1000);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVirtioNet);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceINIP);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceICHAC97);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSB16);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceICH6_HDA);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAudioSniffer);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceOHCI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceDMA);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceFloppyController);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSerialPort);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceParallelPort);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAHCI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceBusLogic);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCIBridge);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9Bridge);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLsiLogicSCSI);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLsiLogicSAS);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciRaw);
52676b598e9afd834db7f3e62a983044038e92bevboxsync * Register builtin drivers.
52676b598e9afd834db7f3e62a983044038e92bevboxsync * @returns VBox status code.
52676b598e9afd834db7f3e62a983044038e92bevboxsync * @param pCallbacks Pointer to the callback table.
52676b598e9afd834db7f3e62a983044038e92bevboxsync * @param u32Version VBox version number.
52676b598e9afd834db7f3e62a983044038e92bevboxsyncextern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
52676b598e9afd834db7f3e62a983044038e92bevboxsync LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync int rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMouseQueue);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvKeyboardQueue);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvBlock);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVD);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD)
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDVD);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostFloppy);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMediaISO);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRawImage);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNAT);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostInterface);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvUDPTunnel);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVDE);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvIntNet);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvDedicatedNic);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNetSniffer);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAUDIO);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvACPI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAcpiCpu);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVUSBRootHub);
52676b598e9afd834db7f3e62a983044038e92bevboxsync#if !defined(RT_OS_L4)
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNamedPipe);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRawFile);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvChar);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostParallel);
52676b598e9afd834db7f3e62a983044038e92bevboxsync#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD)
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSI);
52676b598e9afd834db7f3e62a983044038e92bevboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSIHost);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvDiskIntegrity);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * Register builtin USB device.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @returns VBox status code.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @param pCallbacks Pointer to the callback table.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync * @param u32Version VBox version number.
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsyncextern "C" DECLEXPORT(int) VBoxUsbRegister(PCPDMUSBREGCB pCallbacks, uint32_t u32Version)
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbDevProxy);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbMsd);
a41a001e5a4dd3f39faab90b412243ced6d59394vboxsync rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbHidKbd);