Changeset 91137 in vbox
- Timestamp:
- Sep 7, 2021 11:12:01 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146790
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/log.h
r90676 r91137 163 163 /** System Management Controller Device group. */ 164 164 LOG_GROUP_DEV_SMC, 165 /** Trusted Platform Module Device group. */ 166 LOG_GROUP_DEV_TPM, 165 167 /** VGA Device group. */ 166 168 LOG_GROUP_DEV_VGA, … … 235 237 /** TCP socket stream driver group. */ 236 238 LOG_GROUP_DRV_TCP, 239 /** Trusted Platform Module Emulation driver group. */ 240 LOG_GROUP_DRV_TPM_EMU, 241 /** Trusted Platform Module Host driver group. */ 242 LOG_GROUP_DRV_TPM_HOST, 237 243 /** Async transport driver group */ 238 244 LOG_GROUP_DRV_TRANSPORT_ASYNC, … … 842 848 "DEV_SERIAL", \ 843 849 "DEV_SMC", \ 850 "DEV_TPM", \ 844 851 "DEV_VGA", \ 845 852 "DEV_VIRTIO", \ … … 878 885 "DRV_SCSIHOST", \ 879 886 "DRV_TCP", \ 887 "DRV_TPM_EMU", \ 888 "DRV_TPM_HOST", \ 880 889 "DRV_TRANSPORT_ASYNC", \ 881 890 "DRV_TUN", \ -
trunk/include/VBox/vmm/pdmtpmifs.h
r91019 r91137 82 82 { 83 83 /** 84 * Starts the TPM.85 *86 * @returns VBox status code.87 * @param pInterface Pointer to the interface structure containing the called function pointer.88 */89 DECLR3CALLBACKMEMBER(int, pfnStartup, (PPDMITPMCONNECTOR pInterface));90 91 /**92 * Shuts down the TPM.93 *94 * @returns VBox status code.95 * @param pInterface Pointer to the interface structure containing the called function pointer.96 */97 DECLR3CALLBACKMEMBER(int, pfnShutdown, (PPDMITPMCONNECTOR pInterface));98 99 /**100 * Resets the TPM.101 *102 * @returns VBox status code.103 * @param pInterface Pointer to the interface structure containing the called function pointer.104 */105 DECLR3CALLBACKMEMBER(int, pfnReset, (PPDMITPMCONNECTOR pInterface));106 107 /**108 84 * Returns the version of the TPM implemented by the driver below. 109 85 * -
trunk/src/VBox/Devices/Security/DevTpm.cpp
r91116 r91137 23 23 * Header Files * 24 24 *********************************************************************************************************************************/ 25 #define LOG_GROUP LOG_GROUP_DE FAULT /** @todo DEV_TPM */25 #define LOG_GROUP LOG_GROUP_DEV_TPM 26 26 #include <VBox/vmm/pdmdev.h> 27 27 #include <VBox/vmm/pdmtpmifs.h> … … 1599 1599 1600 1600 /** 1601 * @interface_method_impl{PDMDEVREG,pfnPowerOff}1602 */1603 static DECLCALLBACK(void) tpmR3PowerOff(PPDMDEVINS pDevIns)1604 {1605 PDEVTPMCC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PDEVTPMCC);1606 1607 if (pThisCC->pDrvTpm)1608 {1609 int rc = pThisCC->pDrvTpm->pfnShutdown(pThisCC->pDrvTpm);1610 AssertRC(rc);1611 }1612 }1613 1614 1615 /**1616 1601 * @interface_method_impl{PDMDEVREG,pfnReset} 1617 1602 */ … … 1619 1604 { 1620 1605 PDEVTPM pThis = PDMDEVINS_2_DATA(pDevIns, PDEVTPM); 1621 PDEVTPMCC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PDEVTPMCC);1622 1606 1623 1607 pThis->enmState = DEVTPMSTATE_IDLE; … … 1633 1617 pLoc->uRegIntEn = 0; 1634 1618 pLoc->uRegIntSts = 0; 1635 }1636 1637 if (pThisCC->pDrvTpm)1638 {1639 int rc = pThisCC->pDrvTpm->pfnReset(pThisCC->pDrvTpm);1640 AssertRC(rc);1641 1619 } 1642 1620 } … … 1734 1712 pThis->fEstablishmentSet = pThisCC->pDrvTpm->pfnGetEstablishedFlag(pThisCC->pDrvTpm); 1735 1713 pThis->cbCmdResp = RT_MIN(pThisCC->pDrvTpm->pfnGetBufferSize(pThisCC->pDrvTpm), TPM_DATA_BUFFER_SIZE_MAX); 1736 1737 /* Startup the TPM here instead of in the power on callback as we can convey errors here to the upper layer. */1738 rc = pThisCC->pDrvTpm->pfnStartup(pThisCC->pDrvTpm);1739 if (RT_FAILURE(rc))1740 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to startup the TPM"));1741 1714 1742 1715 pThis->enmTpmVers = pThisCC->pDrvTpm->pfnGetVersion(pThisCC->pDrvTpm); … … 1816 1789 /* .pfnMemSetup = */ NULL, 1817 1790 /* .pfnPowerOn = */ NULL, 1818 /* .pfnReset = */ tpmR3Reset,1791 /* .pfnReset = */ NULL, 1819 1792 /* .pfnSuspend = */ NULL, 1820 1793 /* .pfnResume = */ NULL, … … 1823 1796 /* .pfnQueryInterface = */ NULL, 1824 1797 /* .pfnInitComplete = */ NULL, 1825 /* .pfnPowerOff = */ tpmR3PowerOff,1798 /* .pfnPowerOff = */ NULL, 1826 1799 /* .pfnSoftReset = */ NULL, 1827 1800 /* .pfnReserved0 = */ NULL, -
trunk/src/VBox/Devices/Security/DrvTpmEmu.cpp
r91093 r91137 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_DRV_T CP /** @todo */22 #define LOG_GROUP LOG_GROUP_DRV_TPM_EMU 23 23 #include <VBox/vmm/pdmdrv.h> 24 24 #include <VBox/vmm/pdmtpmifs.h> … … 629 629 630 630 631 /** @interface_method_impl{PDMITPMCONNECTOR,pfnStartup} */632 static DECLCALLBACK(int) drvTpmEmuStartup(PPDMITPMCONNECTOR pInterface)633 {634 PDRVTPMEMU pThis = RT_FROM_MEMBER(pInterface, DRVTPMEMU, ITpmConnector);635 636 SWTPMCMDTPMINIT Cmd;637 uint32_t u32Resp = 0;638 639 RT_ZERO(Cmd);640 Cmd.u32Flags = 0;641 return drvTpmEmuExecCtrlCmdEx(pThis, SWTPMCMD_INIT, &Cmd, sizeof(Cmd), &u32Resp,642 NULL, 0, RT_MS_10SEC);643 }644 645 646 /** @interface_method_impl{PDMITPMCONNECTOR,pfnShutdown} */647 static DECLCALLBACK(int) drvTpmEmuShutdown(PPDMITPMCONNECTOR pInterface)648 {649 PDRVTPMEMU pThis = RT_FROM_MEMBER(pInterface, DRVTPMEMU, ITpmConnector);650 651 return drvTpmEmuExecCtrlCmdNoPayload(pThis, SWTPMCMD_SHUTDOWN, NULL, 0, RT_MS_10SEC);652 }653 654 655 /** @interface_method_impl{PDMITPMCONNECTOR,pfnReset} */656 static DECLCALLBACK(int) drvTpmEmuReset(PPDMITPMCONNECTOR pInterface)657 {658 RT_NOREF(pInterface);659 return VINF_SUCCESS;660 }661 662 663 631 /** @interface_method_impl{PDMITPMCONNECTOR,pfnGetVersion} */ 664 632 static DECLCALLBACK(TPMVERSION) drvTpmEmuGetVersion(PPDMITPMCONNECTOR pInterface) … … 782 750 /* -=-=-=-=- PDMDRVREG -=-=-=-=- */ 783 751 752 /** 753 * @interface_method_impl{PDMDRVREG,pfnPowerOn} 754 */ 755 static DECLCALLBACK(void) drvTpmEmuPowerOn(PPDMDRVINS pDrvIns) 756 { 757 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 758 PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU); 759 760 SWTPMCMDTPMINIT Cmd; 761 uint32_t u32Resp = 0; 762 763 RT_ZERO(Cmd); 764 Cmd.u32Flags = 0; 765 int rc = drvTpmEmuExecCtrlCmdEx(pThis, SWTPMCMD_INIT, &Cmd, sizeof(Cmd), &u32Resp, 766 NULL, 0, RT_MS_10SEC); 767 if (RT_FAILURE(rc)) 768 PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, "Failed to startup the TPM with %Rrc", rc); 769 } 770 771 772 /** 773 * @interface_method_impl{PDMDRVREG,pfnPowerOff} 774 */ 775 static DECLCALLBACK(void) drvTpmEmuPowerOff(PPDMDRVINS pDrvIns) 776 { 777 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 778 PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU); 779 780 int rc = drvTpmEmuExecCtrlCmdNoPayload(pThis, SWTPMCMD_SHUTDOWN, NULL, 0, RT_MS_10SEC); 781 if (RT_FAILURE(rc)) 782 PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, "Failed to shutdown the TPM with %Rrc", rc); 783 } 784 785 784 786 /** @copydoc FNPDMDRVDESTRUCT */ 785 787 static DECLCALLBACK(void) drvTpmEmuDestruct(PPDMDRVINS pDrvIns) … … 832 834 pDrvIns->IBase.pfnQueryInterface = drvTpmEmuQueryInterface; 833 835 /* ITpmConnector */ 834 pThis->ITpmConnector.pfnStartup = drvTpmEmuStartup;835 pThis->ITpmConnector.pfnShutdown = drvTpmEmuShutdown;836 pThis->ITpmConnector.pfnReset = drvTpmEmuReset;837 836 pThis->ITpmConnector.pfnGetVersion = drvTpmEmuGetVersion; 838 837 pThis->ITpmConnector.pfnGetLocalityMax = drvTpmEmuGetLocalityMax; … … 991 990 NULL, 992 991 /* pfnPowerOn */ 993 NULL,992 drvTpmEmuPowerOn, 994 993 /* pfnReset */ 995 994 NULL, … … 1003 1002 NULL, 1004 1003 /* pfnPowerOff */ 1005 NULL,1004 drvTpmEmuPowerOff, 1006 1005 /* pfnSoftReset */ 1007 1006 NULL, -
trunk/src/VBox/Devices/Security/DrvTpmEmuTpms.cpp
r91093 r91137 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_DRV_T CP /** @todo */22 #define LOG_GROUP LOG_GROUP_DRV_TPM_EMU 23 23 #include <VBox/vmm/pdmdrv.h> 24 24 #include <VBox/vmm/pdmtpmifs.h> … … 49 49 *********************************************************************************************************************************/ 50 50 51 /** The TPMS saved state version. */ 52 #define TPMS_SAVED_STATE_VERSION 1 53 51 54 52 55 /********************************************************************************************************************************* … … 72 75 /** Currently set locality. */ 73 76 uint8_t bLoc; 77 /** Flag whether the TPM state was saved in save state operation (skips writing the state to the NVRAM file). */ 78 bool fSsmCalled; 74 79 75 80 /** NVRAM file path. */ … … 257 262 258 263 259 /** @interface_method_impl{PDMITPMCONNECTOR,pfnStartup} */260 static DECLCALLBACK(int) drvTpmEmuTpmsStartup(PPDMITPMCONNECTOR pInterface)261 {262 PDRVTPMEMU pThis = RT_FROM_MEMBER(pInterface, DRVTPMEMU, ITpmConnector);263 264 TPM_RESULT rcTpm = TPMLIB_MainInit();265 if (RT_LIKELY(rcTpm == TPM_SUCCESS))266 return VINF_SUCCESS;267 268 LogRel(("DrvTpmEmuTpms#%u: Failed to initialize TPM emulation with %#x\n",269 pThis->pDrvIns->iInstance, rcTpm));270 return VERR_DEV_IO_ERROR;271 }272 273 274 /** @interface_method_impl{PDMITPMCONNECTOR,pfnShutdown} */275 static DECLCALLBACK(int) drvTpmEmuTpmsShutdown(PPDMITPMCONNECTOR pInterface)276 {277 RT_NOREF(pInterface);278 279 TPMLIB_Terminate();280 return VINF_SUCCESS;281 }282 283 284 /** @interface_method_impl{PDMITPMCONNECTOR,pfnReset} */285 static DECLCALLBACK(int) drvTpmEmuTpmsReset(PPDMITPMCONNECTOR pInterface)286 {287 PDRVTPMEMU pThis = RT_FROM_MEMBER(pInterface, DRVTPMEMU, ITpmConnector);288 289 TPMLIB_Terminate();290 TPM_RESULT rcTpm = TPMLIB_MainInit();291 if (RT_LIKELY(rcTpm == TPM_SUCCESS))292 return VINF_SUCCESS;293 294 295 LogRel(("DrvTpmEmuTpms#%u: Failed to reset TPM emulation with %#x\n",296 pThis->pDrvIns->iInstance, rcTpm));297 return VERR_DEV_IO_ERROR;298 }299 300 301 264 /** @interface_method_impl{PDMITPMCONNECTOR,pfnGetVersion} */ 302 265 static DECLCALLBACK(TPMVERSION) drvTpmEmuTpmsGetVersion(PPDMITPMCONNECTOR pInterface) … … 562 525 563 526 527 /* -=-=-=-=-=-=-=-=- Saved State -=-=-=-=-=-=-=-=- */ 528 529 /** 530 * @callback_method_impl{FNSSMDEVSAVEEXEC} 531 */ 532 static DECLCALLBACK(int) drvTpmEmuTpmsSaveExec(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM) 533 { 534 PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU); 535 uint8_t *pbTpmStatePerm = NULL; 536 uint32_t cbTpmStatePerm = 0; 537 uint8_t *pbTpmStateVol = NULL; 538 uint32_t cbTpmStateVol = 0; 539 540 TPM_RESULT rcTpm = TPMLIB_GetState(TPMLIB_STATE_PERMANENT, &pbTpmStatePerm, &cbTpmStatePerm); 541 if (rcTpm == TPM_SUCCESS) 542 rcTpm = TPMLIB_GetState(TPMLIB_STATE_VOLATILE, &pbTpmStateVol, &cbTpmStateVol); 543 if (rcTpm == TPM_SUCCESS) 544 { 545 SSMR3PutU32(pSSM, cbTpmStatePerm); 546 int rc = SSMR3PutU32(pSSM, cbTpmStateVol); 547 AssertRCReturn(rc, rc); 548 549 SSMR3PutMem(pSSM, pbTpmStatePerm, cbTpmStatePerm); 550 SSMR3PutMem(pSSM, pbTpmStateVol, cbTpmStateVol); 551 552 free(pbTpmStatePerm); 553 free(pbTpmStateVol); 554 rc = SSMR3PutU32(pSSM, UINT32_MAX); /* sanity/terminator */ 555 if (RT_SUCCESS(rc)) 556 pThis->fSsmCalled = true; 557 return rc; 558 } 559 560 if (pbTpmStatePerm) 561 free(pbTpmStatePerm); 562 563 return VERR_NO_MEMORY; 564 } 565 566 567 /** 568 * @callback_method_impl{FNSSMDEVLOADEXEC} 569 */ 570 static DECLCALLBACK(int) drvTpmEmuTpmsLoadExec(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 571 { 572 PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU); 573 574 Assert(uPass == SSM_PASS_FINAL); RT_NOREF(uPass); 575 AssertMsgReturn(uVersion == TPMS_SAVED_STATE_VERSION, ("%d\n", uVersion), VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION); 576 577 uint8_t *pbTpmStatePerm = NULL; 578 uint32_t cbTpmStatePerm = 0; 579 uint8_t *pbTpmStateVol = NULL; 580 uint32_t cbTpmStateVol = 0; 581 582 int rc = SSMR3GetU32(pSSM, &cbTpmStatePerm); 583 AssertRCReturn(rc, rc); 584 585 rc = SSMR3GetU32(pSSM, &cbTpmStateVol); 586 AssertRCReturn(rc, rc); 587 588 pbTpmStatePerm = (uint8_t *)RTMemAllocZ(cbTpmStatePerm); 589 if (pbTpmStatePerm) 590 { 591 pbTpmStateVol = (uint8_t *)RTMemAllocZ(cbTpmStateVol); 592 if (pbTpmStateVol) 593 { 594 rc = SSMR3GetMem(pSSM, pbTpmStatePerm, cbTpmStatePerm); 595 if (RT_SUCCESS(rc)) 596 rc = SSMR3GetMem(pSSM, pbTpmStateVol, cbTpmStateVol); 597 598 if (RT_SUCCESS(rc)) 599 { 600 TPM_RESULT rcTpm = TPMLIB_SetState(TPMLIB_STATE_PERMANENT, pbTpmStatePerm, cbTpmStatePerm); 601 if (rcTpm == TPM_SUCCESS) 602 { 603 rcTpm = TPMLIB_SetState(TPMLIB_STATE_VOLATILE, pbTpmStateVol, cbTpmStateVol); 604 if (rcTpm == TPM_SUCCESS) 605 { 606 uint32_t u32 = 0; 607 608 /* The marker. */ 609 rc = SSMR3GetU32(pSSM, &u32); 610 AssertRCReturn(rc, rc); 611 AssertMsgReturn(u32 == UINT32_MAX, ("%#x\n", u32), VERR_SSM_DATA_UNIT_FORMAT_CHANGED); 612 613 pThis->fSsmCalled = true; 614 } 615 else 616 rc = VERR_INVALID_PARAMETER; 617 } 618 else 619 rc = VERR_INVALID_PARAMETER; 620 } 621 622 RTMemFree(pbTpmStateVol); 623 } 624 625 RTMemFree(pbTpmStatePerm); 626 } 627 else 628 rc = VERR_NO_MEMORY; 629 630 return rc; 631 } 632 633 634 /** 635 * @callback_method_impl{FNSSMDEVLOADDONE} 636 */ 637 static DECLCALLBACK(int) drvTpmEmuTpmsLoadDone(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM) 638 { 639 PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU); 640 RT_NOREF(pSSM); 641 642 if (!pThis->fSsmCalled) 643 { 644 /* Issue a warning as restoring a saved state without loading the TPM state will most likely cause issues in the guest. */ 645 } 646 647 pThis->fSsmCalled = false; 648 return VINF_SUCCESS; 649 } 650 651 564 652 /* -=-=-=-=- PDMDRVREG -=-=-=-=- */ 653 654 /** 655 * @interface_method_impl{PDMDRVREG,pfnPowerOn} 656 */ 657 static DECLCALLBACK(void) drvTpmEmuTpmsPowerOn(PPDMDRVINS pDrvIns) 658 { 659 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 660 661 TPM_RESULT rcTpm = TPMLIB_MainInit(); 662 if (RT_UNLIKELY(rcTpm != TPM_SUCCESS)) 663 { 664 LogRel(("DrvTpmEmuTpms#%u: Failed to initialize TPM emulation with %#x\n", 665 pDrvIns->iInstance, rcTpm)); 666 PDMDrvHlpVMSetError(pDrvIns, VERR_INVALID_PARAMETER, RT_SRC_POS, "Failed to startup the TPM with %u", rcTpm); 667 } 668 } 669 670 671 /** 672 * @interface_method_impl{PDMDRVREG,pfnPowerOff} 673 */ 674 static DECLCALLBACK(void) drvTpmEmuTpmsPowerOff(PPDMDRVINS pDrvIns) 675 { 676 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 677 678 TPMLIB_Terminate(); 679 } 680 565 681 566 682 /** @copydoc FNPDMDRVDESTRUCT */ … … 572 688 LogFlow(("%s\n", __FUNCTION__)); 573 689 574 int rc = drvTpmEmuTpmsNvramStore(pThis); 575 AssertRC(rc); 690 if (!pThis->fSsmCalled) 691 { 692 int rc = drvTpmEmuTpmsNvramStore(pThis); 693 AssertRC(rc); 694 } 576 695 577 696 if (pThis->pvNvPermall) … … 610 729 pThis->enmVersion = TPMVERSION_UNKNOWN; 611 730 pThis->bLoc = TPM_NO_LOCALITY_SELECTED; 731 pThis->fSsmCalled = false; 612 732 pThis->pvNvPermall = NULL; 613 733 pThis->cbNvPermall = 0; … … 618 738 pDrvIns->IBase.pfnQueryInterface = drvTpmEmuTpmsQueryInterface; 619 739 /* ITpmConnector */ 620 pThis->ITpmConnector.pfnStartup = drvTpmEmuTpmsStartup;621 pThis->ITpmConnector.pfnShutdown = drvTpmEmuTpmsShutdown;622 pThis->ITpmConnector.pfnReset = drvTpmEmuTpmsReset;623 740 pThis->ITpmConnector.pfnGetVersion = drvTpmEmuTpmsGetVersion; 624 741 pThis->ITpmConnector.pfnGetLocalityMax = drvTpmEmuGetLocalityMax; … … 706 823 N_("Failed to register callbacks with the TPM emulation: %u"), 707 824 rcTpm); 825 826 rc = PDMDrvHlpSSMRegisterEx(pDrvIns, TPMS_SAVED_STATE_VERSION, 0 /*cbGuess*/, 827 NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveVote*/, 828 NULL /*pfnSavePrep*/, drvTpmEmuTpmsSaveExec, NULL /*pfnSaveDone*/, 829 NULL /*pfnLoadPrep*/, drvTpmEmuTpmsLoadExec, drvTpmEmuTpmsLoadDone); 830 if (RT_FAILURE(rc)) 831 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, 832 N_("Failed to register saved state handlers")); 708 833 709 834 /* We can only have one instance of the TPM emulation and require the global variable for the callbacks unfortunately. */ … … 745 870 NULL, 746 871 /* pfnPowerOn */ 747 NULL,872 drvTpmEmuTpmsPowerOn, 748 873 /* pfnReset */ 749 874 NULL, … … 757 882 NULL, 758 883 /* pfnPowerOff */ 759 NULL,884 drvTpmEmuTpmsPowerOff, 760 885 /* pfnSoftReset */ 761 886 NULL, -
trunk/src/VBox/Devices/Security/DrvTpmHost.cpp
r91049 r91137 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define LOG_GROUP LOG_GROUP_DRV_T CP /** @todo */22 #define LOG_GROUP LOG_GROUP_DRV_TPM_HOST 23 23 #include <VBox/vmm/pdmdrv.h> 24 24 #include <VBox/vmm/pdmtpmifs.h> … … 182 182 183 183 184 /** @interface_method_impl{PDMITPMCONNECTOR,pfnStartup} */185 static DECLCALLBACK(int) drvTpmHostStartup(PPDMITPMCONNECTOR pInterface)186 {187 RT_NOREF(pInterface);188 return VINF_SUCCESS;189 }190 191 192 /** @interface_method_impl{PDMITPMCONNECTOR,pfnShutdown} */193 static DECLCALLBACK(int) drvTpmHostShutdown(PPDMITPMCONNECTOR pInterface)194 {195 RT_NOREF(pInterface);196 return VINF_SUCCESS;197 }198 199 200 /** @interface_method_impl{PDMITPMCONNECTOR,pfnReset} */201 static DECLCALLBACK(int) drvTpmHostReset(PPDMITPMCONNECTOR pInterface)202 {203 RT_NOREF(pInterface);204 return VINF_SUCCESS;205 }206 207 208 184 /** @interface_method_impl{PDMITPMCONNECTOR,pfnGetVersion} */ 209 185 static DECLCALLBACK(TPMVERSION) drvTpmHostGetVersion(PPDMITPMCONNECTOR pInterface) … … 312 288 pDrvIns->IBase.pfnQueryInterface = drvTpmHostQueryInterface; 313 289 /* ITpmConnector */ 314 pThis->ITpmConnector.pfnStartup = drvTpmHostStartup;315 pThis->ITpmConnector.pfnShutdown = drvTpmHostShutdown;316 pThis->ITpmConnector.pfnReset = drvTpmHostReset;317 290 pThis->ITpmConnector.pfnGetVersion = drvTpmHostGetVersion; 318 291 pThis->ITpmConnector.pfnGetLocalityMax = drvTpmHostGetLocalityMax;
Note:
See TracChangeset
for help on using the changeset viewer.