VirtualBox

Ignore:
Timestamp:
Jan 27, 2020 6:20:21 PM (5 years ago)
Author:
vboxsync
Message:

Devices/testcase: Restarted work on the device testbench/fuzzing work (#9006), adjusting to the interface changes in 6.1 dropping the VMM stub library which is not required anymore (yay), work in progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/testcase/tstDeviceInternal.h

    r76565 r82883  
    2121#endif
    2222
     23#include <VBox/param.h>
    2324#include <VBox/types.h>
    2425#include <iprt/assert.h>
     
    2728
    2829#include "tstDevicePlugin.h"
    29 #include "tstDeviceVMMInternal.h"
    3030
    3131RT_C_DECLS_BEGIN
     
    3434/** Converts PDM device instance to the device under test structure. */
    3535#define TSTDEV_PDMDEVINS_2_DUT(a_pDevIns) ((a_pDevIns)->Internal.s.pDut)
     36
     37/** Forward declaration of internal test device instance data. */
     38typedef struct TSTDEVDUTINT *PTSTDEVDUTINT;
     39
     40
     41/**
     42 * CFGM node structure.
     43 */
     44typedef struct CFGMNODE
     45{
     46    /** Device under test this CFGM node is for. */
     47    PTSTDEVDUTINT        pDut;
     48    /** @todo: */
     49} CFGMNODE;
     50
     51
     52/**
     53 * Private device instance data.
     54 */
     55typedef struct PDMDEVINSINTR3
     56{
     57    /** Pointer to the device under test the PDM device instance is for. */
     58    PTSTDEVDUTINT                   pDut;
     59} PDMDEVINSINTR3;
     60AssertCompile(sizeof(PDMDEVINSINTR3) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28));
     61
     62/**
     63 * Private device instance data.
     64 */
     65typedef struct PDMDEVINSINTR0
     66{
     67    /** Pointer to the device under test the PDM device instance is for. */
     68    PTSTDEVDUTINT                   pDut;
     69} PDMDEVINSINTR0;
     70AssertCompile(sizeof(PDMDEVINSINTR0) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28));
     71
     72/**
     73 * Private device instance data.
     74 */
     75typedef struct PDMDEVINSINTRC
     76{
     77    /** Pointer to the device under test the PDM device instance is for. */
     78    PTSTDEVDUTINT                   pDut;
     79} PDMDEVINSINTRC;
     80AssertCompile(sizeof(PDMDEVINSINTRC) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28));
     81
     82typedef struct PDMPCIDEVINT
     83{
     84    bool                            fRegistered;
     85} PDMPCIDEVINT;
     86
     87#define PDMDEVINSINT_DECLARED
     88#define PDMPCIDEVINT_DECLARED
     89#define VMM_INCLUDED_SRC_include_VMInternal_h
     90#define VMM_INCLUDED_SRC_include_VMMInternal_h
     91RT_C_DECLS_END
     92#include <VBox/vmm/pdmdev.h>
     93#include <VBox/vmm/pdmpci.h>
     94#include <VBox/vmm/pdmdrv.h>
     95RT_C_DECLS_BEGIN
     96
    3697
    3798/**
     
    66127    void                            *pvUserR3;
    67128    /** Out handler - R3. */
    68     PFNIOMIOPORTOUT                 pfnOutR3;
     129    PFNIOMIOPORTNEWOUT              pfnOutR3;
    69130    /** In handler - R3. */
    70     PFNIOMIOPORTIN                  pfnInR3;
     131    PFNIOMIOPORTNEWIN               pfnInR3;
    71132    /** Out string handler - R3. */
    72     PFNIOMIOPORTOUTSTRING           pfnOutStrR3;
     133    PFNIOMIOPORTNEWOUTSTRING        pfnOutStrR3;
    73134    /** In string handler - R3. */
    74     PFNIOMIOPORTINSTRING            pfnInStrR3;
     135    PFNIOMIOPORTNEWINSTRING         pfnInStrR3;
    75136
    76137    /** Opaque user data - R0. */
    77138    void                            *pvUserR0;
    78139    /** Out handler - R0. */
    79     PFNIOMIOPORTOUT                 pfnOutR0;
     140    PFNIOMIOPORTNEWOUT              pfnOutR0;
    80141    /** In handler - R0. */
    81     PFNIOMIOPORTIN                  pfnInR0;
     142    PFNIOMIOPORTNEWIN               pfnInR0;
    82143    /** Out string handler - R0. */
    83     PFNIOMIOPORTOUTSTRING           pfnOutStrR0;
     144    PFNIOMIOPORTNEWOUTSTRING        pfnOutStrR0;
    84145    /** In string handler - R0. */
    85     PFNIOMIOPORTINSTRING            pfnInStrR0;
     146    PFNIOMIOPORTNEWINSTRING         pfnInStrR0;
    86147
    87148#ifdef TSTDEV_SUPPORTS_RC
     
    89150    void                            *pvUserRC;
    90151    /** Out handler - RC. */
    91     PFNIOMIOPORTOUT                 pfnOutRC;
     152    PFNIOMIOPORTNEWOUT              pfnOutRC;
    92153    /** In handler - RC. */
    93     PFNIOMIOPORTIN                  pfnInRC;
     154    PFNIOMIOPORTNEWIN               pfnInRC;
    94155    /** Out string handler - RC. */
    95     PFNIOMIOPORTOUTSTRING           pfnOutStrRC;
     156    PFNIOMIOPORTNEWOUTSTRING        pfnOutStrRC;
    96157    /** In string handler - RC. */
    97     PFNIOMIOPORTINSTRING            pfnInStrRC;
     158    PFNIOMIOPORTNEWINSTRING         pfnInStrRC;
    98159#endif
    99160} RTDEVDUTIOPORT;
     
    204265    /** The SUP session we emulate. */
    205266    TSTDEVSUPDRVSESSION             SupSession;
    206     /** The VM state assoicated with this device. */
     267    /** The VM state associated with this device. */
    207268    PVM                             pVm;
    208269    /** The registered PCI device instance if this is a PCI device. */
     
    213274
    214275
     276extern const PDMDEVHLPR3 g_tstDevPdmDevHlpR3;
     277
     278
    215279DECLHIDDEN(int) tstDevPdmLdrGetSymbol(PTSTDEVDUTINT pThis, const char *pszMod, TSTDEVPDMMODTYPE enmModType,
    216280                                      const char *pszSymbol, PFNRT *ppfn);
Note: See TracChangeset for help on using the changeset viewer.

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