diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2017-03-15 17:08:10 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-10 13:56:21 -0400 |
commit | 55b2bbc15289496db3c2315ac6d4f5f697095fca (patch) | |
tree | ea0dd71b31305f174e4c2fc5c70f12d6ad4581ed /src/usr/i2c/i2c.C | |
parent | ab70aa5b81d379bbab438fa9dbe09793bd6a5405 (diff) | |
download | talos-hostboot-55b2bbc15289496db3c2315ac6d4f5f697095fca.tar.gz talos-hostboot-55b2bbc15289496db3c2315ac6d4f5f697095fca.zip |
Converge shadow TPM object into targeting model
- Added TPM attributes
- Linked TPM attributes to XML models
- Updated TpmTarget as alias for TARGETING::Target
- Trace all states in TPM targeting target
Change-Id: Ic0e6cf974aa82f0273523bdada1081b625cb0ae4
RTC: 168781
CMVC-Coreq: 1021028
CMVC-Prereq: 1021177
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38337
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Christopher J. Engel <cjengel@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/i2c.C')
-rwxr-xr-x | src/usr/i2c/i2c.C | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C index 2227c8be2..835d9ea48 100755 --- a/src/usr/i2c/i2c.C +++ b/src/usr/i2c/i2c.C @@ -3813,8 +3813,8 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster, #ifdef CONFIG_TPMDD TPMDD::tpm_info_t tpmInfo; errlHndl_t l_err = NULL; - std::list<TRUSTEDBOOT::TpmTarget> l_tpmTarget; - TRUSTEDBOOT::getTPMs(l_tpmTarget); + TARGETING::TargetHandleList tpmList; + TRUSTEDBOOT::getTPMs(tpmList); #endif for( std::list<I2C::MasterInfo_t>::iterator i2cm = l_i2cInfo.begin(); @@ -3872,32 +3872,28 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster, } //end of eeprom iter #ifdef CONFIG_TPMDD - std::list<TRUSTEDBOOT::TpmTarget>::iterator l_tpm = l_tpmTarget.begin(); - while( l_tpm != l_tpmTarget.end() ) + for(auto pTpm : tpmList) { DeviceInfo_t l_currentDI; TPMDD::tpm_locality_t locality = TPMDD::TPM_LOCALITY_0; // Lookup i2c info for the TPM - l_err = TPMDD::tpmReadAttributes(l_tpm->tpmTarget, + l_err = TPMDD::tpmReadAttributes(pTpm, tpmInfo, locality); if( NULL != l_err ) { // Unable to get info, so we skip delete l_err; - l_tpm = l_tpmTarget.erase(l_tpm); continue; } // ignore the devices that aren't on the current target if( tpmInfo.i2cTarget != i_i2cMaster ) { - l_tpm = l_tpmTarget.erase(l_tpm); continue; } // skip the devices that are on a different engine else if( tpmInfo.engine != i2cm->engine ) { - ++l_tpm; continue; } @@ -3913,8 +3909,6 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster, o_deviceInfo.push_back(l_currentDI); - l_tpm = l_tpmTarget.erase(l_tpm); - } //end of tpm iter #endif |