diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2017-02-03 11:48:08 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-02-08 16:13:12 -0500 |
commit | 14f64a7c95bdb6bc65e1c492c00735001075ea71 (patch) | |
tree | 58b2500ed2932c422736936fce6cda1002f9911c /src/usr/i2c | |
parent | 2702c541b384b032b8cc6c3ada22710867743b3e (diff) | |
download | talos-hostboot-14f64a7c95bdb6bc65e1c492c00735001075ea71.tar.gz talos-hostboot-14f64a7c95bdb6bc65e1c492c00735001075ea71.zip |
Add base support for TPM locality 2
- Added locality 2 enum
- Updated check for localities to include locality 2
- Updated MRW generator to add locality 2
- Updated standalone config files to include locality 2
- Updated TPM_INFO to include locality 2
Change-Id: I385f331875c59568def895c1b89fcdc14dda6234
RTC: 157140
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35916
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Timothy R. Block <block@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')
-rwxr-xr-x | src/usr/i2c/tpmdd.C | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/usr/i2c/tpmdd.C b/src/usr/i2c/tpmdd.C index fe7c42fc2..3e34a357b 100755 --- a/src/usr/i2c/tpmdd.C +++ b/src/usr/i2c/tpmdd.C @@ -1184,18 +1184,22 @@ errlHndl_t tpmReadAttributes ( TARGETING::Target * i_target, // Successful reading of Attribute, so extract the data io_tpmInfo.port = tpmData.port; - if (TPM_LOCALITY_0 == i_locality) + switch(i_locality) { - io_tpmInfo.devAddr = tpmData.devAddrLocality0; - } - else if (TPM_LOCALITY_4 == i_locality) - { - io_tpmInfo.devAddr = tpmData.devAddrLocality4; - } - else - { - assert(false, "Unsupported locality"); + case TPM_LOCALITY_0: + io_tpmInfo.devAddr = tpmData.devAddrLocality0; + break; + case TPM_LOCALITY_2: + io_tpmInfo.devAddr = tpmData.devAddrLocality2; + break; + case TPM_LOCALITY_4: + io_tpmInfo.devAddr = tpmData.devAddrLocality4; + break; + default: + assert(false, "BUG! Locality %d is not supported.", + i_locality); } + io_tpmInfo.engine = tpmData.engine; io_tpmInfo.i2cMasterPath = tpmData.i2cMasterPath; io_tpmInfo.tpmEnabled = tpmData.tpmEnabled; |