summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/i2c/i2c.C9
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl17
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml40
3 files changed, 62 insertions, 4 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 8be749230..bf0560e73 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -5499,20 +5499,21 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster,
l_currentDI.slavePort = 0xFF;
l_currentDI.busFreqKhz = (tpmInfo.busFreq)
/ FREQ_CONVERSION::HZ_PER_KHZ;
- l_currentDI.deviceType =
- TARGETING::HDAT_I2C_DEVICE_TYPE_NUVOTON_TPM;
l_currentDI.devicePurpose =
TARGETING::HDAT_I2C_DEVICE_PURPOSE_TPM;
-
- // Read TPM Model attribute to determine the label
+ // Read TPM Model attribute to determine some values
if (tpmInfo.model == TPMDD::TPM_MODEL_65x)
{
strcpy(l_currentDI.deviceLabel,"?nuvoton,npct601,tpm,host");
+ l_currentDI.deviceType =
+ TARGETING::HDAT_I2C_DEVICE_TYPE_NUVOTON_TPM;
}
else if (tpmInfo.model == TPMDD::TPM_MODEL_75x)
{
strcpy(l_currentDI.deviceLabel,"?tcg,tpm_i2c_ptp,tpm,host");
+ l_currentDI.deviceType =
+ TARGETING::HDAT_I2C_DEVICE_TYPE_TCG_I2C_TPM;
}
else
{
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
index 744eda2ef..24759589c 100755
--- a/src/usr/targeting/common/processMrw.pl
+++ b/src/usr/targeting/common/processMrw.pl
@@ -2952,6 +2952,23 @@ sub processI2C
{
$type = "0xFF";
}
+ # TPM types can vary by MODEL number
+ elsif ($type_str eq "NUVOTON_TPM")
+ {
+ # Model values can be found in tpmddif.H and are kept in
+ # sync with TPM_MODEL attribute in attribute_types_hb.xml
+ my $tpm_model = $targetObj->getAttribute($i2c->{DEST_PARENT},"TPM_MODEL");
+ if ($tpm_model eq 1)
+ {
+ $type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE",$type_str);
+ }
+ if ($tpm_model eq 2)
+ {
+ # @TODO RTC 212201 use proper enum when <system>.xml supports it
+ #$type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE","TCG_I2C_TPM");
+ $type = 0x15;
+ }
+ }
else
{
$type = $targetObj->getEnumValue("HDAT_I2C_DEVICE_TYPE",$type_str);
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index cce773a1e..ff9abf83b 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -2270,6 +2270,46 @@
<value>0xB</value>
</enumerator>
<enumerator>
+ <name>THERMAL_SENSOR</name>
+ <value>0x0C</value>
+ </enumerator>
+ <enumerator>
+ <name>SEEPROM_Atmel24c04</name>
+ <value>0x0D</value>
+ </enumerator>
+ <enumerator>
+ <name>SEEPROM_Atmel24c412</name>
+ <value>0x0E</value>
+ </enumerator>
+ <enumerator>
+ <name>SEEPROM_Atmel24c32</name>
+ <value>0x0F</value>
+ </enumerator>
+ <enumerator>
+ <name>SEEPROM_Atmel24c64</name>
+ <value>0x10</value>
+ </enumerator>
+ <enumerator>
+ <name>SEEPROM_Atmel24c16</name>
+ <value>0x11</value>
+ </enumerator>
+ <enumerator>
+ <name>NVDIA_GPU</name>
+ <value>0x12</value>
+ </enumerator>
+ <enumerator>
+ <name>NXP_LPC_Microcontroller_LPC11U35</name>
+ <value>0x13</value>
+ </enumerator>
+ <enumerator>
+ <name>9550</name>
+ <value>0x14</value>
+ </enumerator>
+ <enumerator>
+ <name>TCG_I2C_TPM</name>
+ <value>0x15</value>
+ </enumerator>
+ <enumerator>
<name>UNKNOWN</name>
<value>0xFF</value>
</enumerator>
OpenPOWER on IntegriCloud