pdmdev.h revision 11923fc977be1686f5428c3e790c04d0701a074c
/** Pointer to a FNPDMDEVPOWERON() function. */ * @param pDevIns The device instance data. /** Pointer to a FNPDMDEVRESET() function. */ * @param pDevIns The device instance data. /** Pointer to a FNPDMDEVSUSPEND() function. */ * @param pDevIns The device instance data. /** Pointer to a FNPDMDEVRESUME() function. */ * Power Off notification. * This is only called when the VMR3PowerOff call is made on a running VM. This * means that there is no notification if the VM was suspended before being * powered of. There will also be no callback when hot plugging devices. * @param pDevIns The device instance data. /** Pointer to a FNPDMDEVPOWEROFF() function. */ * This is called to let the device attach to a driver for a specified LUN * at runtime. This is not called during VM construction, the device * constructor have to attach to all the available drivers. * This is like plugging in the keyboard or mouse after turning on the PC. * @returns VBox status code. * @param pDevIns The device instance. * @param iLUN The logical unit which is being detached. * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines. /** Pointer to a FNPDMDEVATTACH() function. */ * This is called when a driver is detaching itself from a LUN of the device. * The device should adjust it's state to reflect this. * This is like unplugging the network cable to use it for the laptop or * something while the PC is still running. * @param pDevIns The device instance. * @param iLUN The logical unit which is being detached. * @param fFlags Flags, combination of the PDMDEVATT_FLAGS_* \#defines. /** Pointer to a FNPDMDEVDETACH() function. */ * Query the base interface of a logical unit. * @returns VBOX status code. * @param pDevIns The device instance. * @param iLUN The logicial unit to query. * @param ppBase Where to store the pointer to the base interface of the LUN. /** Pointer to a FNPDMDEVQUERYINTERFACE() function. */ * Init complete notification. * This can be done to do communication with other devices and other * initialization which requires everything to be in place. * @returns VBOX status code. * @param pDevIns The device instance. /** Pointer to a FNPDMDEVINITCOMPLETE() function. */ * PDM Device Registration Structure. * This structure is used when registering a device from VBoxInitDevices() in HC * Ring-3. PDM will continue use till the VM is terminated. /** Structure version. PDM_DEVREG_VERSION defines the current version. */ /** Name of the raw-mode context module (no path). * Only evalutated if PDM_DEVREG_FLAGS_RC is set. */ /** Name of the ring-0 module (no path). * Only evalutated if PDM_DEVREG_FLAGS_R0 is set. */ /** The description of the device. The UTF-8 string pointed to shall, like this structure, * remain unchanged from registration till VM destruction. */ /** Flags, combination of the PDM_DEVREG_FLAGS_* \#defines. */ /** Device class(es), combination of the PDM_DEVREG_CLASS_* \#defines. */ /** Maximum number of instances (per VM). */ /** Size of the instance data. */ /** Construct instance - required. */ /** Destruct instance - optional. */ /** Relocation command - optional. */ /** I/O Control interface - optional. */ /** Power on notification - optional. */ /** Reset notification - optional. */ /** Suspend notification - optional. */ /** Resume notification - optional. */ /** Attach command - optional. */ /** Detach notification - optional. */ /** Query a LUN base interface - optional. */ /** Init complete notification - optional. */ /** Power off notification - optional. */ /** Initialization safty marker. */ /** Pointer to a PDM Device Structure. */ /** Const pointer to a PDM Device Structure. */ /** Current DEVREG version number. */ /** This flag is used to indicate that the device has a RC component. */ /** This flag is used to indicate that the device has a R0 component. */ /** @def PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT * The bit count for the current host. */ /** The host bit count mask. */ /** The device support only 32-bit guests. */ /** The device support only 64-bit guests. */ /** The device support both 32-bit & 64-bit guests. */ /** @def PDM_DEVREG_FLAGS_GUEST_BITS_DEFAULT * The guest bit count for the current compilation. */ /** The guest bit count mask. */ /** Indicates that the devices support PAE36 on a 32-bit guest. */ /** Indicates that the device needs to be notified before the drivers when suspending. */ /** Indicates that the device needs to be notified before the drivers when powering off. */ * The order is important, lower bit earlier instantiation. /** Architecture device. */ /** Architecture BIOS device. */ /** Input device (mouse, keyboard, joystick, HID, ...). */ /** Interrupt controller (PIC). */ /** Interval controoler (PIT). */ /** Graphics device, like VGA. */ /** Storage controller device. */ /** Network interface controller. */ /** Serial controller device. */ /** Parallel controller device */ /** Host PCI pass-through device */ /** Misc devices (always last). */ /** @name IRQ Level for use with the *SetIrq APIs. /** Assert the IRQ (can assume value 1). */ /** Deassert the IRQ (can assume value 0). */ /** flip-flop - deassert and then assert the IRQ again immediately. */ * Registration record for MSI. /** Number of MSI interrupt vectors, 0 if MSI not supported */ /** Offset of MSI capability */ /** Offset of next capability to MSI */ /** If we support 64-bit MSI addressing */ /** Number of MSI-X interrupt vectors, 0 if MSI-X not supported */ /** Offset of MSI-X capability */ /** Offset of next capability to MSI-X */ /** Value of PCI BAR (base addresss register) assigned by device for MSI-X page access */ * PCI Bus registration structure. * All the callbacks, except the PCIBIOS hack, are working on PCI devices. /** Structure version number. PDM_PCIBUSREG_VERSION defines the current version. */ * Registers the device with the default PCI bus. * @returns VBox status code. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev The PCI device structure. * Any PCI enabled device must keep this in it's instance data! * Fill in the PCI data config before registration, please. * @param pszName Pointer to device name (permanent, readonly). For debugging, not unique. * @param iDev The device number ((dev << 3) | function) the device should have on the bus. * If negative, the pci bus device will assign one. * Initialize MSI support in a PCI device. * @returns VBox status code. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev The PCI device structure. * @param pMsiReg MSI registration structure * Registers a I/O region (memory mapped or I/O ports) for a PCI device. * @returns VBox status code. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev The PCI device structure. * @param iRegion The region number. * @param cbRegion Size of the region. * @param iType PCI_ADDRESS_SPACE_MEM, PCI_ADDRESS_SPACE_IO or PCI_ADDRESS_SPACE_MEM_PREFETCH. * @param pfnCallback Callback for doing the mapping. * Register PCI configuration space read/write callbacks. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev The PCI device structure. * @param pfnRead Pointer to the user defined PCI config read function. * @param ppfnReadOld Pointer to function pointer which will receive the old (default) * PCI config read function. This way, user can decide when (and if) * to call default PCI config read function. Can be NULL. * @param pfnWrite Pointer to the user defined PCI config write function. * @param pfnWriteOld Pointer to function pointer which will receive the old (default) * PCI config write function. This way, user can decide when (and if) * to call default PCI config write function. Can be NULL. * Set the IRQ for a PCI device. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev The PCI device structure. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * Saves a state of the PCI device. * @returns VBox status code. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev Pointer to PCI device. * @param pSSMHandle The handle to save the state to. * Loads a saved PCI device state. * @returns VBox status code. * @param pDevIns Device instance of the PCI Bus. * @param pPciDev Pointer to PCI device. * @param pSSMHandle The handle to the saved state. * Called to perform the job of the bios. * This is only called for the first PCI Bus - it is expected to * service all the PCI buses. * @param pDevIns Device instance of the first bus. /** The name of the SetIrq RC entry point. */ /** The name of the SetIrq R0 entry point. */ /** Pointer to a PCI bus registration structure. */ /** Current PDMPCIBUSREG version number. */ /** Structure version. PDM_PCIHLPRC_VERSION defines the current version. */ * @param pDevIns PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns PCI device instance. * @param GCAddr Physical address MSI request was written. * @param uValue Value written. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The PCI device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The PCI device instance. /** Just a safety precaution. */ /** Pointer to PCI helpers. */ /** Pointer to const PCI helpers. */ /** Current PDMPCIHLPRC version number. */ /** Structure version. PDM_PCIHLPR0_VERSION defines the current version. */ * @param pDevIns PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns PCI device instance. * @param GCAddr Physical address MSI request was written. * @param uValue Value written. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The PCI device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The PCI device instance. /** Just a safety precaution. */ /** Pointer to PCI helpers. */ /** Pointer to const PCI helpers. */ /** Current PDMPCIHLPR0 version number. */ /** Structure version. PDM_PCIHLPR3_VERSION defines the current version. */ * @param pDevIns The PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns The PCI device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @param pDevIns PCI device instance. * @param GCAddr Physical address MSI request was written. * @param uValue Value written. * Checks if the given address is an MMIO2 base address or not. * @param pDevIns The PCI device instance. * @param pOwner The owner of the memory, optional. * @param GCPhys The address to check. * Gets the address of the RC PCI Bus helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns RC pointer to the PCI Bus helpers. * @param pDevIns Device instance of the PCI Bus. * Gets the address of the R0 PCI Bus helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the PCI Bus helpers. * @param pDevIns Device instance of the PCI Bus. * @returns VINF_SUCCESS on success. * @returns Fatal error on failure. * @param pDevIns The PCI device instance. * @param rc Dummy for making the interface identical to the RC and R0 versions. * @param pDevIns The PCI device instance. /** Just a safety precaution. */ /** Pointer to PCI helpers. */ /** Pointer to const PCI helpers. */ /** Current PDMPCIHLPR3 version number. */ * Programmable Interrupt Controller registration structure. /** Structure version number. PDM_PICREG_VERSION defines the current version. */ * @param pDevIns Device instance of the PIC. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * Get a pending interrupt. * @returns Pending interrupt number. * @param pDevIns Device instance of the PIC. /** The name of the RC SetIrq entry point. */ /** The name of the RC GetInterrupt entry point. */ /** The name of the R0 SetIrq entry point. */ /** The name of the R0 GetInterrupt entry point. */ /** Pointer to a PIC registration structure. */ /** Current PDMPICREG version number. */ /** Structure version. PDM_PICHLPRC_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the PIC. * Clear the interrupt force action flag. * @param pDevIns Device instance of the PIC. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The PIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The PIC device instance. /** Just a safety precaution. */ /** Pointer to PIC RC helpers. */ /** Pointer to const PIC RC helpers. */ /** Current PDMPICHLPRC version number. */ /** Structure version. PDM_PICHLPR0_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the PIC. * Clear the interrupt force action flag. * @param pDevIns Device instance of the PIC. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The PIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The PCI device instance. /** Just a safety precaution. */ /** Pointer to PIC R0 helpers. */ /** Pointer to const PIC R0 helpers. */ /** Current PDMPICHLPR0 version number. */ /** Structure version. PDM_PICHLP_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the PIC. * Clear the interrupt force action flag. * @param pDevIns Device instance of the PIC. * @returns VINF_SUCCESS on success. * @returns Fatal error on failure. * @param pDevIns The PIC device instance. * @param rc Dummy for making the interface identical to the RC and R0 versions. * @param pDevIns The PIC device instance. * Gets the address of the RC PIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns RC pointer to the PIC helpers. * @param pDevIns Device instance of the PIC. * Gets the address of the R0 PIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the PIC helpers. * @param pDevIns Device instance of the PIC. /** Just a safety precaution. */ /** Pointer to PIC R3 helpers. */ /** Pointer to const PIC R3 helpers. */ /** Current PDMPICHLPR3 version number. */ * Advanced Programmable Interrupt Controller registration structure. /** Structure version number. PDM_APICREG_VERSION defines the current version. */ * Get a pending interrupt. * @returns Pending interrupt number. * @param pDevIns Device instance of the APIC. * Check if the APIC has a pending interrupt/if a TPR change would active one * @returns Pending interrupt yes/no * @param pDevIns Device instance of the APIC. * @param pDevIns Device instance of the APIC. * @param u64Base The new base. * @param pDevIns Device instance of the APIC. * Set the TPR (task priority register). * @param pDevIns Device instance of the APIC. * @param u8TPR The new TPR. * Get the TPR (task priority register). * @returns The current TPR. * @param pDevIns Device instance of the APIC. * Write MSR in APIC range. * @returns VBox status code. * @param pDevIns Device instance of the APIC. * @param idCpu Target CPU. * @param u32Reg MSR to write. * @param u64Value Value to write. * Read MSR in APIC range. * @returns VBox status code. * @param pDevIns Device instance of the APIC. * @param idCpu Target CPU. * @param u32Reg MSR to read. * @param pu64Value Value read. * Private interface between the IOAPIC and APIC. * This is a low-level, APIC/IOAPIC implementation specific interface * which is registered with PDM only because it makes life so much * simpler right now (GC bits). This is a bad bad hack! The correct * way of doing this would involve some way of querying GC interfaces * and relocating them. Perhaps doing some kind of device init in GC... * @param pDevIns Device instance of the APIC. * @param u8Dest See APIC implementation. * @param u8DestMode See APIC implementation. * @param u8DeliveryMode See APIC implementation. * @param iVector See APIC implementation. * @param u8Polarity See APIC implementation. * @param u8TriggerMode See APIC implementation. * Deliver a signal to CPU's local interrupt pins (LINT0/LINT1). Used for * virtual wire mode when interrupts from the PIC are passed through LAPIC. * @param pDevIns Device instance of the APIC. * @param u8Pin Local pin number (0 or 1 for current CPUs). /** The name of the RC GetInterrupt entry point. */ /** The name of the RC HasPendingIrq entry point. */ /** The name of the RC SetBase entry point. */ /** The name of the RC GetBase entry point. */ /** The name of the RC SetTPR entry point. */ /** The name of the RC GetTPR entry point. */ /** The name of the RC WriteMSR entry point. */ /** The name of the RC ReadMSR entry point. */ /** The name of the RC BusDeliver entry point. */ /** The name of the RC LocalInterrupt entry point. */ /** The name of the R0 GetInterrupt entry point. */ /** The name of the R0 HasPendingIrq entry point. */ /** The name of the R0 SetBase entry point. */ /** The name of the R0 GetBase entry point. */ /** The name of the R0 SetTPR entry point. */ /** The name of the R0 GetTPR entry point. */ /** The name of the R0 WriteMSR entry point. */ /** The name of the R0 ReadMSR entry point. */ /** The name of the R0 BusDeliver entry point. */ /** The name of the R0 LocalInterrupt entry point. */ /** Pointer to an APIC registration structure. */ /** Current PDMAPICREG version number. */ * APIC version argument for pfnChangeFeature. /** Standard APIC (X86_CPUID_FEATURE_EDX_APIC). */ /** Intel X2APIC (X86_CPUID_FEATURE_ECX_X2APIC). */ /** The usual 32-bit paranoia. */ * APIC irq argument for SetInterruptFF. /** Normal hardware interrupt. */ /** ExtINT (HW interrupt via PIC). */ /** The usual 32-bit paranoia. */ /** Structure version. PDM_APICHLPRC_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to set flag upon. * Clear the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to clear flag upon. * Modifies APIC-related bits in the CPUID feature mask. * @param pDevIns Device instance of the APIC. * @param enmVersion Supported APIC version. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The APIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The APIC device instance. * Get the virtual CPU id corresponding to the current EMT. * @param pDevIns The APIC device instance. /** Just a safety precaution. */ /** Pointer to APIC GC helpers. */ /** Pointer to const APIC helpers. */ /** Current PDMAPICHLPRC version number. */ /** Structure version. PDM_APICHLPR0_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to set flag upon. * Clear the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to clear flag upon. * Modifies APIC-related bits in the CPUID feature mask. * @param pDevIns Device instance of the APIC. * @param enmVersion Supported APIC version. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The APIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The APIC device instance. * Get the virtual CPU id corresponding to the current EMT. * @param pDevIns The APIC device instance. /** Just a safety precaution. */ /** Pointer to APIC GC helpers. */ /** Pointer to const APIC helpers. */ /** Current PDMAPICHLPR0 version number. */ /** Structure version. PDM_APICHLPR3_VERSION defines the current version. */ * Set the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to set flag upon. * Clear the interrupt force action flag. * @param pDevIns Device instance of the APIC. * @param enmType IRQ type. * @param idCpu Virtual CPU to clear flag upon. * Modifies APIC-related bits in the CPUID feature mask. * @param pDevIns Device instance of the APIC. * @param enmVersion Supported APIC version. * Get the virtual CPU id corresponding to the current EMT. * @param pDevIns The APIC device instance. * Sends SIPI to given virtual CPU. * @param pDevIns The APIC device instance. * @param idCpu Virtual CPU to perform SIPI on * @param iVector SIPI vector * Sends init IPI to given virtual CPU, should result in reset and * @param pDevIns The APIC device instance. * @param idCpu Virtual CPU to perform SIPI on * Gets the address of the RC APIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns GC pointer to the APIC helpers. * @param pDevIns Device instance of the APIC. * Gets the address of the R0 APIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the APIC helpers. * @param pDevIns Device instance of the APIC. * Get the critical section used to synchronize the PICs, PCI and stuff. * @returns Ring-3 pointer to the critical section. * @param pDevIns The APIC device instance. * Get the critical section used to synchronize the PICs, PCI and stuff. * @returns Raw-mode context pointer to the critical section. * @param pDevIns The APIC device instance. * Get the critical section used to synchronize the PICs, PCI and stuff. * @returns Ring-0 pointer to the critical section. * @param pDevIns The APIC device instance. /** Just a safety precaution. */ /** Pointer to APIC helpers. */ /** Pointer to const APIC helpers. */ /** Current PDMAPICHLP version number. */ * I/O APIC registration structure. /** Struct version+magic number (PDM_IOAPICREG_VERSION). */ * @param pDevIns Device instance of the I/O APIC. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. /** The name of the GC SetIrq entry point. */ /** The name of the R0 SetIrq entry point. */ * @param pDevIns Device instance of the I/O APIC. * @param GCPhys Request address. * @param uValue Request value. /** The name of the GC SendMsi entry point. */ /** The name of the R0 SendMsi entry point. */ /** Pointer to an APIC registration structure. */ /** Current PDMAPICREG version number. */ /** Structure version. PDM_IOAPICHLPRC_VERSION defines the current version. */ * Private interface between the IOAPIC and APIC. * See comments about this hack on PDMAPICREG::pfnBusDeliverR3. * @param pDevIns Device instance of the IOAPIC. * @param u8Dest See APIC implementation. * @param u8DestMode See APIC implementation. * @param u8DeliveryMode See APIC implementation. * @param iVector See APIC implementation. * @param u8Polarity See APIC implementation. * @param u8TriggerMode See APIC implementation. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The IOAPIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The IOAPIC device instance. /** Just a safety precaution. */ /** Pointer to IOAPIC RC helpers. */ /** Pointer to const IOAPIC helpers. */ /** Current PDMIOAPICHLPRC version number. */ /** Structure version. PDM_IOAPICHLPR0_VERSION defines the current version. */ * Private interface between the IOAPIC and APIC. * See comments about this hack on PDMAPICREG::pfnBusDeliverR3. * @param pDevIns Device instance of the IOAPIC. * @param u8Dest See APIC implementation. * @param u8DestMode See APIC implementation. * @param u8DeliveryMode See APIC implementation. * @param iVector See APIC implementation. * @param u8Polarity See APIC implementation. * @param u8TriggerMode See APIC implementation. * @returns VINF_SUCCESS on success. * @returns rc if we failed to acquire the lock. * @param pDevIns The IOAPIC device instance. * @param rc What to return if we fail to acquire the lock. * @param pDevIns The IOAPIC device instance. /** Just a safety precaution. */ /** Pointer to IOAPIC R0 helpers. */ /** Pointer to const IOAPIC helpers. */ /** Current PDMIOAPICHLPR0 version number. */ /** Structure version. PDM_IOAPICHLPR3_VERSION defines the current version. */ * Private interface between the IOAPIC and APIC. * See comments about this hack on PDMAPICREG::pfnBusDeliverR3. * @param pDevIns Device instance of the IOAPIC. * @param u8Dest See APIC implementation. * @param u8DestMode See APIC implementation. * @param u8DeliveryMode See APIC implementation. * @param iVector See APIC implementation. * @param u8Polarity See APIC implementation. * @param u8TriggerMode See APIC implementation. * @returns VINF_SUCCESS on success. * @returns Fatal error on failure. * @param pDevIns The IOAPIC device instance. * @param rc Dummy for making the interface identical to the GC and R0 versions. * @param pDevIns The IOAPIC device instance. * Gets the address of the RC IOAPIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns RC pointer to the IOAPIC helpers. * @param pDevIns Device instance of the IOAPIC. * Gets the address of the R0 IOAPIC helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the IOAPIC helpers. * @param pDevIns Device instance of the IOAPIC. /** Just a safety precaution. */ /** Pointer to IOAPIC R3 helpers. */ /** Pointer to const IOAPIC helpers. */ /** Current PDMIOAPICHLPR3 version number. */ * HPET registration structure. /** Struct version+magic number (PDM_HPETREG_VERSION). */ /** Pointer to an HPET registration structure. */ /** Current PDMHPETREG version number. */ * @remarks Keep this around in case HPET will need PDM interaction in again RC /** Structure version. PDM_HPETHLPRC_VERSION defines the current version. */ /** Just a safety precaution. */ /** Pointer to HPET RC helpers. */ /** Pointer to const HPET RC helpers. */ /** Current PDMHPETHLPRC version number. */ * @remarks Keep this around in case HPET will need PDM interaction in again R0 /** Structure version. PDM_HPETHLPR0_VERSION defines the current version. */ /** Just a safety precaution. */ /** Pointer to HPET R0 helpers. */ /** Pointer to const HPET R0 helpers. */ /** Current PDMHPETHLPR0 version number. */ /** Structure version. PDM_HPETHLP_VERSION defines the current version. */ * Gets the address of the RC HPET helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns RC pointer to the HPET helpers. * @param pDevIns Device instance of the HPET. * Gets the address of the R0 HPET helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the HPET helpers. * @param pDevIns Device instance of the HPET. * Set legacy mode on PIT and RTC. * @returns VINF_SUCCESS on success. * @returns rc if we failed to set legacy mode. * @param pDevIns Device instance of the HPET. * @param fActivated Whether legacy mode is activated or deactivated. * Set IRQ, bypassing ISA bus override rules. * @returns VINF_SUCCESS on success. * @returns rc if we failed to set legacy mode. * @param pDevIns Device instance of the HPET. * @param fActivate Activate or deactivate legacy mode. /** Just a safety precaution. */ /** Pointer to HPET R3 helpers. */ /** Pointer to const HPET R3 helpers. */ /** Current PDMHPETHLPR3 version number. */ /** Struct version+magic number (PDM_PCIRAWREG_VERSION). */ /** Pointer to a raw PCI registration structure. */ /** Current PDMPCIRAWREG version number. */ /** Just a safety precaution. */ /** Just a safety precaution. */ * Gets the address of the RC PCI raw helpers. * This should be called at both construction and relocation time * to obtain the correct address of the RC helpers. * @returns RC pointer to the PCI raw helpers. * @param pDevIns Device instance of the raw PCI device. * Gets the address of the R0 PCI raw helpers. * This should be called at both construction and relocation time * to obtain the correct address of the R0 helpers. * @returns R0 pointer to the PCI raw helpers. * @param pDevIns Device instance of the raw PCI device. /** Just a safety precaution. */ /** Pointer to raw PCI R3 helpers. */ /** Pointer to const raw PCI R3 helpers. */ /** Current PDMPCIRAWHLPRC version number. */ /** Current PDMPCIRAWHLPR0 version number. */ /** Current PDMPCIRAWHLPR3 version number. */ * @returns Number of bytes transferred. * @param pDevIns Device instance of the DMA. * @param pvUser User pointer. * @param uChannel Channel number. * @param off DMA position. /** Pointer to a FNDMATRANSFERHANDLER(). */ * DMA Controller registration structure. /** Structure version number. PDM_DMACREG_VERSION defines the current version. */ * Execute pending transfers. * @returns A more work indiciator. I.e. 'true' if there is more to be done, and 'false' if all is done. * @param pDevIns Device instance of the DMAC. * Register transfer function for DMA channel. * @param pDevIns Device instance of the DMAC. * @param uChannel Channel number. * @param pfnTransferHandler Device specific transfer function. * @param pvUSer User pointer to be passed to the callback. * @returns Number of bytes read. * @param pDevIns Device instance of the DMAC. * @param pvBuffer Pointer to target buffer. * @param off DMA position. * @param cbBlock Block size. * @returns Number of bytes written. * @param pDevIns Device instance of the DMAC. * @param pvBuffer Memory to write. * @param off DMA position. * @param cbBlock Block size. * @param pDevIns Device instance of the DMAC. * @param uChannel Channel number. * @param uLevel Level of the line. * @param pDevIns Device instance of the DMAC. * @param uChannel Channel number. /** Pointer to a DMAC registration structure. */ /** Current PDMDMACREG version number. */ * DMA Controller device helpers. /** Structure version. PDM_DMACHLP_VERSION defines the current version. */ /** Pointer to DMAC helpers. */ /** Pointer to const DMAC helpers. */ /** Current PDMDMACHLP version number. */ * RTC registration structure. /** Structure version number. PDM_RTCREG_VERSION defines the current version. */ * Write to a CMOS register and update the checksum if necessary. * @returns VBox status code. * @param pDevIns Device instance of the RTC. * @param iReg The CMOS register index. * @param u8Value The CMOS register value. * @returns VBox status code. * @param pDevIns Device instance of the RTC. * @param iReg The CMOS register index. * @param pu8Value Where to store the CMOS register value. /** Pointer to a RTC registration structure. */ /** Pointer to a const RTC registration structure. */ /** Current PDMRTCREG version number. */ /** Structure version. PDM_RTCHLP_VERSION defines the current version. */ /** Pointer to RTC helpers. */ /** Pointer to const RTC helpers. */ /** Current PDMRTCHLP version number. */ /** Structure version. PDM_DEVHLP_VERSION defines the current version. */ * Register a number of I/O ports with a device. * These callbacks are of course for the host context (HC). * Register HC handlers before guest context (GC) handlers! There must be a * HC handler for every GC handler! * @param pDevIns The device instance to register the ports with. * @param Port First port number in the range. * @param cPorts Number of ports to register. * @param pvUser User argument. * @param pfnOut Pointer to function which is gonna handle OUT operations. * @param pfnIn Pointer to function which is gonna handle IN operations. * @param pfnOutStr Pointer to function which is gonna handle string OUT operations. * @param pfnInStr Pointer to function which is gonna handle string IN operations. * @param pszDesc Pointer to description string. This must not be freed. * Register a number of I/O ports with a device for RC. * These callbacks are for the raw-mode context (RC). Register ring-3 context * (R3) handlers before raw-mode context handlers! There must be a R3 handler * @param pDevIns The device instance to register the ports with * and which RC module to resolve the names * @param Port First port number in the range. * @param cPorts Number of ports to register. * @param pvUser User argument. * @param pszOut Name of the RC function which is gonna handle OUT operations. * @param pszIn Name of the RC function which is gonna handle IN operations. * @param pszOutStr Name of the RC function which is gonna handle string OUT operations. * @param pszInStr Name of the RC function which is gonna handle string IN operations. * @param pszDesc Pointer to description string. This must not be freed. * Register a number of I/O ports with a device. * These callbacks are of course for the ring-0 host context (R0). * Register R3 (HC) handlers before R0 (R0) handlers! There must be a R3 (HC) handler for every R0 handler! * @param pDevIns The device instance to register the ports with. * @param Port First port number in the range. * @param cPorts Number of ports to register. * @param pvUser User argument. (if pointer, then it must be in locked memory!) * @param pszOut Name of the R0 function which is gonna handle OUT operations. * @param pszIn Name of the R0 function which is gonna handle IN operations. * @param pszOutStr Name of the R0 function which is gonna handle string OUT operations. * @param pszInStr Name of the R0 function which is gonna handle string IN operations. * @param pszDesc Pointer to description string. This must not be freed. * This naturally affects both guest context (GC), ring-0 (R0) and ring-3 (R3/HC) handlers. * @param pDevIns The device instance owning the ports. * @param Port First port number in the range. * @param cPorts Number of ports to deregister. * Register a Memory Mapped I/O (MMIO) region. * These callbacks are of course for the ring-3 context (R3). Register HC * handlers before raw-mode context (RC) and ring-0 context (R0) handlers! There * must be a R3 handler for every RC and R0 handler! * @param pDevIns The device instance to register the MMIO with. * @param GCPhysStart First physical address in the range. * @param cbRange The size of the range (in bytes). * @param pvUser User argument. * @param pfnWrite Pointer to function which is gonna handle Write operations. * @param pfnRead Pointer to function which is gonna handle Read operations. * @param pfnFill Pointer to function which is gonna handle Fill/memset operations. (optional) * @param pszDesc Pointer to description string. This must not be freed. * Register a Memory Mapped I/O (MMIO) region for GC. * These callbacks are for the raw-mode context (RC). Register ring-3 context * (R3) handlers before guest context handlers! There must be a R3 handler for * @param pDevIns The device instance to register the MMIO with. * @param GCPhysStart First physical address in the range. * @param cbRange The size of the range (in bytes). * @param pvUser User argument. * @param pszWrite Name of the RC function which is gonna handle Write operations. * @param pszRead Name of the RC function which is gonna handle Read operations. * @param pszFill Name of the RC function which is gonna handle Fill/memset operations. (optional) * @param pszDesc Obsolete. NULL is fine. * @todo Remove pszDesc in the next major revision of PDMDEVHLPR3. * Register a Memory Mapped I/O (MMIO) region for R0. * These callbacks are for the ring-0 host context (R0). Register ring-3 * constext (R3) handlers before R0 handlers! There must be a R3 handler for * @param pDevIns The device instance to register the MMIO with. * @param GCPhysStart First physical address in the range. * @param cbRange The size of the range (in bytes). * @param pvUser User argument. (if pointer, then it must be in locked memory!) * @param pszWrite Name of the RC function which is gonna handle Write operations. * @param pszRead Name of the RC function which is gonna handle Read operations. * @param pszFill Name of the RC function which is gonna handle Fill/memset operations. (optional) * @param pszDesc Obsolete. NULL is fine. * @todo Remove pszDesc in the next major revision of PDMDEVHLPR3. * Deregister a Memory Mapped I/O (MMIO) region. * This naturally affects both guest context (GC), ring-0 (R0) and ring-3 (R3/HC) handlers. * @param pDevIns The device instance owning the MMIO region(s). * @param GCPhysStart First physical address in the range. * @param cbRange The size of the range (in bytes). * Allocate and register a MMIO2 region. * As mentioned elsewhere, MMIO2 is just RAM spelled differently. It's * RAM associated with a device. It is also non-shared memory with a * permanent ring-3 mapping and page backing (presently). * @param pDevIns The device instance. * @param iRegion The region number. Use the PCI region number as * this must be known to the PCI bus device too. If * it's not associated with the PCI device, then * any number up to UINT8_MAX is fine. * @param cb The size (in bytes) of the region. * @param fFlags Reserved for future use, must be zero. * @param ppv Where to store the address of the ring-3 mapping * @param pszDesc Pointer to description string. This must not be * Deregisters and frees a MMIO2 region. * Any physical (and virtual) access handlers registered for the region must * be deregistered before calling this function. * @returns VBox status code. * @param pDevIns The device instance. * @param iRegion The region number used during registration. * Maps a MMIO2 region into the physical memory space. * A MMIO2 range may overlap with base memory if a lot of RAM * is configured for the VM, in which case we'll drop the base * memory pages. Presently we will make no attempt to preserve * anything that happens to be present in the base memory that * is replaced, this is of course incorrectly but it's too much * @returns VBox status code. * @param pDevIns The device instance. * @param iRegion The region number used during registration. * @param GCPhys The physical address to map it at. * Unmaps a MMIO2 region previously mapped using pfnMMIO2Map. * @returns VBox status code. * @param pDevIns The device instance. * @param iRegion The region number used during registration. * @param GCPhys The physical address it's currently mapped at. * Maps a portion of an MMIO2 region into the hypervisor region. * Callers of this API must never deregister the MMIO2 region before the * @return VBox status code. * @param pDevIns The device owning the MMIO2 memory. * @param iRegion The region. * @param off The offset into the region. Will be rounded down * to closest page boundary. * @param cb The number of bytes to map. Will be rounded up * to the closest page boundary. * @param pszDesc Mapping description. * @param pRCPtr Where to store the RC address. * Maps a portion of an MMIO2 region into kernel space (host). * The kernel mapping will become invalid when the MMIO2 memory is deregistered * or the VM is terminated. * @return VBox status code. * @param pDevIns The device owning the MMIO2 memory. * @param iRegion The region. * @param off The offset into the region. Must be page * @param cb The number of bytes to map. Must be page * @param pszDesc Mapping description. * @param pR0Ptr Where to store the R0 address. * Register a ROM (BIOS) region. * It goes without saying that this is read-only memory. The memory region must be * in unassigned memory. I.e. from the top of the address space or on the PC in * the 0xa0000-0xfffff range. * @param pDevIns The device instance owning the ROM region. * @param GCPhysStart First physical address in the range. * @param cbRange The size of the range (in bytes). * @param pvBinary Pointer to the binary data backing the ROM image. * @param cbBinary The size of the binary pointer. This must * be equal or smaller than @a cbRange. * @param fFlags Shadow ROM flags, PGMPHYS_ROM_FLAGS_* in pgm.h. * @param pszDesc Pointer to description string. This must not be freed. * @remark There is no way to remove the rom, automatically on device cleanup or * manually from the device yet. At present I doubt we need such features... * Changes the protection of shadowed ROM mapping. * This is intented for use by the system BIOS, chipset or device in question to * change the protection of shadowed ROM code after init and on reset. * @param pDevIns The device instance. * @param GCPhysStart Where the mapping starts. * @param cbRange The size of the mapping. * @param enmProt The new protection type. * Register a save state data unit. * @param pDevIns The device instance. * @param pszName Data unit name. * @param uInstance The instance identifier of the data unit. * This must together with the name be unique. * @param uVersion Data layout version number. * @param cbGuess The approximate amount of data in the unit. * Only for progress indicators. * @param pszBefore Name of data unit which we should be put in * front of. Optional (NULL). * @param pfnLivePrep Prepare live save callback, optional. * @param pfnLiveExec Execute live save callback, optional. * @param pfnLiveVote Vote live save callback, optional. * @param pfnSavePrep Prepare save callback, optional. * @param pfnSaveExec Execute save callback, optional. * @param pfnSaveDone Done save callback, optional. * @param pfnLoadPrep Prepare load callback, optional. * @param pfnLoadExec Execute load callback, optional. * @param pfnLoadDone Done load callback, optional. * @param pDevIns The device instance. * @param enmClock The clock to use on this timer. * @param pfnCallback Callback function. * @param pvUser User argument for the callback. * @param fFlags Flags, see TMTIMER_FLAGS_*. * @param pszDesc Pointer to description string which must stay around * until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()). * @param ppTimer Where to store the timer on success. * Get the real world UTC time adjusted for VM lag, user offset and warpdrive. * @param pDevIns The device instance. * @param pTime Where to store the time. * @returns VINF_SUCCESS (for now). * @param pDevIns The device instance. * @param GCPhys Physical address start reading from. * @param pvBuf Where to put the read bits. * @param cbRead How many bytes to read. * @thread Any thread, but the call may involve the emulation thread. * Write to physical memory. * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY. * @param pDevIns The device instance. * @param GCPhys Physical address to write to. * @param pvBuf What to write. * @param cbWrite How many bytes to write. * @thread Any thread, but the call may involve the emulation thread. * Requests the mapping of a guest page into ring-3. * When you're done with the page, call pfnPhysReleasePageMappingLock() ASAP to * This API will assume your intention is to write to the page, and will * therefore replace shared and zero pages. If you do not intend to modify the * page, use the pfnPhysGCPhys2CCPtrReadOnly() API. * @returns VBox status code. * @retval VINF_SUCCESS on success. * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid page but has no physical * backing or if the page has any active access handlers. The caller * must fall back on using PGMR3PhysWriteExternal. * @retval VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS if it's not a valid physical address. * @param pVM The VM handle. * @param GCPhys The guest physical address of the page that * @param fFlags Flags reserved for future use, MBZ. * @param ppv Where to store the address corresponding to * @param pLock Where to store the lock information that * pfnPhysReleasePageMappingLock needs. * @remark Avoid calling this API from within critical sections (other than the * PGM one) because of the deadlock risk when we have to delegating the * Requests the mapping of a guest page into ring-3, external threads. * When you're done with the page, call pfnPhysReleasePageMappingLock() ASAP to * @returns VBox status code. * @retval VINF_SUCCESS on success. * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid page but has no physical * backing or if the page as an active ALL access handler. The caller * must fall back on using PGMPhysRead. * @retval VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS if it's not a valid physical address. * @param pDevIns The device instance. * @param GCPhys The guest physical address of the page that * @param fFlags Flags reserved for future use, MBZ. * @param ppv Where to store the address corresponding to * @param pLock Where to store the lock information that * pfnPhysReleasePageMappingLock needs. * @remark Avoid calling this API from within critical sections. * Release the mapping of a guest page. * This is the counter part of pfnPhysGCPhys2CCPtr and * pfnPhysGCPhys2CCPtrReadOnly. * @param pDevIns The device instance. * @param pLock The lock structure initialized by the mapping * Read guest physical memory by virtual address. * @param pDevIns The device instance. * @param pvDst Where to put the read bits. * @param GCVirtSrc Guest virtual address to start reading from. * @param cb How many bytes to read. * @thread The emulation thread. * Write to guest physical memory by virtual address. * @param pDevIns The device instance. * @param GCVirtDst Guest virtual address to write to. * @param pvSrc What to write. * @param cb How many bytes to write. * @thread The emulation thread. * Convert a guest virtual address to a guest physical address. * @returns VBox status code. * @param pDevIns The device instance. * @param GCPtr Guest virtual address. * @param pGCPhys Where to store the GC physical address * corresponding to GCPtr. * @thread The emulation thread. * @remark Careful with page boundaries. * Allocate memory which is associated with current VM instance * and automatically freed on it's destruction. * @returns Pointer to allocated memory. The memory is *NOT* zero-ed. * @param pDevIns The device instance. * @param cb Number of bytes to allocate. * Allocate memory which is associated with current VM instance * and automatically freed on it's destruction. The memory is ZEROed. * @returns Pointer to allocated memory. The memory is *NOT* zero-ed. * @param pDevIns The device instance. * @param cb Number of bytes to allocate. * Free memory allocated with pfnMMHeapAlloc() and pfnMMHeapAllocZ(). * @param pDevIns The device instance. * @param pv Pointer to the memory to free. * @param pDevIns The device instance. * @thread Any thread (just keep in mind that it's volatile info). * Checks if the VM was teleported and hasn't been fully resumed yet. * @param pDevIns The device instance. * Set the VM error message * @param pDevIns The device instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM error message * @param pDevIns The device instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param va Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns The device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns The device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param va Error message arguments. * Stops the VM and enters the debugger to look at the guest state. * Use the PDMDeviceDBGFStop() inline function with the RT_SRC_POS macro instead of * invoking this function directly. * @returns VBox status code which must be passed up to the VMM. * @param pDevIns The device instance. * @param pszFile Filename of the assertion location. * @param iLine The linenumber of the assertion location. * @param pszFunction Function of the assertion location. * @param pszFormat Message. (optional) * @param args Message parameters. * Register a info handler with DBGF, * @returns VBox status code. * @param pDevIns The device instance. * @param pszName The identifier of the info. * @param pszDesc The description of the info and any arguments * @param pfnHandler The handler function to be called to display the * Registers a statistics sample if statistics are enabled. * @param pDevIns Device instance of the DMA. * @param pvSample Pointer to the sample. * @param enmType Sample type. This indicates what pvSample is * @param pszName Sample name. The name is on this form * "/<component>/<sample>". Further nesting is * @param enmUnit Sample unit. * @param pszDesc Sample description. * Same as pfnSTAMRegister except that the name is specified in a * RTStrPrintf like fashion. * @param pDevIns Device instance of the DMA. * @param pvSample Pointer to the sample. * @param enmType Sample type. This indicates what pvSample is * @param enmVisibility Visibility type specifying whether unused * statistics should be visible or not. * @param enmUnit Sample unit. * @param pszDesc Sample description. * @param pszName The sample name format string. * @param ... Arguments to the format string. * Same as pfnSTAMRegister except that the name is specified in a * RTStrPrintfV like fashion. * @param pDevIns Device instance of the DMA. * @param pvSample Pointer to the sample. * @param enmType Sample type. This indicates what pvSample is * @param enmVisibility Visibility type specifying whether unused * statistics should be visible or not. * @param enmUnit Sample unit. * @param pszDesc Sample description. * @param pszName The sample name format string. * @param args Arguments to the format string. * Registers the device with the default PCI bus. * @returns VBox status code. * @param pDevIns The device instance. * @param pPciDev The PCI device structure. * Any PCI enabled device must keep this in it's instance data! * Fill in the PCI data config before registration, please. * @remark This is the simple interface, a Ex interface will be created if * more features are needed later. * Initialize MSI support in a PCI device. * @returns VBox status code. * @param pDevIns The device instance. * @param pMsiReg MSI registartion structure. * Registers a I/O region (memory mapped or I/O ports) for a PCI device. * @returns VBox status code. * @param pDevIns The device instance. * @param iRegion The region number. * @param cbRegion Size of the region. * @param enmType PCI_ADDRESS_SPACE_MEM, PCI_ADDRESS_SPACE_IO or PCI_ADDRESS_SPACE_MEM_PREFETCH. * @param pfnCallback Callback for doing the mapping. * Register PCI configuration space read/write callbacks. * @param pDevIns The device instance. * @param pPciDev The PCI device structure. * If NULL the default PCI device for this device instance is used. * @param pfnRead Pointer to the user defined PCI config read function. * @param ppfnReadOld Pointer to function pointer which will receive the old (default) * PCI config read function. This way, user can decide when (and if) * to call default PCI config read function. Can be NULL. * @param pfnWrite Pointer to the user defined PCI config write function. * @param pfnWriteOld Pointer to function pointer which will receive the old (default) * PCI config write function. This way, user can decide when (and if) * to call default PCI config write function. Can be NULL. * Set the IRQ for a PCI device. * @param pDevIns The device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * Set the IRQ for a PCI device, but don't wait for EMT to process * the request when not called from EMT. * @param pDevIns The device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. * @thread Any thread, but will involve the emulation thread. * Set ISA IRQ for a device. * @param pDevIns The device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * Set the ISA IRQ for a device, but don't wait for EMT to process * the request when not called from EMT. * @param pDevIns The device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * Attaches a driver (chain) to the device. * The first call for a LUN this will serve as a registartion of the LUN. The pBaseInterface and * the pszDesc string will be registered with that LUN and kept around for PDMR3QueryDeviceLun(). * @returns VBox status code. * @param pDevIns The device instance. * @param iLun The logical unit to attach. * @param pBaseInterface Pointer to the base interface for that LUN. (device side / down) * @param ppBaseInterface Where to store the pointer to the base interface. (driver side / up) * @param pszDesc Pointer to a string describing the LUN. This string must remain valid * for the live of the device instance. * @returns VBox status code. * @param pDevIns The device instance. * @param cbItem The size of a queue item. * @param cItems The number of items in the queue. * @param cMilliesInterval The number of milliseconds between polling the queue. * If 0 then the emulation thread will be notified whenever an item arrives. * @param pfnCallback The consumer function. * @param fRZEnabled Set if the queue should work in RC and R0. * @param pszName The queue base name. The instance number will be * appended automatically. * @param ppQueue Where to store the queue handle on success. * @thread The emulation thread. * Initializes a PDM critical section. * The PDM critical sections are derived from the IPRT critical sections, but * works in RC and R0 as well. * @returns VBox status code. * @param pDevIns The device instance. * @param pCritSect Pointer to the critical section. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszNameFmt Format string for naming the critical section. * For statistics and lock validation. * @param va Arguments for the format string. * This differs from the RTThreadCreate() API in that PDM takes care of suspending, * resuming, and destroying the thread as the VM state changes. * @returns VBox status code. * @param pDevIns The device instance. * @param ppThread Where to store the thread 'handle'. * @param pvUser The user argument to the thread function. * @param pfnThread The thread function. * @param pfnWakeup The wakup callback. This is called on the EMT * thread when a state change is pending. * @param cbStack See RTThreadCreate. * @param enmType See RTThreadCreate. * @param pszName See RTThreadCreate. * Set up asynchronous handling of a suspend, reset or power off notification. * This shall only be called when getting the notification. It must be called * @returns VBox status code. * @param pDevIns The device instance. * @param pfnAsyncNotify The callback. * Notify EMT(0) that the device has completed the asynchronous notification * This can be called at any time, spurious calls will simply be ignored. * @param pDevIns The device instance. * Register the RTC device. * @returns VBox status code. * @param pDevIns The device instance. * @param pRtcReg Pointer to a RTC registration structure. * @param ppRtcHlp Where to store the pointer to the helper * @returns VBox status code. * @param pDevIns The device instance. * @param pPciBusReg Pointer to PCI bus registration structure. * @param ppPciHlpR3 Where to store the pointer to the PCI Bus * Register the PIC device. * @returns VBox status code. * @param pDevIns The device instance. * @param pPicReg Pointer to a PIC registration structure. * @param ppPicHlpR3 Where to store the pointer to the PIC HC * Register the APIC device. * @returns VBox status code. * @param pDevIns The device instance. * @param pApicReg Pointer to a APIC registration structure. * @param ppApicHlpR3 Where to store the pointer to the APIC helpers. * Register the I/O APIC device. * @returns VBox status code. * @param pDevIns The device instance. * @param pIoApicReg Pointer to a I/O APIC registration structure. * @param ppIoApicHlpR3 Where to store the pointer to the IOAPIC * Register the HPET device. * @returns VBox status code. * @param pDevIns The device instance. * @param pHpetReg Pointer to a HPET registration structure. * @param ppHpetHlpR3 Where to store the pointer to the HPET * Register the raw PCI device. * @returns VBox status code. * @param pDevIns The device instance. * @param pHpetReg Pointer to a raw PCI registration structure. * @param ppHpetHlpR3 Where to store the pointer to the raw PCI * Register the DMA device. * @returns VBox status code. * @param pDevIns The device instance. * @param pDmacReg Pointer to a DMAC registration structure. * @param ppDmacHlp Where to store the pointer to the DMA helpers. * Register transfer function for DMA channel. * @returns VBox status code. * @param pDevIns The device instance. * @param uChannel Channel number. * @param pfnTransferHandler Device specific transfer callback function. * @param pvUser User pointer to pass to the callback. * @returns VBox status code. * @param pDevIns The device instance. * @param uChannel Channel number. * @param pvBuffer Pointer to target buffer. * @param off DMA position. * @param cbBlock Block size. * @param pcbRead Where to store the number of bytes which was * @returns VBox status code. * @param pDevIns The device instance. * @param uChannel Channel number. * @param pvBuffer Memory to write. * @param off DMA position. * @param cbBlock Block size. * @param pcbWritten Where to store the number of bytes which was * @returns VBox status code. * @param pDevIns Device instance. * @param uChannel Channel number. * @param uLevel Level of the line. * @returns Channel mode. See specs. * @param pDevIns The device instance. * @param uChannel Channel number. * Schedule DMA execution. * @param pDevIns The device instance. * Write CMOS value and update the checksum(s). * @returns VBox status code. * @param pDevIns The device instance. * @param iReg The CMOS register index. * @param u8Value The CMOS register value. * @returns VBox status code. * @param pDevIns The device instance. * @param iReg The CMOS register index. * @param pu8Value Where to store the CMOS register value. * Assert that the current thread is the emulation thread. * @returns True if correct. * @returns False if wrong. * @param pDevIns The device instance. * @param pszFile Filename of the assertion location. * @param iLine The linenumber of the assertion location. * @param pszFunction Function of the assertion location. * Assert that the current thread is NOT the emulation thread. * @returns True if correct. * @returns False if wrong. * @param pDevIns The device instance. * @param pszFile Filename of the assertion location. * @param iLine The linenumber of the assertion location. * @param pszFunction Function of the assertion location. * Resolves the symbol for a raw-mode context interface. * @returns VBox status code. * @param pDevIns The device instance. * @param pvInterface The interface structure. * @param cbInterface The size of the interface structure. * @param pszSymPrefix What to prefix the symbols in the list with * before resolving them. This must start with * 'dev' and contain the driver name. * @param pszSymList List of symbols corresponding to the interface. * There is generally a there is generally a define * holding this list associated with the interface * definition (INTERFACE_SYM_LIST). For more * details see PDMR3LdrGetInterfaceSymbols. * Resolves the symbol for a ring-0 context interface. * @returns VBox status code. * @param pDevIns The device instance. * @param pvInterface The interface structure. * @param cbInterface The size of the interface structure. * @param pszSymPrefix What to prefix the symbols in the list with * before resolving them. This must start with * 'dev' and contain the driver name. * @param pszSymList List of symbols corresponding to the interface. * There is generally a there is generally a define * holding this list associated with the interface * definition (INTERFACE_SYM_LIST). For more * details see PDMR3LdrGetInterfaceSymbols. * Call the ring-0 request handler routine of the device. * For this to work, the device must be ring-0 enabled and export a request * handler function. The name of the function must be the device name in * the PDMDRVREG struct prefixed with 'drvR0' and suffixed with * 'ReqHandler'. The device name will be captialized. It shall take the * exact same arguments as this function and be declared using * PDMBOTHCBDECL. See FNPDMDEVREQHANDLERR0. * Unlike PDMDrvHlpCallR0, this is current unsuitable for more than a call * or two as the handler address will be resolved on each invocation. This * is the reason for the EMT only restriction as well. * @returns VBox status code. * @retval VERR_SYMBOL_NOT_FOUND if the device doesn't export the required * @retval VERR_ACCESS_DENIED if the device isn't ring-0 capable. * @param pDevIns The device instance. * @param uOperation The operation to perform. * @param u64Arg 64-bit integer argument. /** Space reserved for future members. /** API available to trusted devices only. * These APIs are providing unrestricted access to the guest and the VM, * or they are interacting intimately with PDM. * Gets the VM handle. Restricted API. * @param pDevIns The device instance. * Gets the VMCPU handle. Restricted API. * @param pDevIns The device instance. * Registers the VMM device heap * @returns VBox status code. * @param pDevIns The device instance. * @param GCPhys The physical address. * @param pvHeap Ring 3 heap pointer. * @param cbSize Size of the heap. * Unregisters the VMM device heap * @returns VBox status code. * @param pDevIns The device instance. * @param GCPhys The physical address. * @returns The appropriate VBox status code to pass around on reset. * @param pDevIns The device instance. * @thread The emulation thread. * @returns The appropriate VBox status code to pass around on suspend. * @param pDevIns The device instance. * @thread The emulation thread. * Suspends, saves and powers off the VM. * @returns The appropriate VBox status code to pass around. * @param pDevIns The device instance. * @thread An emulation thread. * @returns The appropriate VBox status code to pass around on power off. * @param pDevIns The device instance. * @thread The emulation thread. * Checks if the Gate A20 is enabled or not. * @returns true if A20 is enabled. * @returns false if A20 is disabled. * @param pDevIns The device instance. * @thread The emulation thread. * Enables or disables the Gate A20. * @param pDevIns The device instance. * @param fEnable Set this flag to enable the Gate A20; clear it * @thread The emulation thread. * Get the specified CPUID leaf for the virtual CPU associated with the calling * @param pDevIns The device instance. * @param iLeaf The CPUID leaf to get. * @param pEax Where to store the EAX value. * @param pEbx Where to store the EBX value. * @param pEcx Where to store the ECX value. * @param pEdx Where to store the EDX value. * Get the current virtual clock time in a VM. The clock frequency must be * @returns Current clock time. * @param pDevIns The device instance. * Get the frequency of the virtual clock. * @returns The clock frequency (not variable at run-time). * @param pDevIns The device instance. * Get the current virtual clock time in a VM, in nanoseconds. * @returns Current clock time (in ns). * @param pDevIns The device instance. /** Just a safety precaution. (PDM_DEVHLP_VERSION) */ /** Pointer to the R3 PDM Device API. */ /** Pointer to the R3 PDM Device API, const variant. */ /** Current PDMDEVHLPR3 version number. */ * PDM Device API - RC Variant. /** Structure version. PDM_DEVHLPRC_VERSION defines the current version. */ * Set the IRQ for a PCI device. * @param pDevIns Device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * Set ISA IRQ for a device. * @param pDevIns Device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * @returns VINF_SUCCESS (for now). * @param pDevIns Device instance. * @param GCPhys Physical address start reading from. * @param pvBuf Where to put the read bits. * @param cbRead How many bytes to read. * Write to physical memory. * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY. * @param pDevIns Device instance. * @param GCPhys Physical address to write to. * @param pvBuf What to write. * @param cbWrite How many bytes to write. * Checks if the Gate A20 is enabled or not. * @returns true if A20 is enabled. * @returns false if A20 is disabled. * @param pDevIns Device instance. * @thread The emulation thread. * @param pDevIns The device instance. * @thread Any thread (just keep in mind that it's volatile info). * Set the VM error message * @param pDrvIns Driver instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM error message * @param pDrvIns Driver instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param va Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns Device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns Device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param va Error message arguments. * Set parameters for pending MMIO patch operation * @returns VBox status code. * @param pDevIns Device instance. * @param GCPhys MMIO physical address * @param pCachedData GC pointer to cached data * Gets the VM handle. Restricted API. * @param pDevIns Device instance. * Gets the VMCPU handle. Restricted API. * @param pDevIns The device instance. * Get the current virtual clock time in a VM. The clock frequency must be * @returns Current clock time. * @param pDevIns The device instance. * Get the frequency of the virtual clock. * @returns The clock frequency (not variable at run-time). * @param pDevIns The device instance. * Get the current virtual clock time in a VM, in nanoseconds. * @returns Current clock time (in ns). * @param pDevIns The device instance. /** Just a safety precaution. */ /** Pointer PDM Device RC API. */ /** Pointer PDM Device RC API. */ /** Current PDMDEVHLP version number. */ * PDM Device API - R0 Variant. /** Structure version. PDM_DEVHLPR0_VERSION defines the current version. */ * Set the IRQ for a PCI device. * @param pDevIns Device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * Set ISA IRQ for a device. * @param pDevIns Device instance. * @param iIrq IRQ number to set. * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines. * @thread Any thread, but will involve the emulation thread. * @returns VINF_SUCCESS (for now). * @param pDevIns Device instance. * @param GCPhys Physical address start reading from. * @param pvBuf Where to put the read bits. * @param cbRead How many bytes to read. * Write to physical memory. * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY. * @param pDevIns Device instance. * @param GCPhys Physical address to write to. * @param pvBuf What to write. * @param cbWrite How many bytes to write. * Checks if the Gate A20 is enabled or not. * @returns true if A20 is enabled. * @returns false if A20 is disabled. * @param pDevIns Device instance. * @thread The emulation thread. * @param pDevIns The device instance. * @thread Any thread (just keep in mind that it's volatile info). * Set the VM error message * @param pDrvIns Driver instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM error message * @param pDrvIns Driver instance. * @param rc VBox status code. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Error message format string. * @param va Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns Device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param ... Error message arguments. * Set the VM runtime error message * @returns VBox status code. * @param pDevIns Device instance. * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. * @param pszErrorId Error ID string. * @param pszFormat Error message format string. * @param va Error message arguments. * Set parameters for pending MMIO patch operation * @param pDevIns Device instance. * @param GCPhys MMIO physical address * @param pCachedData GC pointer to cached data * Gets the VM handle. Restricted API. * @param pDevIns Device instance. * Checks if our current CPU state allows for IO block emulation fallback to the recompiler * @returns true = yes, false = no * @param pDevIns Device instance. * Gets the VMCPU handle. Restricted API. * @param pDevIns The device instance. * Get the current virtual clock time in a VM. The clock frequency must be * @returns Current clock time. * @param pDevIns The device instance. * Get the frequency of the virtual clock. * @returns The clock frequency (not variable at run-time). * @param pDevIns The device instance. * Get the current virtual clock time in a VM, in nanoseconds. * @returns Current clock time (in ns). * @param pDevIns The device instance. /** Just a safety precaution. */ /** Pointer PDM Device R0 API. */ /** Pointer PDM Device GC API. */ /** Current PDMDEVHLP version number. */ /** Structure version. PDM_DEVINS_VERSION defines the current version. */ /** Device instance number. */ /** Pointer the GC PDM Device API. */ /** Pointer to device instance data. */ /** The critical section for the device, see pCritSectR3. * This is automatically resolved by PDM when pCritSectR3 is set by the /** Alignment padding. */ /** Pointer the R0 PDM Device API. */ /** Pointer to device instance data (R0). */ /** The critical section for the device, see pCritSectR3. * This is automatically resolved by PDM when pCritSectR3 is set by the /** Pointer the HC PDM Device API. */ /** Pointer to device instance data. */ /** The critical section for the device. (Optional) * The device constructor initializes this if it has a critical section for * the device and desires it to be taken automatically by MMIO, I/O port * and timer callbacks to the device. The advantages using this locking * approach is both less code and avoiding the global IOM lock. * @remarks Will not yet be taken by SSM. /** Pointer to device registration structure. */ /** Configuration handle. */ /** The base interface of the device. * The device constructor initializes this if it has any * device level interfaces to export. To obtain this interface * call PDMR3QueryDevice(). */ /** Align the internal data more naturally. */ /** Device instance data. The size of this area is defined * in the PDMDEVREG::cbInstanceData field. */ /** Current PDMDEVINS version number. */ /** Converts a pointer to the PDMDEVINS::IBase to a pointer to PDMDEVINS. */ * Checks the structure versions of the device instance and device helpers, * returning if they are incompatible. * This is for use in the constructor. * @param pDevIns The device instance pointer. * Quietly checks the structure versions of the device instance and device * helpers, returning if they are incompatible. * This is for use in the destructor. * @param pDevIns The device instance pointer. * Wrapper around CFGMR3ValidateConfig for the root config for use in the * constructor - returns on failure. * This should be invoked after having initialized the instance data * sufficiently for the correct operation of the destructor. The destructor is * @param pDevIns Pointer to the PDM device instance. * @param pszValidValues Patterns describing the valid value names. See * RTStrSimplePatternMultiMatch for details on the * @param pszValidNodes Patterns describing the valid node (key) names. * Pass empty string if no valid nodess. /** @def PDMDEV_ASSERT_EMT * Assert that the current thread is the emulation thread. /** @def PDMDEV_ASSERT_OTHER * Assert that the current thread is NOT the emulation thread. /** @def PDMDEV_ASSERT_VMLOCK_OWNER * Assert that the current thread is owner of the VM lock. /** @def PDMDEV_SET_ERROR * Set the VM error. See PDMDevHlpVMSetError() for printf like message formatting. /** @def PDMDEV_SET_RUNTIME_ERROR * Set the VM runtime error. See PDMDevHlpVMSetRuntimeError() for printf like message formatting. /** @def PDMDEVINS_2_RCPTR * Converts a PDM Device instance pointer a RC PDM Device instance pointer. /** @def PDMDEVINS_2_R3PTR * Converts a PDM Device instance pointer a R3 PDM Device instance pointer. /** @def PDMDEVINS_2_R0PTR * Converts a PDM Device instance pointer a R0 PDM Device instance pointer. * @copydoc PDMDEVHLPR3::pfnIOPortRegister * @copydoc PDMDEVHLPR3::pfnIOPortRegisterRC * @copydoc PDMDEVHLPR3::pfnIOPortRegisterR0 * @copydoc PDMDEVHLPR3::pfnIOPortDeregister * @copydoc PDMDEVHLPR3::pfnMMIORegister * @copydoc PDMDEVHLPR3::pfnMMIORegisterRC * @copydoc PDMDEVHLPR3::pfnMMIORegisterR0 * @copydoc PDMDEVHLPR3::pfnMMIODeregister * @copydoc PDMDEVHLPR3::pfnMMIO2Register * @copydoc PDMDEVHLPR3::pfnMMIO2Deregister * @copydoc PDMDEVHLPR3::pfnMMIO2Map * @copydoc PDMDEVHLPR3::pfnMMIO2Unmap * @copydoc PDMDEVHLPR3::pfnMMHyperMapMMIO2 * @copydoc PDMDEVHLPR3::pfnMMIO2MapKernel * @copydoc PDMDEVHLPR3::pfnROMRegister * @copydoc PDMDEVHLPR3::pfnROMProtectShadow * Register a save state data unit. * @param pDevIns The device instance. * @param uVersion Data layout version number. * @param cbGuess The approximate amount of data in the unit. * Only for progress indicators. * @param pfnSaveExec Execute save callback, optional. * @param pfnLoadExec Execute load callback, optional. NULL /*pfnLivePrep*/,
NULL /*pfnLiveExec*/,
NULL /*pfnLiveDone*/,
* Register a save state data unit with a live save callback as well. * @param pDevIns The device instance. * @param uVersion Data layout version number. * @param cbGuess The approximate amount of data in the unit. * Only for progress indicators. * @param pfnLiveExec Execute live callback, optional. * @param pfnSaveExec Execute save callback, optional. * @param pfnLoadExec Execute load callback, optional. * @copydoc PDMDEVHLPR3::pfnSSMRegister * @copydoc PDMDEVHLPR3::pfnTMTimerCreate * @copydoc PDMDEVHLPR3::pfnTMUtcNow * @copydoc PDMDEVHLPR3::pfnPhysRead * @copydoc PDMDEVHLPR3::pfnPhysWrite * @copydoc PDMDEVHLPR3::pfnPhysGCPhys2CCPtr * @copydoc PDMDEVHLPR3::pfnPhysGCPhys2CCPtrReadOnly * @copydoc PDMDEVHLPR3::pfnPhysReleasePageMappingLock * @copydoc PDMDEVHLPR3::pfnPhysReadGCVirt * @copydoc PDMDEVHLPR3::pfnPhysWriteGCVirt * @copydoc PDMDEVHLPR3::pfnPhysGCPtr2GCPhys * @copydoc PDMDEVHLPR3::pfnMMHeapAlloc * @copydoc PDMDEVHLPR3::pfnMMHeapAllocZ * @copydoc PDMDEVHLPR3::pfnMMHeapFree * @copydoc PDMDEVHLPR3::pfnVMState * @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet * @copydoc PDMDEVHLPR3::pfnVMSetError * @copydoc PDMDEVHLPR3::pfnVMSetRuntimeError * VBOX_STRICT wrapper for pHlp->pfnDBGFStopV. * @returns VBox status code which must be passed up to the VMM. This will be * VINF_SUCCESS in non-strict builds. * @param pDevIns The device instance. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszFormat Message. (optional) * @param ... Message parameters. * @copydoc PDMDEVHLPR3::pfnDBGFInfoRegister * @copydoc PDMDEVHLPR3::pfnSTAMRegister * @copydoc PDMDEVHLPR3::pfnSTAMRegisterF * @copydoc PDMDEVHLPR3::pfnPCIRegister * @copydoc PDMDEVHLPR3::pfnPCIIORegionRegister * @copydoc PDMDEVHLPR3::pfnPCIRegisterMsi * @copydoc PDMDEVHLPR3::pfnPCISetConfigCallbacks * @copydoc PDMDEVHLPR3::pfnPCISetIrq * @copydoc PDMDEVHLPR3::pfnPCISetIrqNoWait * @copydoc PDMDEVHLPR3::pfnISASetIrq * @copydoc PDMDEVHLPR3::pfnISASetIrqNoWait * @copydoc PDMDEVHLPR3::pfnDriverAttach * @copydoc PDMDEVHLPR3::pfnQueueCreate * Initializes a PDM critical section. * The PDM critical sections are derived from the IPRT critical sections, but * works in RC and R0 as well. * @returns VBox status code. * @param pDevIns The device instance. * @param pCritSect Pointer to the critical section. * @param RT_SRC_POS_DECL Use RT_SRC_POS. * @param pszNameFmt Format string for naming the critical section. * For statistics and lock validation. * @param ... Arguments for the format string. * @copydoc PDMDEVHLPR3::pfnThreadCreate * @copydoc PDMDEVHLPR3::pfnSetAsyncNotification * @copydoc PDMDEVHLPR3::pfnAsyncNotificationCompleted * @copydoc PDMDEVHLPR3::pfnA20Set * @copydoc PDMDEVHLPR3::pfnRTCRegister * @copydoc PDMDEVHLPR3::pfnPCIBusRegister * @copydoc PDMDEVHLPR3::pfnPICRegister * @copydoc PDMDEVHLPR3::pfnAPICRegister * @copydoc PDMDEVHLPR3::pfn * @copydoc PDMDEVHLPR3::pfnHPETRegister * @copydoc PDMDEVHLPR3::pfnPciRawRegister * @copydoc PDMDEVHLPR3::pfnDMACRegister * @copydoc PDMDEVHLPR3::pfnDMARegister * @copydoc PDMDEVHLPR3::pfnDMAReadMemory * @copydoc PDMDEVHLPR3::pfnDMAWriteMemory * @copydoc PDMDEVHLPR3::pfnDMASetDREQ * @copydoc PDMDEVHLPR3::pfnDMAGetChannelMode * @copydoc PDMDEVHLPR3::pfnDMASchedule * @copydoc PDMDEVHLPR3::pfnCMOSWrite * @copydoc PDMDEVHLPR3::pfnCMOSRead * @copydoc PDMDEVHLP::pfnCallR0 * @copydoc PDMDEVHLPR3::pfnGetVM * @copydoc PDMDEVHLPR3::pfnGetVMCPU * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGet * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGetFreq * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGetFreq * @copydoc PDMDEVHLPR3::pfnRegisterVMMDevHeap * @copydoc PDMDEVHLPR3::pfnUnregisterVMMDevHeap * @copydoc PDMDEVHLPR3::pfnVMReset * @copydoc PDMDEVHLPR3::pfnVMSuspend * @copydoc PDMDEVHLPR3::pfnVMSuspendSaveAndPowerOff * @copydoc PDMDEVHLPR3::pfnVMPowerOff * @copydoc PDMDEVHLPR3::pfnA20IsEnabled * @copydoc PDMDEVHLPR3::pfnGetCpuId * @copydoc PDMDEVHLPR0::pfnCanEmulateIoBlock /** Pointer to callbacks provided to the VBoxDeviceRegister() call. */ * Callbacks for VBoxDeviceRegister(). * This is set to PDM_DEVREG_CB_VERSION. */ * Registers a device with the current VM instance. * @returns VBox status code. * @param pCallbacks Pointer to the callback table. * @param pReg Pointer to the device registration record. * This data must be permanent and readonly. /** Current version of the PDMDEVREGCB structure. */ * The VBoxDevicesRegister callback function. * PDM will invoke this function after loading a device module and letting * the module decide which devices to register and how to handle conflicts. * @returns VBox status code. * @param pCallbacks Pointer to the callback table. * @param u32Version VBox version number.