VirtualBox

Changeset 91867 in vbox for trunk/src/VBox/Devices/Security


Ignore:
Timestamp:
Oct 20, 2021 9:05:23 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147670
Message:

Devices/Security: Change the TPM drivers to access the CFGM API through the driver helper callback table only, bugref:10074

Location:
trunk/src/VBox/Devices/Security
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Security/DrvTpmEmu.cpp

    r91137 r91867  
    820820    RT_NOREF(fFlags);
    821821    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    822     PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
     822    PDRVTPMEMU      pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
     823    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
    823824
    824825    /*
     
    848849
    849850    char szLocation[_1K];
    850     int rc = CFGMR3QueryString(pCfg, "Location", &szLocation[0], sizeof(szLocation));
     851    int rc = pHlp->pfnCFGMQueryString(pCfg, "Location", &szLocation[0], sizeof(szLocation));
    851852    if (RT_FAILURE(rc))
    852853        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
     
    931932
    932933    /* Configure the buffer size. */
    933     rc = CFGMR3QueryU32Def(pCfg, "BufferSize", &pThis->cbBuffer, cbBufferMax);
     934    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "BufferSize", &pThis->cbBuffer, cbBufferMax);
    934935    if (RT_FAILURE(rc))
    935936        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
  • trunk/src/VBox/Devices/Security/DrvTpmEmuTpms.cpp

    r91615 r91867  
    362362    RT_NOREF(fFlags);
    363363    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    364     PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
     364    PDRVTPMEMU      pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
     365    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
    365366
    366367    /*
     
    407408    TPMLIB_TPMVersion enmVersion = TPMLIB_TPM_VERSION_2;
    408409    uint32_t uTpmVersion = 0;
    409     rc = CFGMR3QueryU32Def(pCfg, "TpmVersion", &uTpmVersion, 2);
     410    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "TpmVersion", &uTpmVersion, 2);
    410411    if (RT_FAILURE(rc))
    411412        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
     
    438439                                   N_("Querying the maximum supported buffer size failed with %u"), rcTpm);
    439440
    440     rc = CFGMR3QueryU32Def(pCfg, "BufferSize", &pThis->cbBuffer, (uint32_t)cbBufferMax);
     441    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "BufferSize", &pThis->cbBuffer, (uint32_t)cbBufferMax);
    441442    if (RT_FAILURE(rc))
    442443        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
  • trunk/src/VBox/Devices/Security/DrvTpmHost.cpp

    r91137 r91867  
    277277    RT_NOREF(fFlags);
    278278    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    279     PDRVTPMHOST pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMHOST);
     279    PDRVTPMHOST     pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMHOST);
     280    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
    280281
    281282    /*
     
    302303
    303304    uint32_t idTpm = RTTPM_ID_DEFAULT;
    304     int rc = CFGMR3QueryU32Def(pCfg, "TpmId", &idTpm, RTTPM_ID_DEFAULT);
     305    int rc = pHlp->pfnCFGMQueryU32Def(pCfg, "TpmId", &idTpm, RTTPM_ID_DEFAULT);
    305306    if (RT_FAILURE(rc))
    306307        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
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