pdmdev.h revision a8b31f6b3abd04475d4abcb5292aa22131b5130f
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM - Pluggable Device Manager, Devices.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Copyright (C) 2006-2011 Oracle Corporation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The contents of this file may alternatively be used under the terms
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * of the Common Development and Distribution License Version 1.0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution, in which case the provisions of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * CDDL are applicable instead of those of the GPL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * You may elect to license modified versions of this file under the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * terms and conditions of either the GPL or the CDDL or both.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pdm_device The PDM Devices API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @ingroup grp_pdm
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Construct a device instance for a VM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data. If the registration structure
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * is needed, it can be accessed thru pDevIns->pReg.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iInstance Instance number. Use this to figure out which registers
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * and such to use. The instance number is also found in
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pDevIns->iInstance, but since it's likely to be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * frequently used PDM passes it as parameter.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCfg Configuration node handle for the driver. This is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * expected to be in high demand in the constructor and is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * therefore passed as an argument. When using it at other
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * times, it can be found in pDrvIns->pCfg.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPDMDEVCONSTRUCT(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVCONSTRUCT() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Destruct a device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Most VM resources are freed by the VM. This callback is provided so that any non-VM
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * resources can be freed correctly.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * @param pDevIns The device instance data.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * @remarks The device critical section is not entered. The routine may delete
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * the critical section, so the caller cannot exit it.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPDMDEVDESTRUCT(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVDESTRUCT() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Device relocation callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is called when the instance data has been relocated in raw-mode context
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (RC). It is also called when the RC hypervisor selects changes. The device
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * must fixup all necessary pointers and re-query all interfaces to other RC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * devices and drivers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Before the RC code is executed the first time, this function will be called
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * with a 0 delta so RC pointer calculations can be one in one place.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Pointer to the device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param offDelta The relocation delta relative to the old location.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks A relocation CANNOT fail.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * @remarks The device critical section is not entered. The relocations should
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * not normally require any locking.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVRELOCATE(PPDMDEVINS pDevIns, RTGCINTPTR offDelta);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVRELOCATE() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Device I/O Control interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is used by external components, such as the COM interface, to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * communicate with devices using a class wide interface or a device
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * specific interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Pointer to the device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uFunction Function to perform.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvIn Pointer to input data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbIn Size of input data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvOut Pointer to output data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbOut Size of output data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pcbOut Where to store the actual size of the output data.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Not used.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsynctypedef DECLCALLBACK(int) FNPDMDEVIOCTL(PPDMDEVINS pDevIns, uint32_t uFunction,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVIOCTL() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Power On notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVPOWERON(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVPOWERON() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Reset notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVRESET(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVRESET() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Suspend notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT(0)
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVSUSPEND(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVSUSPEND() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Resume notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVRESUME(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVRESUME() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Power Off notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is only called when the VMR3PowerOff call is made on a running VM. This
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * means that there is no notification if the VM was suspended before being
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * powered of. There will also be no callback when hot plugging devices.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance data.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT(0)
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVPOWEROFF(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVPOWEROFF() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Attach command.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is called to let the device attach to a driver for a specified LUN
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * at runtime. This is not called during VM construction, the device
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * constructor have to attach to all the available drivers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is like plugging in the keyboard or mouse after turning on the PC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLUN The logical unit which is being detached.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPDMDEVATTACH(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVATTACH() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Detach notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is called when a driver is detaching itself from a LUN of the device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The device should adjust it's state to reflect this.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is like unplugging the network cable to use it for the laptop or
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * something while the PC is still running.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLUN The logical unit which is being detached.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(void) FNPDMDEVDETACH(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVDETACH() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Query the base interface of a logical unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBOX status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLUN The logicial unit to query.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppBase Where to store the pointer to the base interface of the LUN.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks The device critical section is not entered.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPDMDEVQUERYINTERFACE(PPDMDEVINS pDevIns, unsigned iLUN, PPDMIBASE *ppBase);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVQUERYINTERFACE() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPDMDEVQUERYINTERFACE *PFNPDMDEVQUERYINTERFACE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Init complete notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This can be done to do communication with other devices and other
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * initialization which requires everything to be in place.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBOX status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @remarks Caller enters the device critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPDMDEVINITCOMPLETE(PPDMDEVINS pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNPDMDEVINITCOMPLETE() function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPDMDEVINITCOMPLETE *PFNPDMDEVINITCOMPLETE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM Device Registration Structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This structure is used when registering a device from VBoxInitDevices() in HC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Ring-3. PDM will continue use till the VM is terminated.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DEVREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Device name. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Name of the raw-mode context module (no path).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Only evalutated if PDM_DEVREG_FLAGS_RC is set. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Name of the ring-0 module (no path).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Only evalutated if PDM_DEVREG_FLAGS_R0 is set. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The description of the device. The UTF-8 string pointed to shall, like this structure,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * remain unchanged from registration till VM destruction. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Flags, combination of the PDM_DEVREG_FLAGS_* \#defines. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Device class(es), combination of the PDM_DEVREG_CLASS_* \#defines. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Maximum number of instances (per VM). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Size of the instance data. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Construct instance - required. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync /** Destruct instance - optional.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * Critical section NOT entered (will be destroyed). */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync /** Relocation command - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section NOT entered. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync /** I/O Control interface - optional.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * Not used. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync /** Power on notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Reset notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Suspend notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Resume notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Attach command - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Detach notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync /** Query a LUN base interface - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is NOT entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Init complete notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Power off notification - optional.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Critical section is entered. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** @todo */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Initialization safty marker. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a PDM Device Structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Const pointer to a PDM Device Structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current DEVREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_VERSION PDM_VERSION_MAKE(0xffff, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** PDM Device Flags.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** This flag is used to indicate that the device has a RC component. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** This flag is used to indicate that the device has a R0 component. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The bit count for the current host. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT 0x00000010
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT 0x00000020
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The host bit count mask. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The device support only 32-bit guests. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The device support only 64-bit guests. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The device support both 32-bit & 64-bit guests. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_FLAGS_GUEST_BITS_32_64 0x00000300
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDM_DEVREG_FLAGS_GUEST_BITS_DEFAULT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The guest bit count for the current compilation. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDM_DEVREG_FLAGS_GUEST_BITS_DEFAULT PDM_DEVREG_FLAGS_GUEST_BITS_32
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDM_DEVREG_FLAGS_GUEST_BITS_DEFAULT PDM_DEVREG_FLAGS_GUEST_BITS_32_64
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The guest bit count mask. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** A convenience. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_FLAGS_DEFAULT_BITS (PDM_DEVREG_FLAGS_GUEST_BITS_DEFAULT | PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Indicates that the devices support PAE36 on a 32-bit guest. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Indicates that the device needs to be notified before the drivers when suspending. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION 0x00002000
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Indicates that the device needs to be notified before the drivers when powering off. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION 0x00004000
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** PDM Device Classes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The order is important, lower bit earlier instantiation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Architecture device. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Architecture BIOS device. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** PCI bus brigde. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** ISA bus brigde. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Input device (mouse, keyboard, joystick, HID, ...). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Interrupt controller (PIC). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Interval controoler (PIT). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** DMA controller. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** VMM Device. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Graphics device, like VGA. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Storage controller device. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Network interface controller. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Audio. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** USB HIC. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** ACPI. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Serial controller device. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Parallel controller device */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Host PCI pass-through device */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Misc devices (always last). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name IRQ Level for use with the *SetIrq APIs.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Assert the IRQ (can assume value 1). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Deassert the IRQ (can assume value 0). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** flip-flop - deassert and then assert the IRQ again immediately. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_IRQ_LEVEL_FLIP_FLOP (RT_BIT(1) | PDM_IRQ_LEVEL_HIGH)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registration record for MSI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMMSIREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Number of MSI interrupt vectors, 0 if MSI not supported */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Offset of MSI capability */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Offset of next capability to MSI */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** If we support 64-bit MSI addressing */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Number of MSI-X interrupt vectors, 0 if MSI-X not supported */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Offset of MSI-X capability */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Offset of next capability to MSI-X */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Value of PCI BAR (base addresss register) assigned by device for MSI-X page access */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI Bus registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * All the callbacks, except the PCIBIOS hack, are working on PCI devices.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPCIBUSREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version number. PDM_PCIBUSREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers the device with the default PCI bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Any PCI enabled device must keep this in it's instance data!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Fill in the PCI data config before registration, please.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName Pointer to device name (permanent, readonly). For debugging, not unique.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iDev The device number ((dev << 3) | function) the device should have on the bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * If negative, the pci bus device will assign one.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, const char *pszName, int iDev));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Initialize MSI support in a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pMsiReg MSI registration structure
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRegisterMsiR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PPDMMSIREG pMsiReg));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers a I/O region (memory mapped or I/O ports) for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRegion Size of the region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iType PCI_ADDRESS_SPACE_MEM, PCI_ADDRESS_SPACE_IO or PCI_ADDRESS_SPACE_MEM_PREFETCH.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnCallback Callback for doing the mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnIORegionRegisterR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iRegion, uint32_t cbRegion, PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register PCI configuration space read/write callbacks.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnRead Pointer to the user defined PCI config read function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppfnReadOld Pointer to function pointer which will receive the old (default)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI config read function. This way, user can decide when (and if)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to call default PCI config read function. Can be NULL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWrite Pointer to the user defined PCI config write function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWriteOld Pointer to function pointer which will receive the old (default)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI config write function. This way, user can decide when (and if)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to call default PCI config write function. Can be NULL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetConfigCallbacksR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the IRQ for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Saves a state of the PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev Pointer to PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pSSMHandle The handle to save the state to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnSaveExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Loads a saved PCI device state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev Pointer to PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pSSMHandle The handle to the saved state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLoadExecR3,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSMHandle));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Called to perform the job of the bios.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is only called for the first PCI Bus - it is expected to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * service all the PCI buses.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the first bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnFakePCIBIOSR3,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the SetIrq RC entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the SetIrq R0 entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a PCI bus registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPCIBUSREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PCIBUSREG_VERSION PDM_VERSION_MAKE(0xfffe, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI Bus RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPCIHLPRC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PCIHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an ISA IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnIsaSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an I/O-APIC IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Send an MSI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCAddr Physical address MSI request was written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uValue Value written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const PDMPCIHLPRC *) PCPDMPCIHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPCIHLPRC version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PCIHLPRC_VERSION PDM_VERSION_MAKE(0xfffd, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI Bus R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPCIHLPR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PCIHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an ISA IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnIsaSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an I/O-APIC IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Send an MSI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCAddr Physical address MSI request was written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uValue Value written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const PDMPCIHLPR0 *) PCPDMPCIHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPCIHLPR0 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI device helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPCIHLPR3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PCIHLPR3_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an ISA IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnIsaSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set an I/O-APIC IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnIoApicSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Send an MSI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCAddr Physical address MSI request was written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uValue Value written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if the given address is an MMIO2 base address or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true/false accordingly.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pOwner The owner of the memory, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The address to check.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnIsMMIO2Base,(PPDMDEVINS pDevIns, PPDMDEVINS pOwner, RTGCPHYS GCPhys));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the RC PCI Bus helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns RC pointer to the PCI Bus helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMPCIHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the R0 PCI Bus helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns R0 pointer to the PCI Bus helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMPCIHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Fatal error on failure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc Dummy for making the interface identical to the RC and R0 versions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PCI helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const PDMPCIHLPR3 *) PCPDMPCIHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPCIHLPR3 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PCIHLPR3_VERSION PDM_VERSION_MAKE(0xfffb, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Programmable Interrupt Controller registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPICREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version number. PDM_PICREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the an IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get a pending interrupt.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Pending interrupt number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC SetIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC GetInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 SetIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 GetInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a PIC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPICREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PICREG_VERSION PDM_VERSION_MAKE(0xfffa, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PIC RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPICHLPRC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PICHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PIC RC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PIC RC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const PDMPICHLPRC *) PCPDMPICHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPICHLPRC version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PICHLPRC_VERSION PDM_VERSION_MAKE(0xfff9, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PIC R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPICHLPR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PICHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PCI device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PIC R0 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PIC R0 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const PDMPICHLPR0 *) PCPDMPICHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPICHLPR0 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PICHLPR0_VERSION PDM_VERSION_MAKE(0xfff8, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PIC R3 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMPICHLPR3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_PICHLP_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Fatal error on failure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc Dummy for making the interface identical to the RC and R0 versions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The PIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the RC PIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns RC pointer to the PIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMPICHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the R0 PIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns R0 pointer to the PIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the PIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMPICHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PIC R3 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const PIC R3 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const PDMPICHLPR3 *) PCPDMPICHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMPICHLPR3 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_PICHLPR3_VERSION PDM_VERSION_MAKE(0xfff7, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Advanced Programmable Interrupt Controller registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMAPICREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version number. PDM_APICREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get a pending interrupt.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Pending interrupt number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Check if the APIC has a pending interrupt/if a TPR change would active one
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Pending interrupt yes/no
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnHasPendingIrqR3,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the APIC base.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u64Base The new base.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetBaseR3,(PPDMDEVINS pDevIns, uint64_t u64Base));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the APIC base.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current base.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint64_t, pfnGetBaseR3,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the TPR (task priority register).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu VCPU id
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8TPR The new TPR.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetTPRR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t u8TPR));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the TPR (task priority register).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The current TPR.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu VCPU id
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint8_t, pfnGetTPRR3,(PPDMDEVINS pDevIns, VMCPUID idCpu));
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * Write to a MSR in APIC range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Target CPU.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * @param u32Reg The MSR begin written to.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * @param u64Value The value to write.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * @remarks Unlike the other callbacks, the PDM lock is not taken before
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * calling this method.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnWriteMSRR3, (PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t u32Reg, uint64_t u64Value));
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * Read from a MSR in APIC range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Target CPU.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u32Reg MSR to read.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * @param pu64Value Where to return the read value.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * @remarks Unlike the other callbacks, the PDM lock is not taken before
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * calling this method.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnReadMSRR3, (PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t u32Reg, uint64_t *pu64Value));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Private interface between the IOAPIC and APIC.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * This is a low-level, APIC/IOAPIC implementation specific interface which
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * is registered with PDM only because it makes life so much simpler right
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * now (GC bits). This is a bad bad hack! The correct way of doing this
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * would involve some way of querying GC interfaces and relocating them.
1167f682bad8a5c086022e181da3bb4028a20ff8vboxsync * Perhaps doing some kind of device init in GC...
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Dest See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DestMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DeliveryMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iVector See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Polarity See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8TriggerMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnBusDeliverR3,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Deliver a signal to CPU's local interrupt pins (LINT0/LINT1). Used for
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * virtual wire mode when interrupts from the PIC are passed through LAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Pin Local pin number (0 or 1 for current CPUs).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLocalInterruptR3,(PPDMDEVINS pDevIns, uint8_t u8Pin, uint8_t u8Level));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC GetInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC HasPendingIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC SetBase entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC GetBase entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC SetTPR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC GetTPR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC WriteMSR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC ReadMSR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC BusDeliver entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the RC LocalInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 GetInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 HasPendingIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 SetBase entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 GetBase entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 SetTPR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 GetTPR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 WriteMSR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 ReadMSR entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 BusDeliver entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 LocalInterrupt entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to an APIC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMAPICREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_APICREG_VERSION PDM_VERSION_MAKE(0xfff6, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * APIC version argument for pfnChangeFeature.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Invalid 0 entry. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** No APIC. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Standard APIC (X86_CPUID_FEATURE_EDX_APIC). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Intel X2APIC (X86_CPUID_FEATURE_ECX_X2APIC). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit paranoia. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * APIC irq argument for SetInterruptFF.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Invalid 0 entry. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Normal hardware interrupt. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** NMI. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** SMI. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** ExtINT (HW interrupt via PIC). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit paranoia. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * APIC RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMAPICHLPRC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_APICHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to set flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to clear flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Modifies APIC-related bits in the CPUID feature mask.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmVersion Supported APIC version.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the virtual CPU id corresponding to the current EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(VMCPUID, pfnGetCpuId,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to APIC GC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const APIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const PDMAPICHLPRC *) PCPDMAPICHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMAPICHLPRC version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_APICHLPRC_VERSION PDM_VERSION_MAKE(0xfff5, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * APIC R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMAPICHLPR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_APICHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to set flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to clear flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Modifies APIC-related bits in the CPUID feature mask.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmVersion Supported APIC version.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the virtual CPU id corresponding to the current EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(VMCPUID, pfnGetCpuId,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to APIC GC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const APIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const PDMAPICHLPR0 *) PCPDMAPICHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMAPICHLPR0 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_APICHLPR0_VERSION PDM_VERSION_MAKE(0xfff4, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * APIC R3 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMAPICHLPR3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_APICHLPR3_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to set flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clear the interrupt force action flag.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType IRQ type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to clear flag upon.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnClearInterruptFF,(PPDMDEVINS pDevIns, PDMAPICIRQ enmType, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Modifies APIC-related bits in the CPUID feature mask.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmVersion Supported APIC version.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the virtual CPU id corresponding to the current EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(VMCPUID, pfnGetCpuId,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Sends SIPI to given virtual CPU.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to perform SIPI on
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iVector SIPI vector
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSendSipi,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t uVector));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Sends init IPI to given virtual CPU, should result in reset and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * halting till SIPI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param idCpu Virtual CPU to perform SIPI on
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSendInitIpi,(PPDMDEVINS pDevIns, VMCPUID idCpu));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the RC APIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns GC pointer to the APIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMAPICHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the R0 APIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns R0 pointer to the APIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMAPICHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the critical section used to synchronize the PICs, PCI and stuff.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Ring-3 pointer to the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(R3PTRTYPE(PPDMCRITSECT), pfnGetR3CritSect,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the critical section used to synchronize the PICs, PCI and stuff.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Raw-mode context pointer to the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(RCPTRTYPE(PPDMCRITSECT), pfnGetRCCritSect,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the critical section used to synchronize the PICs, PCI and stuff.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Ring-0 pointer to the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The APIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(R0PTRTYPE(PPDMCRITSECT), pfnGetR0CritSect,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to APIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const APIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const PDMAPICHLPR3 *) PCPDMAPICHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMAPICHLP version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_APICHLPR3_VERSION PDM_VERSION_MAKE(0xfff3, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * I/O APIC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMIOAPICREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Struct version+magic number (PDM_IOAPICREG_VERSION). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the an IRQ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the I/O APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the GC SetIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 SetIrq entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Send a MSI.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the I/O APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Request address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uValue Request value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSendMsiR3,(PPDMDEVINS pDevIns, RTGCPHYS GCAddr, uint32_t uValue));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the GC SendMsi entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The name of the R0 SendMsi entry point. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to an APIC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMAPICREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_IOAPICREG_VERSION PDM_VERSION_MAKE(0xfff2, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * IOAPIC RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_IOAPICHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Private interface between the IOAPIC and APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * See comments about this hack on PDMAPICREG::pfnBusDeliverR3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the IOAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Dest See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DestMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DeliveryMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iVector See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Polarity See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8TriggerMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to IOAPIC RC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(PDMIOAPICHLPRC *) PPDMIOAPICHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const IOAPIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const PDMIOAPICHLPRC *) PCPDMIOAPICHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMIOAPICHLPRC version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_IOAPICHLPRC_VERSION PDM_VERSION_MAKE(0xfff1, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * IOAPIC R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_IOAPICHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Private interface between the IOAPIC and APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * See comments about this hack on PDMAPICREG::pfnBusDeliverR3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the IOAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Dest See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DestMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DeliveryMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iVector See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Polarity See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8TriggerMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc What to return if we fail to acquire the lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to IOAPIC R0 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(PDMIOAPICHLPR0 *) PPDMIOAPICHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const IOAPIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const PDMIOAPICHLPR0 *) PCPDMIOAPICHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMIOAPICHLPR0 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_IOAPICHLPR0_VERSION PDM_VERSION_MAKE(0xfff0, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * IOAPIC R3 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_IOAPICHLPR3_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Private interface between the IOAPIC and APIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * See comments about this hack on PDMAPICREG::pfnBusDeliverR3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns status code
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the IOAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Dest See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DestMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8DeliveryMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iVector See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Polarity See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8TriggerMode See APIC implementation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnApicBusDeliver,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint8_t iVector, uint8_t u8Polarity, uint8_t u8TriggerMode));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Acquires the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Fatal error on failure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc Dummy for making the interface identical to the GC and R0 versions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLock,(PPDMDEVINS pDevIns, int rc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Releases the PDM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The IOAPIC device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the RC IOAPIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns RC pointer to the IOAPIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the IOAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMIOAPICHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the R0 IOAPIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns R0 pointer to the IOAPIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the IOAPIC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMIOAPICHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to IOAPIC R3 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(PDMIOAPICHLPR3 *) PPDMIOAPICHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const IOAPIC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const PDMIOAPICHLPR3 *) PCPDMIOAPICHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMIOAPICHLPR3 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_IOAPICHLPR3_VERSION PDM_VERSION_MAKE(0xffef, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * HPET registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMHPETREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Struct version+magic number (PDM_HPETREG_VERSION). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to an HPET registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMHPETREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_HPETREG_VERSION PDM_VERSION_MAKE(0xffe2, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * HPET RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remarks Keep this around in case HPET will need PDM interaction in again RC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * at some later point.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMHPETHLPRC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_HPETHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to HPET RC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const HPET RC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const PDMHPETHLPRC *) PCPDMHPETHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMHPETHLPRC version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_HPETHLPRC_VERSION PDM_VERSION_MAKE(0xffee, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * HPET R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remarks Keep this around in case HPET will need PDM interaction in again R0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * at some later point.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMHPETHLPR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_HPETHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to HPET R0 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const HPET R0 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const PDMHPETHLPR0 *) PCPDMHPETHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMHPETHLPR0 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_HPETHLPR0_VERSION PDM_VERSION_MAKE(0xffed, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * HPET R3 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMHPETHLPR3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_HPETHLP_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the RC HPET helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the RC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns RC pointer to the HPET helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the HPET.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMHPETHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the address of the R0 HPET helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be called at both construction and relocation time
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to obtain the correct address of the R0 helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns R0 pointer to the HPET helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the HPET.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PCPDMHPETHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set legacy mode on PIT and RTC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to set legacy mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the HPET.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fActivated Whether legacy mode is activated or deactivated.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnSetLegacyMode,(PPDMDEVINS pDevIns, bool fActivated));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set IRQ, bypassing ISA bus override rules.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc if we failed to set legacy mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the HPET.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fActivate Activate or deactivate legacy mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnSetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to HPET R3 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const HPET R3 helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const PDMHPETHLPR3 *) PCPDMHPETHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMHPETHLPR3 version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_HPETHLPR3_VERSION PDM_VERSION_MAKE(0xffec, 2, 0)
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Raw PCI device registration structure.
11923fc977be1686f5428c3e790c04d0701a074cvboxsynctypedef struct PDMPCIRAWREG
11923fc977be1686f5428c3e790c04d0701a074cvboxsync /** Struct version+magic number (PDM_PCIRAWREG_VERSION). */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Just a safety precaution. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsync/** Pointer to a raw PCI registration structure. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsync/** Current PDMPCIRAWREG version number. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync#define PDM_PCIRAWREG_VERSION PDM_VERSION_MAKE(0xffe1, 1, 0)
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Raw PCI device raw-mode context helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Structure version and magic number (PDM_PCIRAWHLPRC_VERSION). */
11923fc977be1686f5428c3e790c04d0701a074cvboxsync /** Just a safety precaution. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to a raw PCI deviec raw-mode context helper structure. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsynctypedef RCPTRTYPE(PDMPCIRAWHLPRC *) PPDMPCIRAWHLPRC;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to a const raw PCI deviec raw-mode context helper structure. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsynctypedef RCPTRTYPE(const PDMPCIRAWHLPRC *) PCPDMPCIRAWHLPRC;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Current PDMPCIRAWHLPRC version number. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync#define PDM_PCIRAWHLPRC_VERSION PDM_VERSION_MAKE(0xffe0, 1, 0)
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Raw PCI device ring-0 context helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Structure version and magic number (PDM_PCIRAWHLPR0_VERSION). */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Just a safety precaution. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to a raw PCI deviec ring-0 context helper structure. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsynctypedef R0PTRTYPE(PDMPCIRAWHLPR0 *) PPDMPCIRAWHLPR0;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to a const raw PCI deviec ring-0 context helper structure. */
11923fc977be1686f5428c3e790c04d0701a074cvboxsynctypedef R0PTRTYPE(const PDMPCIRAWHLPR0 *) PCPDMPCIRAWHLPR0;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Current PDMPCIRAWHLPR0 version number. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync#define PDM_PCIRAWHLPR0_VERSION PDM_VERSION_MAKE(0xffdf, 1, 0)
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Raw PCI device ring-3 context helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Undefined structure version and magic number. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Gets the address of the RC raw PCI device helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * This should be called at both construction and relocation time to obtain
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * the correct address of the RC helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @returns RC pointer to the raw PCI device helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @param pDevIns Device instance of the raw PCI device.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync DECLR3CALLBACKMEMBER(PCPDMPCIRAWHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Gets the address of the R0 raw PCI device helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * This should be called at both construction and relocation time to obtain
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * the correct address of the R0 helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @returns R0 pointer to the raw PCI device helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @param pDevIns Device instance of the raw PCI device.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync DECLR3CALLBACKMEMBER(PCPDMPCIRAWHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync /** Just a safety precaution. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to raw PCI R3 helpers. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsynctypedef R3PTRTYPE(PDMPCIRAWHLPR3 *) PPDMPCIRAWHLPR3;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Pointer to const raw PCI R3 helpers. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsynctypedef R3PTRTYPE(const PDMPCIRAWHLPR3 *) PCPDMPCIRAWHLPR3;
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync/** Current PDMPCIRAWHLPR3 version number. */
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync#define PDM_PCIRAWHLPR3_VERSION PDM_VERSION_MAKE(0xffde, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * DMA Transfer Handler.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Number of bytes transferred.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMA.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off DMA position.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb Block size.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(uint32_t) FNDMATRANSFERHANDLER(PPDMDEVINS pDevIns, void *pvUser, unsigned uChannel, uint32_t off, uint32_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a FNDMATRANSFERHANDLER(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNDMATRANSFERHANDLER *PFNDMATRANSFERHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * DMA Controller registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDMAREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version number. PDM_DMACREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Execute pending transfers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns A more work indiciator. I.e. 'true' if there is more to be done, and 'false' if all is done.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnRun,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register transfer function for DMA channel.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnTransferHandler Device specific transfer function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUSer User pointer to be passed to the callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnRegister,(PPDMDEVINS pDevIns, unsigned uChannel, PFNDMATRANSFERHANDLER pfnTransferHandler, void *pvUser));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read memory
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Number of bytes read.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuffer Pointer to target buffer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off DMA position.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBlock Block size.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint32_t, pfnReadMemory,(PPDMDEVINS pDevIns, unsigned uChannel, void *pvBuffer, uint32_t off, uint32_t cbBlock));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write memory
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Number of bytes written.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuffer Memory to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off DMA position.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBlock Block size.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint32_t, pfnWriteMemory,(PPDMDEVINS pDevIns, unsigned uChannel, const void *pvBuffer, uint32_t off, uint32_t cbBlock));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the DREQ line.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uLevel Level of the line.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSetDREQ,(PPDMDEVINS pDevIns, unsigned uChannel, unsigned uLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get channel mode
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Channel mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMAC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint8_t, pfnGetChannelMode,(PPDMDEVINS pDevIns, unsigned uChannel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a DMAC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDMACREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DMACREG_VERSION PDM_VERSION_MAKE(0xffeb, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * DMA Controller device helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDMACHLP
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DMACHLP_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /* to-be-defined */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to DMAC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const DMAC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDMACHLP version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DMACHLP_VERSION PDM_VERSION_MAKE(0xffea, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RTC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMRTCREG
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version number. PDM_RTCREG_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t u32Alignment; /**< structure size alignment. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write to a CMOS register and update the checksum if necessary.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the RTC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iReg The CMOS register index.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Value The CMOS register value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read a CMOS register.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the RTC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iReg The CMOS register index.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pu8Value Where to store the CMOS register value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a RTC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a const RTC registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMRTCREG version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_RTCREG_VERSION PDM_VERSION_MAKE(0xffe9, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RTC device helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMRTCHLP
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_RTCHLP_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /* to-be-defined */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to RTC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to const RTC helpers. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMRTCHLP version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_RTCHLP_VERSION PDM_VERSION_MAKE(0xffe8, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM Device API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVHLPR3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DEVHLP_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a number of I/O ports with a device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are of course for the host context (HC).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register HC handlers before guest context (GC) handlers! There must be a
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * HC handler for every GC handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the ports with.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param Port First port number in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cPorts Number of ports to register.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnOut Pointer to function which is gonna handle OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnIn Pointer to function which is gonna handle IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnOutStr Pointer to function which is gonna handle string OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnInStr Pointer to function which is gonna handle string IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be freed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnIOPortRegister,(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTHCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNIOMIOPORTOUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a number of I/O ports with a device for RC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are for the raw-mode context (RC). Register ring-3 context
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (R3) handlers before raw-mode context handlers! There must be a R3 handler
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * for every RC handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the ports with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * and which RC module to resolve the names
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param Port First port number in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cPorts Number of ports to register.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszOut Name of the RC function which is gonna handle OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszIn Name of the RC function which is gonna handle IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszOutStr Name of the RC function which is gonna handle string OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszInStr Name of the RC function which is gonna handle string IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be freed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnIOPortRegisterRC,(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTRCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszOutStr, const char *pszInStr, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a number of I/O ports with a device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are of course for the ring-0 host context (R0).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register R3 (HC) handlers before R0 (R0) handlers! There must be a R3 (HC) handler for every R0 handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the ports with.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param Port First port number in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cPorts Number of ports to register.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument. (if pointer, then it must be in locked memory!)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszOut Name of the R0 function which is gonna handle OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszIn Name of the R0 function which is gonna handle IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszOutStr Name of the R0 function which is gonna handle string OUT operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszInStr Name of the R0 function which is gonna handle string IN operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be freed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnIOPortRegisterR0,(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTR0PTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszOutStr, const char *pszInStr, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Deregister I/O ports.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This naturally affects both guest context (GC), ring-0 (R0) and ring-3 (R3/HC) handlers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance owning the ports.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param Port First port number in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cPorts Number of ports to deregister.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnIOPortDeregister,(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a Memory Mapped I/O (MMIO) region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are of course for the ring-3 context (R3). Register HC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * handlers before raw-mode context (RC) and ring-0 context (R0) handlers! There
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * must be a R3 handler for every RC and R0 handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the MMIO with.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart First physical address in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the range (in bytes).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWrite Pointer to function which is gonna handle Write operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnRead Pointer to function which is gonna handle Read operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnFill Pointer to function which is gonna handle Fill/memset operations. (optional)
cea26cf0a0d390c2cca75cb19cb0e86c580e9d77vboxsync * @param fFlags Flags, IOMMMIO_FLAGS_XXX.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be freed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIORegister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTHCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a Memory Mapped I/O (MMIO) region for GC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are for the raw-mode context (RC). Register ring-3 context
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (R3) handlers before guest context handlers! There must be a R3 handler for
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * every RC handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the MMIO with.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart First physical address in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the range (in bytes).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszWrite Name of the RC function which is gonna handle Write operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszRead Name of the RC function which is gonna handle Read operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFill Name of the RC function which is gonna handle Fill/memset operations. (optional)
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIORegisterRC,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTRCPTR pvUser,
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync const char *pszWrite, const char *pszRead, const char *pszFill));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a Memory Mapped I/O (MMIO) region for R0.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These callbacks are for the ring-0 host context (R0). Register ring-3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * constext (R3) handlers before R0 handlers! There must be a R3 handler for
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * every R0 handler!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance to register the MMIO with.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart First physical address in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the range (in bytes).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument. (if pointer, then it must be in locked memory!)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszWrite Name of the RC function which is gonna handle Write operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszRead Name of the RC function which is gonna handle Read operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFill Name of the RC function which is gonna handle Fill/memset operations. (optional)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Obsolete. NULL is fine.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIORegisterR0,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTR0PTR pvUser,
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync const char *pszWrite, const char *pszRead, const char *pszFill));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Deregister a Memory Mapped I/O (MMIO) region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This naturally affects both guest context (GC), ring-0 (R0) and ring-3 (R3/HC) handlers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance owning the MMIO region(s).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart First physical address in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the range (in bytes).
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIODeregister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Allocate and register a MMIO2 region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * As mentioned elsewhere, MMIO2 is just RAM spelled differently. It's
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RAM associated with a device. It is also non-shared memory with a
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * permanent ring-3 mapping and page backing (presently).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number. Use the PCI region number as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * this must be known to the PCI bus device too. If
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * it's not associated with the PCI device, then
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * any number up to UINT8_MAX is fine.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb The size (in bytes) of the region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Reserved for future use, must be zero.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppv Where to store the address of the ring-3 mapping
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * of the memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIO2Register,(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS cb, uint32_t fFlags, void **ppv, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Deregisters and frees a MMIO2 region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Any physical (and virtual) access handlers registered for the region must
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * be deregistered before calling this function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number used during registration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIO2Deregister,(PPDMDEVINS pDevIns, uint32_t iRegion));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Maps a MMIO2 region into the physical memory space.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * A MMIO2 range may overlap with base memory if a lot of RAM
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * is configured for the VM, in which case we'll drop the base
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * memory pages. Presently we will make no attempt to preserve
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * anything that happens to be present in the base memory that
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * is replaced, this is of course incorrectly but it's too much
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number used during registration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The physical address to map it at.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIO2Map,(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Unmaps a MMIO2 region previously mapped using pfnMMIO2Map.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number used during registration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The physical address it's currently mapped at.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIO2Unmap,(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Maps a portion of an MMIO2 region into the hypervisor region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Callers of this API must never deregister the MMIO2 region before the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VM is powered off.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @return VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device owning the MMIO2 memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off The offset into the region. Will be rounded down
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to closest page boundary.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb The number of bytes to map. Will be rounded up
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to the closest page boundary.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Mapping description.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRCPtr Where to store the RC address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMHyperMapMMIO2,(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Maps a portion of an MMIO2 region into kernel space (host).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The kernel mapping will become invalid when the MMIO2 memory is deregistered
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * or the VM is terminated.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @return VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device owning the MMIO2 memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off The offset into the region. Must be page
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb The number of bytes to map. Must be page
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Mapping description.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pR0Ptr Where to store the R0 address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnMMIO2MapKernel,(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a ROM (BIOS) region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * It goes without saying that this is read-only memory. The memory region must be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * in unassigned memory. I.e. from the top of the address space or on the PC in
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the 0xa0000-0xfffff range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance owning the ROM region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart First physical address in the range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Must be page aligned!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the range (in bytes).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Must be page aligned!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBinary Pointer to the binary data backing the ROM image.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBinary The size of the binary pointer. This must
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * be equal or smaller than @a cbRange.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Shadow ROM flags, PGMPHYS_ROM_FLAGS_* in pgm.h.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string. This must not be freed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark There is no way to remove the rom, automatically on device cleanup or
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * manually from the device yet. At present I doubt we need such features...
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnROMRegister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const void *pvBinary, uint32_t cbBinary, uint32_t fFlags, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Changes the protection of shadowed ROM mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is intented for use by the system BIOS, chipset or device in question to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * change the protection of shadowed ROM code after init and on reset.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysStart Where the mapping starts.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange The size of the mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmProt The new protection type.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnROMProtectShadow,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, PGMROMPROT enmProt));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a save state data unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName Data unit name.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uInstance The instance identifier of the data unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This must together with the name be unique.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uVersion Data layout version number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbGuess The approximate amount of data in the unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Only for progress indicators.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszBefore Name of data unit which we should be put in
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * front of. Optional (NULL).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLivePrep Prepare live save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLiveExec Execute live save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLiveVote Vote live save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnSavePrep Prepare save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnSaveExec Execute save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnSaveDone Done save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLoadPrep Prepare load callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLoadExec Execute load callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLoadDone Done load callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnSSMRegister,(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess, const char *pszBefore,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVLIVEPREP pfnLivePrep, PFNSSMDEVLIVEEXEC pfnLiveExec, PFNSSMDEVLIVEVOTE pfnLiveVote,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Creates a timer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmClock The clock to use on this timer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnCallback Callback function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument for the callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Flags, see TMTIMER_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to description string which must stay around
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppTimer Where to store the timer on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnTMTimerCreate,(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, void *pvUser, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the real world UTC time adjusted for VM lag, user offset and warpdrive.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns pTime.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pTime Where to store the time.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PRTTIMESPEC, pfnTMUtcNow,(PPDMDEVINS pDevIns, PRTTIMESPEC pTime));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS (for now).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address start reading from.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf Where to put the read bits.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRead How many bytes to read.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but the call may involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysRead,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write to physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address to write to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf What to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbWrite How many bytes to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but the call may involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysWrite,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Requests the mapping of a guest page into ring-3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When you're done with the page, call pfnPhysReleasePageMappingLock() ASAP to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * release it.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This API will assume your intention is to write to the page, and will
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * therefore replace shared and zero pages. If you do not intend to modify the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * page, use the pfnPhysGCPhys2CCPtrReadOnly() API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid page but has no physical
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * backing or if the page has any active access handlers. The caller
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * must fall back on using PGMR3PhysWriteExternal.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS if it's not a valid physical address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM The VM handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The guest physical address of the page that
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * should be mapped.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Flags reserved for future use, MBZ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppv Where to store the address corresponding to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pLock Where to store the lock information that
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pfnPhysReleasePageMappingLock needs.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark Avoid calling this API from within critical sections (other than the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGM one) because of the deadlock risk when we have to delegating the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * task to an EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysGCPhys2CCPtr,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, void **ppv, PPGMPAGEMAPLOCK pLock));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Requests the mapping of a guest page into ring-3, external threads.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When you're done with the page, call pfnPhysReleasePageMappingLock() ASAP to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * release it.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VINF_SUCCESS on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid page but has no physical
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * backing or if the page as an active ALL access handler. The caller
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * must fall back on using PGMPhysRead.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS if it's not a valid physical address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The guest physical address of the page that
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * should be mapped.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags Flags reserved for future use, MBZ.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppv Where to store the address corresponding to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pLock Where to store the lock information that
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pfnPhysReleasePageMappingLock needs.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark Avoid calling this API from within critical sections.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysGCPhys2CCPtrReadOnly,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, void const **ppv, PPGMPAGEMAPLOCK pLock));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Release the mapping of a guest page.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is the counter part of pfnPhysGCPhys2CCPtr and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pfnPhysGCPhys2CCPtrReadOnly.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pLock The lock structure initialized by the mapping
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnPhysReleasePageMappingLock,(PPDMDEVINS pDevIns, PPGMPAGEMAPLOCK pLock));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read guest physical memory by virtual address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvDst Where to put the read bits.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCVirtSrc Guest virtual address to start reading from.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb How many bytes to read.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysReadGCVirt,(PPDMDEVINS pDevIns, void *pvDst, RTGCPTR GCVirtSrc, size_t cb));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write to guest physical memory by virtual address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCVirtDst Guest virtual address to write to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvSrc What to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb How many bytes to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysWriteGCVirt,(PPDMDEVINS pDevIns, RTGCPTR GCVirtDst, const void *pvSrc, size_t cb));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Convert a guest virtual address to a guest physical address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtr Guest virtual address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pGCPhys Where to store the GC physical address
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * corresponding to GCPtr.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark Careful with page boundaries.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPhysGCPtr2GCPhys, (PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Allocate memory which is associated with current VM instance
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * and automatically freed on it's destruction.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Pointer to allocated memory. The memory is *NOT* zero-ed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb Number of bytes to allocate.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void *, pfnMMHeapAlloc,(PPDMDEVINS pDevIns, size_t cb));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Allocate memory which is associated with current VM instance
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * and automatically freed on it's destruction. The memory is ZEROed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Pointer to allocated memory. The memory is *NOT* zero-ed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cb Number of bytes to allocate.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void *, pfnMMHeapAllocZ,(PPDMDEVINS pDevIns, size_t cb));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Free memory allocated with pfnMMHeapAlloc() and pfnMMHeapAllocZ().
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pv Pointer to the memory to free.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnMMHeapFree,(PPDMDEVINS pDevIns, void *pv));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread (just keep in mind that it's volatile info).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if the VM was teleported and hasn't been fully resumed yet.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true / false.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnVMTeleportedAndNotFullyResumedYet,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Stops the VM and enters the debugger to look at the guest state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Use the PDMDeviceDBGFStop() inline function with the RT_SRC_POS macro instead of
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * invoking this function directly.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code which must be passed up to the VMM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFile Filename of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLine The linenumber of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFunction Function of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Message. (optional)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param args Message parameters.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDBGFStopV,(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction, const char *pszFormat, va_list args));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a info handler with DBGF,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName The identifier of the info.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc The description of the info and any arguments
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the handler may take.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnHandler The handler function to be called to display the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDBGFInfoRegister,(PPDMDEVINS pDevIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERDEV pfnHandler));
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * Gets the trace buffer handle.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * really inteded for direct usage, thus no inline wrapper function.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @returns Trace buffer handle or NIL_RTTRACEBUF.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @param pDevIns The device instance.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync DECLR3CALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers a statistics sample if statistics are enabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMA.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvSample Pointer to the sample.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType Sample type. This indicates what pvSample is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pointing at.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName Sample name. The name is on this form
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * "/<component>/<sample>". Further nesting is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * possible.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmUnit Sample unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Sample description.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSTAMRegister,(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Same as pfnSTAMRegister except that the name is specified in a
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RTStrPrintf like fashion.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMA.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvSample Pointer to the sample.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType Sample type. This indicates what pvSample is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pointing at.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmVisibility Visibility type specifying whether unused
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * statistics should be visible or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmUnit Sample unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Sample description.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName The sample name format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Arguments to the format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSTAMRegisterF,(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STAMUNIT enmUnit, const char *pszDesc, const char *pszName, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Same as pfnSTAMRegister except that the name is specified in a
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RTStrPrintfV like fashion.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance of the DMA.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvSample Pointer to the sample.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType Sample type. This indicates what pvSample is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pointing at.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmVisibility Visibility type specifying whether unused
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * statistics should be visible or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmUnit Sample unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Sample description.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName The sample name format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param args Arguments to the format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnSTAMRegisterV,(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync STAMUNIT enmUnit, const char *pszDesc, const char *pszName, va_list args));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers the device with the default PCI bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Any PCI enabled device must keep this in it's instance data!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Fill in the PCI data config before registration, please.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark This is the simple interface, a Ex interface will be created if
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * more features are needed later.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPCIRegister,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Initialize MSI support in a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pMsiReg MSI registartion structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPCIRegisterMsi,(PPDMDEVINS pDevIns, PPDMMSIREG pMsiReg));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers a I/O region (memory mapped or I/O ports) for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iRegion The region number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRegion Size of the region.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType PCI_ADDRESS_SPACE_MEM, PCI_ADDRESS_SPACE_IO or PCI_ADDRESS_SPACE_MEM_PREFETCH.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnCallback Callback for doing the mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPCIIORegionRegister,(PPDMDEVINS pDevIns, int iRegion, uint32_t cbRegion, PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register PCI configuration space read/write callbacks.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciDev The PCI device structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * If NULL the default PCI device for this device instance is used.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnRead Pointer to the user defined PCI config read function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppfnReadOld Pointer to function pointer which will receive the old (default)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI config read function. This way, user can decide when (and if)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to call default PCI config read function. Can be NULL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWrite Pointer to the user defined PCI config write function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWriteOld Pointer to function pointer which will receive the old (default)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PCI config write function. This way, user can decide when (and if)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to call default PCI config write function. Can be NULL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnPCISetConfigCallbacks,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the IRQ for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnPCISetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the IRQ for a PCI device, but don't wait for EMT to process
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the request when not called from EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnPCISetIrqNoWait,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set ISA IRQ for a device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnISASetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the ISA IRQ for a device, but don't wait for EMT to process
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the request when not called from EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnISASetIrqNoWait,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Attaches a driver (chain) to the device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The first call for a LUN this will serve as a registartion of the LUN. The pBaseInterface and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the pszDesc string will be registered with that LUN and kept around for PDMR3QueryDeviceLun().
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLun The logical unit to attach.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pBaseInterface Pointer to the base interface for that LUN. (device side / down)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppBaseInterface Where to store the pointer to the base interface. (driver side / up)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszDesc Pointer to a string describing the LUN. This string must remain valid
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * for the live of the device instance.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnDriverAttach,(PPDMDEVINS pDevIns, uint32_t iLun, PPDMIBASE pBaseInterface, PPDMIBASE *ppBaseInterface, const char *pszDesc));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Create a queue.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbItem The size of a queue item.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cItems The number of items in the queue.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cMilliesInterval The number of milliseconds between polling the queue.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * If 0 then the emulation thread will be notified whenever an item arrives.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnCallback The consumer function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fRZEnabled Set if the queue should work in RC and R0.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName The queue base name. The instance number will be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * appended automatically.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppQueue Where to store the queue handle on success.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync DECLR3CALLBACKMEMBER(int, pfnQueueCreate,(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, PPDMQUEUE *ppQueue));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Initializes a PDM critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The PDM critical sections are derived from the IPRT critical sections, but
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * works in RC and R0 as well.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCritSect Pointer to the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszNameFmt Format string for naming the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * For statistics and lock validation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Arguments for the format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnCritSectInit,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RT_SRC_POS_DECL,
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * Gets the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @returns The ring-3 address of the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @param pDevIns The device instance.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync DECLR3CALLBACKMEMBER(PPDMCRITSECT, pfnCritSectGetNop,(PPDMDEVINS pDevIns));
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * Gets the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @returns The ring-0 address of the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @param pDevIns The device instance.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync DECLR3CALLBACKMEMBER(R0PTRTYPE(PPDMCRITSECT), pfnCritSectGetNopR0,(PPDMDEVINS pDevIns));
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * Gets the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @returns The raw-mode context address of the NOP critical section.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @param pDevIns The device instance.
a95fedb133944ec689b02e94077b0387bda0262bvboxsync DECLR3CALLBACKMEMBER(RCPTRTYPE(PPDMCRITSECT), pfnCritSectGetNopRC,(PPDMDEVINS pDevIns));
021a33be84282e41b811563b5f60f3ada196af3evboxsync * Changes the device level critical section from the automatically created
021a33be84282e41b811563b5f60f3ada196af3evboxsync * default to one desired by the device constructor.
021a33be84282e41b811563b5f60f3ada196af3evboxsync * @returns VBox status code.
021a33be84282e41b811563b5f60f3ada196af3evboxsync * @param pDevIns The device instance.
021a33be84282e41b811563b5f60f3ada196af3evboxsync * @param pCritSect The critical section to use. NULL is not
021a33be84282e41b811563b5f60f3ada196af3evboxsync * valid, instead use the NOP critical
021a33be84282e41b811563b5f60f3ada196af3evboxsync DECLR3CALLBACKMEMBER(int, pfnSetDeviceCritSect,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Creates a PDM thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This differs from the RTThreadCreate() API in that PDM takes care of suspending,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * resuming, and destroying the thread as the VM state changes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppThread Where to store the thread 'handle'.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser The user argument to the thread function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnThread The thread function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnWakeup The wakup callback. This is called on the EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * thread when a state change is pending.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbStack See RTThreadCreate.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmType See RTThreadCreate.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszName See RTThreadCreate.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnThreadCreate,(PPDMDEVINS pDevIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDEV pfnThread,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPDMTHREADWAKEUPDEV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set up asynchronous handling of a suspend, reset or power off notification.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This shall only be called when getting the notification. It must be called
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * for each one.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnAsyncNotify The callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT(0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnSetAsyncNotification, (PPDMDEVINS pDevIns, PFNPDMDEVASYNCNOTIFY pfnAsyncNotify));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Notify EMT(0) that the device has completed the asynchronous notification
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * handling.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This can be called at any time, spurious calls will simply be ignored.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnAsyncNotificationCompleted, (PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the RTC device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRtcReg Pointer to a RTC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppRtcHlp Where to store the pointer to the helper
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * functions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRTCRegister,(PPDMDEVINS pDevIns, PCPDMRTCREG pRtcReg, PCPDMRTCHLP *ppRtcHlp));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the PCI Bus.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPciBusReg Pointer to PCI bus registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppPciHlpR3 Where to store the pointer to the PCI Bus
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPCIBusRegister,(PPDMDEVINS pDevIns, PPDMPCIBUSREG pPciBusReg, PCPDMPCIHLPR3 *ppPciHlpR3));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the PIC device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pPicReg Pointer to a PIC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppPicHlpR3 Where to store the pointer to the PIC HC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnPICRegister,(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLPR3 *ppPicHlpR3));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the APIC device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pApicReg Pointer to a APIC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppApicHlpR3 Where to store the pointer to the APIC helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnAPICRegister,(PPDMDEVINS pDevIns, PPDMAPICREG pApicReg, PCPDMAPICHLPR3 *ppApicHlpR3));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the I/O APIC device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pIoApicReg Pointer to a I/O APIC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppIoApicHlpR3 Where to store the pointer to the IOAPIC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnIOAPICRegister,(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLPR3 *ppIoApicHlpR3));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the HPET device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pHpetReg Pointer to a HPET registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppHpetHlpR3 Where to store the pointer to the HPET
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnHPETRegister,(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3));
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Register a raw PCI device.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @returns VBox status code.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @param pDevIns The device instance.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @param pHpetReg Pointer to a raw PCI registration structure.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @param ppPciRawHlpR3 Where to store the pointer to the raw PCI
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * device helpers.
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync DECLR3CALLBACKMEMBER(int, pfnPciRawRegister,(PPDMDEVINS pDevIns, PPDMPCIRAWREG pPciRawReg, PCPDMPCIRAWHLPR3 *ppPciRawHlpR3));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register the DMA device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDmacReg Pointer to a DMAC registration structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ppDmacHlp Where to store the pointer to the DMA helpers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDMACRegister,(PPDMDEVINS pDevIns, PPDMDMACREG pDmacReg, PCPDMDMACHLP *ppDmacHlp));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register transfer function for DMA channel.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnTransferHandler Device specific transfer callback function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User pointer to pass to the callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDMARegister,(PPDMDEVINS pDevIns, unsigned uChannel, PFNDMATRANSFERHANDLER pfnTransferHandler, void *pvUser));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuffer Pointer to target buffer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off DMA position.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBlock Block size.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pcbRead Where to store the number of bytes which was
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * read. optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDMAReadMemory,(PPDMDEVINS pDevIns, unsigned uChannel, void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbRead));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuffer Memory to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param off DMA position.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBlock Block size.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pcbWritten Where to store the number of bytes which was
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * written. optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDMAWriteMemory,(PPDMDEVINS pDevIns, unsigned uChannel, const void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbWritten));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the DREQ line.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uLevel Level of the line.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnDMASetDREQ,(PPDMDEVINS pDevIns, unsigned uChannel, unsigned uLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get channel mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Channel mode. See specs.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uChannel Channel number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint8_t, pfnDMAGetChannelMode,(PPDMDEVINS pDevIns, unsigned uChannel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Schedule DMA execution.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnDMASchedule,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write CMOS value and update the checksum(s).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iReg The CMOS register index.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u8Value The CMOS register value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnCMOSWrite,(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read CMOS value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iReg The CMOS register index.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pu8Value Where to store the CMOS register value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnCMOSRead,(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Assert that the current thread is the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns True if correct.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns False if wrong.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFile Filename of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLine The linenumber of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFunction Function of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnAssertEMT,(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Assert that the current thread is NOT the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns True if correct.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns False if wrong.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFile Filename of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLine The linenumber of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFunction Function of the assertion location.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnAssertOther,(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Resolves the symbol for a raw-mode context interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvInterface The interface structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbInterface The size of the interface structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszSymPrefix What to prefix the symbols in the list with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * before resolving them. This must start with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * 'dev' and contain the driver name.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszSymList List of symbols corresponding to the interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * There is generally a there is generally a define
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * holding this list associated with the interface
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * definition (INTERFACE_SYM_LIST). For more
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * details see PDMR3LdrGetInterfaceSymbols.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLdrGetRCInterfaceSymbols,(PPDMDEVINS pDevIns, void *pvInterface, size_t cbInterface,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszSymPrefix, const char *pszSymList));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Resolves the symbol for a ring-0 context interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvInterface The interface structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbInterface The size of the interface structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszSymPrefix What to prefix the symbols in the list with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * before resolving them. This must start with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * 'dev' and contain the driver name.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszSymList List of symbols corresponding to the interface.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * There is generally a there is generally a define
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * holding this list associated with the interface
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * definition (INTERFACE_SYM_LIST). For more
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * details see PDMR3LdrGetInterfaceSymbols.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnLdrGetR0InterfaceSymbols,(PPDMDEVINS pDevIns, void *pvInterface, size_t cbInterface,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszSymPrefix, const char *pszSymList));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Call the ring-0 request handler routine of the device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * For this to work, the device must be ring-0 enabled and export a request
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * handler function. The name of the function must be the device name in
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the PDMDRVREG struct prefixed with 'drvR0' and suffixed with
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * 'ReqHandler'. The device name will be captialized. It shall take the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * exact same arguments as this function and be declared using
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDMBOTHCBDECL. See FNPDMDEVREQHANDLERR0.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Unlike PDMDrvHlpCallR0, this is current unsuitable for more than a call
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * or two as the handler address will be resolved on each invocation. This
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * is the reason for the EMT only restriction as well.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_SYMBOL_NOT_FOUND if the device doesn't export the required
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * handler function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @retval VERR_ACCESS_DENIED if the device isn't ring-0 capable.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uOperation The operation to perform.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u64Arg 64-bit integer argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnCallR0,(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Space reserved for future members.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** API available to trusted devices only.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * These APIs are providing unrestricted access to the guest and the VM,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * or they are interacting intimately with PDM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PVM, pfnGetVM,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VMCPU handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VMCPU Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(PVMCPU, pfnGetVMCPU,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers the VMM device heap
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The physical address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvHeap Ring 3 heap pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbSize Size of the heap.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRegisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Unregisters the VMM device heap
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The physical address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnUnregisterVMMDevHeap,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Resets the VM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The appropriate VBox status code to pass around on reset.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMReset,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Suspends the VM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The appropriate VBox status code to pass around on suspend.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSuspend,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Suspends, saves and powers off the VM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The appropriate VBox status code to pass around.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread An emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMSuspendSaveAndPowerOff,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Power off the VM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The appropriate VBox status code to pass around on power off.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnVMPowerOff,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if the Gate A20 is enabled or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true if A20 is enabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns false if A20 is disabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(bool, pfnA20IsEnabled,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Enables or disables the Gate A20.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fEnable Set this flag to enable the Gate A20; clear it
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to disable.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnA20Set,(PPDMDEVINS pDevIns, bool fEnable));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the specified CPUID leaf for the virtual CPU associated with the calling
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLeaf The CPUID leaf to get.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pEax Where to store the EAX value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pEbx Where to store the EBX value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pEcx Where to store the ECX value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pEdx Where to store the EDX value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread EMT.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(void, pfnGetCpuId,(PPDMDEVINS pDevIns, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM. The clock frequency must be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * queried separately.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGet,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the frequency of the virtual clock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The clock frequency (not variable at run-time).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetFreq,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM, in nanoseconds.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time (in ns).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. (PDM_DEVHLP_VERSION) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* !IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to the R3 PDM Device API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(struct PDMDEVHLPR3 *) PPDMDEVHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to the R3 PDM Device API, const variant. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R3PTRTYPE(const struct PDMDEVHLPR3 *) PCPDMDEVHLPR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDEVHLPR3 version number. */
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync#define PDM_DEVHLPR3_VERSION PDM_VERSION_MAKE(0xffe7, 8, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM Device API - RC Variant.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVHLPRC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DEVHLPRC_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the IRQ for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnPCISetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set ISA IRQ for a device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(void, pfnISASetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS (for now).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address start reading from.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf Where to put the read bits.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRead How many bytes to read.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnPhysRead,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write to physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address to write to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf What to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbWrite How many bytes to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnPhysWrite,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if the Gate A20 is enabled or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true if A20 is enabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns false if A20 is disabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(bool, pfnA20IsEnabled,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread (just keep in mind that it's volatile info).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDrvIns Driver instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDrvIns Driver instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set parameters for pending MMIO patch operation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys MMIO physical address
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCachedData GC pointer to cached data
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(int, pfnPATMSetMMIOPatchInfo,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPTR pCachedData));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(PVM, pfnGetVM,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VMCPU handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VMCPU Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(PVMCPU, pfnGetVMCPU,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM. The clock frequency must be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * queried separately.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(uint64_t, pfnTMTimeVirtGet,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the frequency of the virtual clock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The clock frequency (not variable at run-time).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetFreq,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM, in nanoseconds.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time (in ns).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLRCCALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * Gets the trace buffer handle.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * really inteded for direct usage, thus no inline wrapper function.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @returns Trace buffer handle or NIL_RTTRACEBUF.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @param pDevIns The device instance.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync DECLRCCALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer PDM Device RC API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(struct PDMDEVHLPRC *) PPDMDEVHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer PDM Device RC API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef RCPTRTYPE(const struct PDMDEVHLPRC *) PCPDMDEVHLPRC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDEVHLP version number. */
a95fedb133944ec689b02e94077b0387bda0262bvboxsync#define PDM_DEVHLPRC_VERSION PDM_VERSION_MAKE(0xffe6, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM Device API - R0 Variant.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVHLPR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DEVHLPR0_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the IRQ for a PCI device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnPCISetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set ISA IRQ for a device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iIrq IRQ number to set.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param iLevel IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread, but will involve the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(void, pfnISASetIrq,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Read physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS (for now).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address start reading from.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf Where to put the read bits.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRead How many bytes to read.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnPhysRead,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Write to physical memory.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS for now, and later maybe VERR_EM_MEMORY.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys Physical address to write to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf What to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbWrite How many bytes to write.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnPhysWrite,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if the Gate A20 is enabled or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true if A20 is enabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns false if A20 is disabled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread The emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(bool, pfnA20IsEnabled,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @thread Any thread (just keep in mind that it's volatile info).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDrvIns Driver instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDrvIns Driver instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param rc VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error message
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param fFlags The action flags. See VMSETRTERR_FLAGS_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszErrorId Error ID string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Error message format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param va Error message arguments.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set parameters for pending MMIO patch operation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns rc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys MMIO physical address
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCachedData GC pointer to cached data
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(int, pfnPATMSetMMIOPatchInfo,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPTR pCachedData));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VM handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(PVM, pfnGetVM,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks if our current CPU state allows for IO block emulation fallback to the recompiler
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true = yes, false = no
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(bool, pfnCanEmulateIoBlock,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Gets the VMCPU handle. Restricted API.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VMCPU Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(PVMCPU, pfnGetVMCPU,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM. The clock frequency must be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * queried separately.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGet,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the frequency of the virtual clock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns The clock frequency (not variable at run-time).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetFreq,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Get the current virtual clock time in a VM, in nanoseconds.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns Current clock time (in ns).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR0CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * Gets the trace buffer handle.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * really inteded for direct usage, thus no inline wrapper function.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @returns Trace buffer handle or NIL_RTTRACEBUF.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync * @param pDevIns The device instance.
a1d83f29ade4c8f9fe95fc75d3fb2642f36081c1vboxsync DECLR0CALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Just a safety precaution. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer PDM Device R0 API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(struct PDMDEVHLPR0 *) PPDMDEVHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer PDM Device GC API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef R0PTRTYPE(const struct PDMDEVHLPR0 *) PCPDMDEVHLPR0;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDEVHLP version number. */
a95fedb133944ec689b02e94077b0387bda0262bvboxsync#define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM Device Instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVINS
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version. PDM_DEVINS_VERSION defines the current version. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Device instance number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer the GC PDM Device API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer to device instance data. */
021a33be84282e41b811563b5f60f3ada196af3evboxsync /** The critical section for the device, see pCritSectXR3. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Alignment padding. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer the R0 PDM Device API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer to device instance data (R0). */
021a33be84282e41b811563b5f60f3ada196af3evboxsync /** The critical section for the device, see pCritSectXR3. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer the HC PDM Device API. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer to device instance data. */
021a33be84282e41b811563b5f60f3ada196af3evboxsync /** The critical section for the device.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * TM and IOM will enter this critical section before calling into the device
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * code. PDM will when doing power on, power off, reset, suspend and resume
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * notifications. SSM will currently not, but this will be changed later on.
021a33be84282e41b811563b5f60f3ada196af3evboxsync * The device gets a critical section automatically assigned to it before
021a33be84282e41b811563b5f60f3ada196af3evboxsync * the constructor is called. If the constructor wishes to use a different
021a33be84282e41b811563b5f60f3ada196af3evboxsync * critical section, it calls PDMDevHlpSetDeviceCritSect() to change it
021a33be84282e41b811563b5f60f3ada196af3evboxsync * very early on.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer to device registration structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Configuration handle. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The base interface of the device.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The device constructor initializes this if it has any
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * device level interfaces to export. To obtain this interface
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * call PDMR3QueryDevice(). */
a8b31f6b3abd04475d4abcb5292aa22131b5130fvboxsync /** Tracing indicator. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Align the internal data more naturally. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Internal data. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint8_t padding[HC_ARCH_BITS == 32 ? 64 + 0 : 112 + 0x28];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Device instance data. The size of this area is defined
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * in the PDMDEVREG::cbInstanceData field. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current PDMDEVINS version number. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVINS_VERSION PDM_VERSION_MAKE(0xffe4, 2, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Converts a pointer to the PDMDEVINS::IBase to a pointer to PDMDEVINS. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMIBASE_2_PDMDEV(pInterface) ( (PPDMDEVINS)((char *)(pInterface) - RT_OFFSETOF(PDMDEVINS, IBase)) )
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Checks the structure versions of the device instance and device helpers,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * returning if they are incompatible.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is for use in the constructor.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PPDMDEVINS pDevInsTypeCheck = (pDevIns); NOREF(pDevInsTypeCheck); \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION), \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync ("DevIns=%#x mine=%#x\n", (pDevIns)->u32Version, PDM_DEVINS_VERSION), \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync ("DevHlp=%#x mine=%#x\n", (pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Quietly checks the structure versions of the device instance and device
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * helpers, returning if they are incompatible.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is for use in the destructor.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns) \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PPDMDEVINS pDevInsTypeCheck = (pDevIns); NOREF(pDevInsTypeCheck); \
e56dcfc21604789f99b06a9353f45ed5205256advboxsync if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION) )) \
e56dcfc21604789f99b06a9353f45ed5205256advboxsync if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION) )) \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Wrapper around CFGMR3ValidateConfig for the root config for use in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * constructor - returns on failure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This should be invoked after having initialized the instance data
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * sufficiently for the correct operation of the destructor. The destructor is
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * always called!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns Pointer to the PDM device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszValidValues Patterns describing the valid value names. See
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * RTStrSimplePatternMultiMatch for details on the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * pattern syntax.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszValidNodes Patterns describing the valid node (key) names.
5c325fa7c11d793851344178da30c81b16e3565cvboxsync * Pass empty string if no valid nodes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, pszValidValues, pszValidNodes) \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync int rcValCfg = CFGMR3ValidateConfig((pDevIns)->pCfg, "/", pszValidValues, pszValidNodes, \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEV_ASSERT_EMT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Assert that the current thread is the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_EMT(pDevIns) pDevIns->pHlpR3->pfnAssertEMT(pDevIns, __FILE__, __LINE__, __FUNCTION__)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_EMT(pDevIns) do { } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEV_ASSERT_OTHER
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Assert that the current thread is NOT the emulation thread.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_OTHER(pDevIns) pDevIns->pHlpR3->pfnAssertOther(pDevIns, __FILE__, __LINE__, __FUNCTION__)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_OTHER(pDevIns) do { } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEV_ASSERT_VMLOCK_OWNER
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Assert that the current thread is owner of the VM lock.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_VMLOCK_OWNER(pDevIns) pDevIns->pHlpR3->pfnAssertVMLock(pDevIns, __FILE__, __LINE__, __FUNCTION__)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define PDMDEV_ASSERT_VMLOCK_OWNER(pDevIns) do { } while (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEV_SET_ERROR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM error. See PDMDevHlpVMSetError() for printf like message formatting.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, "%s", pszError)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEV_SET_RUNTIME_ERROR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Set the VM runtime error. See PDMDevHlpVMSetRuntimeError() for printf like message formatting.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEV_SET_RUNTIME_ERROR(pDevIns, fFlags, pszErrorId, pszError) \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PDMDevHlpVMSetRuntimeError(pDevIns, fFlags, pszErrorId, "%s", pszError)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEVINS_2_RCPTR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Converts a PDM Device instance pointer a RC PDM Device instance pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEVINS_2_RCPTR(pDevIns) ( (RCPTRTYPE(PPDMDEVINS))((RTGCUINTPTR)(pDevIns)->pvInstanceDataRC - RT_OFFSETOF(PDMDEVINS, achInstanceData)) )
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEVINS_2_R3PTR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Converts a PDM Device instance pointer a R3 PDM Device instance pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEVINS_2_R3PTR(pDevIns) ( (R3PTRTYPE(PPDMDEVINS))((RTHCUINTPTR)(pDevIns)->pvInstanceDataR3 - RT_OFFSETOF(PDMDEVINS, achInstanceData)) )
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def PDMDEVINS_2_R0PTR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Converts a PDM Device instance pointer a R0 PDM Device instance pointer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDMDEVINS_2_R0PTR(pDevIns) ( (R0PTRTYPE(PPDMDEVINS))((RTR0UINTPTR)(pDevIns)->pvInstanceDataR0 - RT_OFFSETOF(PDMDEVINS, achInstanceData)) )
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnIOPortRegister
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpIOPortRegister(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTHCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNIOMIOPORTOUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, const char *pszDesc)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnIOPortRegister(pDevIns, Port, cPorts, pvUser, pfnOut, pfnIn, pfnOutStr, pfnInStr, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnIOPortRegisterRC
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpIOPortRegisterRC(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTRCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszOut, const char *pszIn, const char *pszOutStr,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnIOPortRegisterRC(pDevIns, Port, cPorts, pvUser, pszOut, pszIn, pszOutStr, pszInStr, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnIOPortRegisterR0
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpIOPortRegisterR0(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTR0PTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszOut, const char *pszIn, const char *pszOutStr,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnIOPortRegisterR0(pDevIns, Port, cPorts, pvUser, pszOut, pszIn, pszOutStr, pszInStr, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnIOPortDeregister
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpIOPortDeregister(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnIOPortDeregister(pDevIns, Port, cPorts);
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * Register a Memory Mapped I/O (MMIO) region.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * These callbacks are of course for the ring-3 context (R3). Register HC
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * handlers before raw-mode context (RC) and ring-0 context (R0) handlers! There
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * must be a R3 handler for every RC and R0 handler!
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @returns VBox status.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pDevIns The device instance to register the MMIO with.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param GCPhysStart First physical address in the range.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param cbRange The size of the range (in bytes).
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pvUser User argument.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param fFlags Flags, IOMMMIO_FLAGS_XXX.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pfnWrite Pointer to function which is gonna handle Write operations.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pfnRead Pointer to function which is gonna handle Read operations.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pszDesc Pointer to description string. This must not be freed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTHCPTR pvUser,
a96f8709d113c056da40edb8e2591983226a9761vboxsync uint32_t fFlags, PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, const char *pszDesc)
a96f8709d113c056da40edb8e2591983226a9761vboxsync return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, NULL /*pfnFill*/,
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * Register a Memory Mapped I/O (MMIO) region for GC.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * These callbacks are for the raw-mode context (RC). Register ring-3 context
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * (R3) handlers before guest context handlers! There must be a R3 handler for
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * every RC handler!
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @returns VBox status.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pDevIns The device instance to register the MMIO with.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param GCPhysStart First physical address in the range.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param cbRange The size of the range (in bytes).
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pvUser User argument.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pszWrite Name of the RC function which is gonna handle Write operations.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @param pszRead Name of the RC function which is gonna handle Read operations.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegisterRC(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTRCPTR pvUser,
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync return pDevIns->pHlpR3->pfnMMIORegisterRC(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, NULL /*pszFill*/);
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * @copydoc PDMDEVHLPR3::pfnMMIORegisterR0
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegisterR0(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTR0PTR pvUser,
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync return pDevIns->pHlpR3->pfnMMIORegisterR0(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, NULL /*pszFill*/);
a96f8709d113c056da40edb8e2591983226a9761vboxsync * @copydoc PDMDEVHLPR3::pfnMMIORegister
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegisterEx(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTHCPTR pvUser,
a96f8709d113c056da40edb8e2591983226a9761vboxsync uint32_t fFlags, PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead,
cea26cf0a0d390c2cca75cb19cb0e86c580e9d77vboxsync return pDevIns->pHlpR3->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIORegisterRC
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegisterRCEx(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTGCPTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszWrite, const char *pszRead, const char *pszFill)
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync return pDevIns->pHlpR3->pfnMMIORegisterRC(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIORegisterR0
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIORegisterR0Ex(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, RTR0PTR pvUser,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszWrite, const char *pszRead, const char *pszFill)
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync return pDevIns->pHlpR3->pfnMMIORegisterR0(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIODeregister
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpMMIODeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIODeregister(pDevIns, GCPhysStart, cbRange);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIO2Register
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMIO2Register(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS cb, uint32_t fFlags, void **ppv, const char *pszDesc)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIO2Register(pDevIns, iRegion, cb, fFlags, ppv, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIO2Deregister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMIO2Deregister(PPDMDEVINS pDevIns, uint32_t iRegion)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIO2Deregister(pDevIns, iRegion);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIO2Map
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMIO2Map(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIO2Map(pDevIns, iRegion, GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIO2Unmap
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMIO2Unmap(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIO2Unmap(pDevIns, iRegion, GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMHyperMapMMIO2
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMHyperMapMMIO2(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMHyperMapMMIO2(pDevIns, iRegion, off, cb, pszDesc, pRCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMIO2MapKernel
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpMMIO2MapKernel(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMIO2MapKernel(pDevIns, iRegion, off, cb, pszDesc, pR0Ptr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnROMRegister
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpROMRegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const void *pvBinary, uint32_t cbBinary, uint32_t fFlags, const char *pszDesc)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnROMRegister(pDevIns, GCPhysStart, cbRange, pvBinary, cbBinary, fFlags, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnROMProtectShadow
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, PGMROMPROT enmProt)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnROMProtectShadow(pDevIns, GCPhysStart, cbRange, enmProt);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a save state data unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uVersion Data layout version number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbGuess The approximate amount of data in the unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Only for progress indicators.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnSaveExec Execute save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLoadExec Execute load callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpSSMRegister(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVLOADEXEC pfnLoadExec)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnSSMRegister(pDevIns, uVersion, cbGuess, NULL /*pszBefore*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveDone*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnSavePrep*/, pfnSaveExec, NULL /*pfnSaveDone*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnLoadPrep*/, pfnLoadExec, NULL /*pfnLoadDone*/);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Register a save state data unit with a live save callback as well.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uVersion Data layout version number.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbGuess The approximate amount of data in the unit.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Only for progress indicators.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLiveExec Execute live callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnSaveExec Execute save callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pfnLoadExec Execute load callback, optional.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpSSMRegister3(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync FNSSMDEVLIVEEXEC pfnLiveExec, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVLOADEXEC pfnLoadExec)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnSSMRegister(pDevIns, uVersion, cbGuess, NULL /*pszBefore*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnLivePrep*/, pfnLiveExec, NULL /*pfnLiveDone*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnSavePrep*/, pfnSaveExec, NULL /*pfnSaveDone*/,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync NULL /*pfnLoadPrep*/, pfnLoadExec, NULL /*pfnLoadDone*/);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnSSMRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpSSMRegisterEx(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess, const char *pszBefore,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVLIVEPREP pfnLivePrep, PFNSSMDEVLIVEEXEC pfnLiveExec, PFNSSMDEVLIVEVOTE pfnLiveVote,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnSSMRegister(pDevIns, uVersion, cbGuess, pszBefore,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnTMTimerCreate
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpTMTimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, void *pvUser, uint32_t fFlags,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnTMTimerCreate(pDevIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnTMUtcNow
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(PRTTIMESPEC) PDMDevHlpTMUtcNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnTMUtcNow(pDevIns, pTime);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysRead
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysWrite
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysGCPhys2CCPtr
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysGCPhys2CCPtr(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, void **ppv, PPGMPAGEMAPLOCK pLock)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnPhysGCPhys2CCPtr(pDevIns, GCPhys, fFlags, ppv, pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysGCPhys2CCPtrReadOnly
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysGCPhys2CCPtrReadOnly(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, void const **ppv, PPGMPAGEMAPLOCK pLock)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnPhysGCPhys2CCPtrReadOnly(pDevIns, GCPhys, fFlags, ppv, pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysReleasePageMappingLock
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpPhysReleasePageMappingLock(PPDMDEVINS pDevIns, PPGMPAGEMAPLOCK pLock)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnPhysReleasePageMappingLock(pDevIns, pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysReadGCVirt
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysReadGCVirt(PPDMDEVINS pDevIns, void *pvDst, RTGCPTR GCVirtSrc, size_t cb)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPhysReadGCVirt(pDevIns, pvDst, GCVirtSrc, cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysWriteGCVirt
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysWriteGCVirt(PPDMDEVINS pDevIns, RTGCPTR GCVirtDst, const void *pvSrc, size_t cb)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPhysWriteGCVirt(pDevIns, GCVirtDst, pvSrc, cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPhysGCPtr2GCPhys
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPhysGCPtr2GCPhys(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPhysGCPtr2GCPhys(pDevIns, GCPtr, pGCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMHeapAlloc
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void *) PDMDevHlpMMHeapAlloc(PPDMDEVINS pDevIns, size_t cb)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMHeapAlloc(pDevIns, cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMHeapAllocZ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void *) PDMDevHlpMMHeapAllocZ(PPDMDEVINS pDevIns, size_t cb)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnMMHeapAllocZ(pDevIns, cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnMMHeapFree
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpMMHeapFree(PPDMDEVINS pDevIns, void *pv)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMState
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(VMSTATE) PDMDevHlpVMState(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnVMState(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(bool) PDMDevHlpVMTeleportedAndNotFullyResumedYet(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMSetError
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMSetError(PPDMDEVINS pDevIns, const int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnVMSetErrorV(pDevIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMSetRuntimeError
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMSetRuntimeError(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync rc = pDevIns->CTX_SUFF(pHlp)->pfnVMSetRuntimeErrorV(pDevIns, fFlags, pszErrorId, pszFormat, va);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VBOX_STRICT wrapper for pHlp->pfnDBGFStopV.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code which must be passed up to the VMM. This will be
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VINF_SUCCESS in non-strict builds.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszFormat Message. (optional)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Message parameters.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDBGFStop(PPDMDEVINS pDevIns, RT_SRC_POS_DECL, const char *pszFormat, ...)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync rc = pDevIns->pHlpR3->pfnDBGFStopV(pDevIns, RT_SRC_POS_ARGS, pszFormat, args);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDBGFInfoRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDBGFInfoRegister(PPDMDEVINS pDevIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERDEV pfnHandler)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDBGFInfoRegister(pDevIns, pszName, pszDesc, pfnHandler);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnSTAMRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpSTAMRegister(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->pHlpR3->pfnSTAMRegister(pDevIns, pvSample, enmType, pszName, enmUnit, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnSTAMRegisterF
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpSTAMRegisterF(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility, STAMUNIT enmUnit,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->pHlpR3->pfnSTAMRegisterV(pDevIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, va);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCIRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPCIRegister(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPCIRegister(pDevIns, pPciDev);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCIIORegionRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPCIIORegionRegister(PPDMDEVINS pDevIns, int iRegion, uint32_t cbRegion, PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPCIIORegionRegister(pDevIns, iRegion, cbRegion, enmType, pfnCallback);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCIRegisterMsi
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPCIRegisterMsi(PPDMDEVINS pDevIns, PPDMMSIREG pMsiReg)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPCIRegisterMsi(pDevIns, pMsiReg);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCISetConfigCallbacks
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpPCISetConfigCallbacks(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->pHlpR3->pfnPCISetConfigCallbacks(pDevIns, pPciDev, pfnRead, ppfnReadOld, pfnWrite, ppfnWriteOld);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCISetIrq
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpPCISetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnPCISetIrq(pDevIns, iIrq, iLevel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCISetIrqNoWait
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpPCISetIrqNoWait(PPDMDEVINS pDevIns, int iIrq, int iLevel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnPCISetIrq(pDevIns, iIrq, iLevel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnISASetIrq
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnISASetIrq(pDevIns, iIrq, iLevel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnISASetIrqNoWait
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpISASetIrqNoWait(PPDMDEVINS pDevIns, int iIrq, int iLevel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->CTX_SUFF(pHlp)->pfnISASetIrq(pDevIns, iIrq, iLevel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDriverAttach
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpDriverAttach(PPDMDEVINS pDevIns, uint32_t iLun, PPDMIBASE pBaseInterface, PPDMIBASE *ppBaseInterface, const char *pszDesc)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDriverAttach(pDevIns, iLun, pBaseInterface, ppBaseInterface, pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnQueueCreate
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsyncDECLINLINE(int) PDMDevHlpQueueCreate(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval,
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, PPDMQUEUE *ppQueue)
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync return pDevIns->pHlpR3->pfnQueueCreate(pDevIns, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, ppQueue);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Initializes a PDM critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The PDM critical sections are derived from the IPRT critical sections, but
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * works in RC and R0 as well.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pDevIns The device instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCritSect Pointer to the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param RT_SRC_POS_DECL Use RT_SRC_POS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pszNameFmt Format string for naming the critical section.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * For statistics and lock validation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param ... Arguments for the format string.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpCritSectInit(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RT_SRC_POS_DECL, const char *pszNameFmt, ...)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync rc = pDevIns->pHlpR3->pfnCritSectInit(pDevIns, pCritSect, RT_SRC_POS_ARGS, pszNameFmt, va);
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @copydoc PDMDEVHLPR3::pfnCritSectGetNop
a95fedb133944ec689b02e94077b0387bda0262bvboxsyncDECLINLINE(PPDMCRITSECT) PDMDevHlpCritSectGetNop(PPDMDEVINS pDevIns)
a95fedb133944ec689b02e94077b0387bda0262bvboxsync return pDevIns->pHlpR3->pfnCritSectGetNop(pDevIns);
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @copydoc PDMDEVHLPR3::pfnCritSectGetNopR0
a95fedb133944ec689b02e94077b0387bda0262bvboxsyncDECLINLINE(R0PTRTYPE(PPDMCRITSECT)) PDMDevHlpCritSectGetNopR0(PPDMDEVINS pDevIns)
a95fedb133944ec689b02e94077b0387bda0262bvboxsync return pDevIns->pHlpR3->pfnCritSectGetNopR0(pDevIns);
a95fedb133944ec689b02e94077b0387bda0262bvboxsync * @copydoc PDMDEVHLPR3::pfnCritSectGetNopRC
a95fedb133944ec689b02e94077b0387bda0262bvboxsyncDECLINLINE(RCPTRTYPE(PPDMCRITSECT)) PDMDevHlpCritSectGetNopRC(PPDMDEVINS pDevIns)
a95fedb133944ec689b02e94077b0387bda0262bvboxsync return pDevIns->pHlpR3->pfnCritSectGetNopRC(pDevIns);
021a33be84282e41b811563b5f60f3ada196af3evboxsync * @copydoc PDMDEVHLPR3::pfnSetDeviceCritSect
021a33be84282e41b811563b5f60f3ada196af3evboxsyncDECLINLINE(int) PDMDevHlpSetDeviceCritSect(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
021a33be84282e41b811563b5f60f3ada196af3evboxsync return pDevIns->pHlpR3->pfnSetDeviceCritSect(pDevIns, pCritSect);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnThreadCreate
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpThreadCreate(PPDMDEVINS pDevIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDEV pfnThread,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPDMTHREADWAKEUPDEV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnThreadCreate(pDevIns, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnSetAsyncNotification
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpSetAsyncNotification(PPDMDEVINS pDevIns, PFNPDMDEVASYNCNOTIFY pfnAsyncNotify)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnSetAsyncNotification(pDevIns, pfnAsyncNotify);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnAsyncNotificationCompleted
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpAsyncNotificationCompleted(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->pHlpR3->pfnAsyncNotificationCompleted(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnA20Set
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpA20Set(PPDMDEVINS pDevIns, bool fEnable)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnRTCRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpRTCRegister(PPDMDEVINS pDevIns, PCPDMRTCREG pRtcReg, PCPDMRTCHLP *ppRtcHlp)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnRTCRegister(pDevIns, pRtcReg, ppRtcHlp);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPCIBusRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPCIBusRegister(PPDMDEVINS pDevIns, PPDMPCIBUSREG pPciBusReg, PCPDMPCIHLPR3 *ppPciHlpR3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPCIBusRegister(pDevIns, pPciBusReg, ppPciHlpR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnPICRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpPICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLPR3 *ppPicHlpR3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnPICRegister(pDevIns, pPicReg, ppPicHlpR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnAPICRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpAPICRegister(PPDMDEVINS pDevIns, PPDMAPICREG pApicReg, PCPDMAPICHLPR3 *ppApicHlpR3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnAPICRegister(pDevIns, pApicReg, ppApicHlpR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfn
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpIOAPICRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLPR3 *ppIoApicHlpR3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnIOAPICRegister(pDevIns, pIoApicReg, ppIoApicHlpR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnHPETRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpHPETRegister(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnHPETRegister(pDevIns, pHpetReg, ppHpetHlpR3);
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * @copydoc PDMDEVHLPR3::pfnPciRawRegister
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsyncDECLINLINE(int) PDMDevHlpPciRawRegister(PPDMDEVINS pDevIns, PPDMPCIRAWREG pPciRawReg, PCPDMPCIRAWHLPR3 *ppPciRawHlpR3)
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync return pDevIns->pHlpR3->pfnPciRawRegister(pDevIns, pPciRawReg, ppPciRawHlpR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMACRegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDMACRegister(PPDMDEVINS pDevIns, PPDMDMACREG pDmacReg, PCPDMDMACHLP *ppDmacHlp)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMACRegister(pDevIns, pDmacReg, ppDmacHlp);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMARegister
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDMARegister(PPDMDEVINS pDevIns, unsigned uChannel, PFNDMATRANSFERHANDLER pfnTransferHandler, void *pvUser)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMARegister(pDevIns, uChannel, pfnTransferHandler, pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMAReadMemory
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDMAReadMemory(PPDMDEVINS pDevIns, unsigned uChannel, void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbRead)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMAReadMemory(pDevIns, uChannel, pvBuffer, off, cbBlock, pcbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMAWriteMemory
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDMAWriteMemory(PPDMDEVINS pDevIns, unsigned uChannel, const void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbWritten)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMAWriteMemory(pDevIns, uChannel, pvBuffer, off, cbBlock, pcbWritten);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMASetDREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpDMASetDREQ(PPDMDEVINS pDevIns, unsigned uChannel, unsigned uLevel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMASetDREQ(pDevIns, uChannel, uLevel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMAGetChannelMode
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(uint8_t) PDMDevHlpDMAGetChannelMode(PPDMDEVINS pDevIns, unsigned uChannel)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnDMAGetChannelMode(pDevIns, uChannel);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnDMASchedule
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpDMASchedule(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnCMOSWrite
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpCMOSWrite(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnCMOSWrite(pDevIns, iReg, u8Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnCMOSRead
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpCMOSRead(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnCMOSRead(pDevIns, iReg, pu8Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLP::pfnCallR0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpCallR0(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnCallR0(pDevIns, uOperation, u64Arg);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnGetVM
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnGetVMCPU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(PVMCPU) PDMDevHlpGetVMCPU(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnGetVMCPU(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGet
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(uint64_t) PDMDevHlpTMTimeVirtGet(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnTMTimeVirtGet(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGetFreq
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(uint64_t) PDMDevHlpTMTimeVirtGetFreq(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnTMTimeVirtGetFreq(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnTMTimeVirtGetFreq
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(uint64_t) PDMDevHlpTMTimeVirtGetNano(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnTMTimeVirtGetNano(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnRegisterVMMDevHeap
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpRegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnRegisterVMMDevHeap(pDevIns, GCPhys, pvHeap, cbSize);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnUnregisterVMMDevHeap
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpUnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnUnregisterVMMDevHeap(pDevIns, GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMReset
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMReset(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMSuspend
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMSuspend(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMSuspendSaveAndPowerOff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMSuspendSaveAndPowerOff(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->pHlpR3->pfnVMSuspendSaveAndPowerOff(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnVMPowerOff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(int) PDMDevHlpVMPowerOff(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnA20IsEnabled
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(bool) PDMDevHlpA20IsEnabled(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnA20IsEnabled(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR3::pfnGetCpuId
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(void) PDMDevHlpGetCpuId(PPDMDEVINS pDevIns, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync pDevIns->pHlpR3->pfnGetCpuId(pDevIns, iLeaf, pEax, pEbx, pEcx, pEdx);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @copydoc PDMDEVHLPR0::pfnCanEmulateIoBlock
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncDECLINLINE(bool) PDMDevHlpCanEmulateIoBlock(PPDMDEVINS pDevIns)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync return pDevIns->CTX_SUFF(pHlp)->pfnCanEmulateIoBlock(pDevIns);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING0 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to callbacks provided to the VBoxDeviceRegister() call. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Callbacks for VBoxDeviceRegister().
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct PDMDEVREGCB
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Interface version.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is set to PDM_DEVREG_CB_VERSION. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Registers a device with the current VM instance.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCallbacks Pointer to the callback table.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pReg Pointer to the device registration record.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This data must be permanent and readonly.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync DECLR3CALLBACKMEMBER(int, pfnRegister,(PPDMDEVREGCB pCallbacks, PCPDMDEVREG pReg));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Current version of the PDMDEVREGCB structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PDM_DEVREG_CB_VERSION PDM_VERSION_MAKE(0xffe3, 1, 0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The VBoxDevicesRegister callback function.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PDM will invoke this function after loading a device module and letting
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the module decide which devices to register and how to handle conflicts.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pCallbacks Pointer to the callback table.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param u32Version VBox version number.