VirtualBox

Changeset 64396 in vbox for trunk


Ignore:
Timestamp:
Oct 24, 2016 3:01:45 PM (8 years ago)
Author:
vboxsync
Message:

PDMPCIDEV: some docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r64373 r64396  
    4141 * will call the entry point 'VBoxDevicesRegister' when loading a device module.
    4242 * The device module will then use the supplied callback table to check the VMM
    43  * version and to register its devices.  Each device has an unique (for the
    44  * configured VM) name.  The name is not only used in PDM but also in CFGM (to
    45  * organize device and device instance settings) and by anyone who wants to talk
    46  * to a specific device instance.
     43 * version and to register its devices.  Each device has an unique name (within
     44 * the VM configuration anyway).  The name is not only used in PDM, but also in
     45 * CFGM to organize device and device instance settings, and by anyone who wants
     46 * to talk to a specific device instance.
    4747 *
    4848 * When all device modules have been successfully loaded PDM will instantiate
    4949 * those devices which are configured for the VM.  Note that a device may have
    50  * more than one instance, see network adaptors for instance.  When
     50 * more than one instance, take network adaptors as an example.  When
    5151 * instantiating a device PDM provides device instance memory and a callback
    5252 * table (aka Device Helpers / DevHlp) with the VM APIs which the device
     
    5454 *
    5555 * Some devices are trusted devices, most are not.  The trusted devices are an
    56  * integrated part of the VM and can obtain the VM handle from their device
    57  * instance handles, thus enabling them to call any VM API.  Untrusted devices
    58  * can only use the callbacks provided during device instantiation.
     56 * integrated part of the VM and can obtain the VM handle, thus enabling them to
     57 * call any VM API.  Untrusted devices can only use the callbacks provided
     58 * during device instantiation.
    5959 *
    6060 * The main purpose in having DevHlps rather than just giving all the devices
     
    7272 * because of the extra privilege it entails.  Note that raw-mode code and data
    7373 * will be subject to relocation.
     74 *
     75 *
     76 * @subsection sec_pdm_dev_pci          PCI Devices
     77 *
     78 * A PDM device usually registers one a PCI device during it's instantiation,
     79 * legacy devices may register zero, while a few (currently none) more
     80 * complicated devices may register multiple PCI functions or devices.
     81 *
     82 * The bus, device and function assignments can either be done explictly via the
     83 * configuration or the registration call, or it can be left up to the PCI bus.
     84 * The typical VBox configuration construct (ConsoleImpl2.cpp) will do explict
     85 * assignments for all devices it's BusAssignmentManager class knows about.
     86 *
     87 * For explict CFGM style configuration, the "PCIBusNo", "PCIDeviceNo", and
     88 * "PCIFunctionNo" values in the PDM device instance configuration (not the
     89 * "config" subkey, but the top level one) will be picked up for the primary PCI
     90 * device.  The primary PCI configuration is by default the first one, but this
     91 * can be controlled using the @a idxDevCfg parameter of the
     92 * PDMDEVHLPR3::pfnPCIRegister method.  For subsequent configuration (@a
     93 * idxDevCfg > 0) the values are taken from the "PciDevNN" subkey, where "NN" is
     94 * replaced by the @a idxDevCfg value.
     95 *
    7496 *
    7597 *
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette