summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/common/processMrw.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/targeting/common/processMrw.pl')
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl17
1 files changed, 17 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud