Skip to content

Commit

Permalink
Create Attribute to force UCD Updates
Browse files Browse the repository at this point in the history
This commit adds ATTR_UCD_MFR_REVISION_OVERRIDE such that a user can
override the MFR_REVISION seen on a UCD device.  This could then force
a UCD flash update.

Change-Id: I3d807b3ddf2c62752046953f0f3d1754d80da381
RTC:205982
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75179
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
  • Loading branch information
mabaiocchi authored and Nicholas E. Bofferding committed Mar 30, 2019
1 parent b445b93 commit 571956c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
30 changes: 26 additions & 4 deletions src/usr/isteps/ucd/updateUcdFlash.C
Original file line number Diff line number Diff line change
Expand Up @@ -1798,9 +1798,31 @@ errlHndl_t updateAllUcdFlashImages(
break;
}

if(tocEntry.mfrRevision == mfrRevision)
// If ATTR_UCD_MFR_REVISION_OVERRIDE is non-zero use its value
// instead of tocEntry.mfrRevision
auto mfrRevisionCheck = 0;
auto mfrRevisionOverride =
powerSequencer->getAttr<
TARGETING::ATTR_UCD_MFR_REVISION_OVERRIDE>();

if (mfrRevisionOverride != 0)
{
TRACFCOMP(g_trac_ucd,INFO_MRK
mfrRevisionCheck = mfrRevisionOverride;
TRACFCOMP(g_trac_ucd,INFO_MRK
"updateAllUcdFlashImages: Using "
"ATTR_UCD_MFR_REVISION_OVERRIDE value of 0x%04X rather "
"than TOC Entry MFR Revision of (0x%04X) for incoming UCD "
"sub-flash image",
mfrRevisionCheck, tocEntry.mfrRevision);
}
else
{
mfrRevisionCheck = tocEntry.mfrRevision;
}

if(mfrRevisionCheck == mfrRevision)
{
TRACFCOMP(g_trac_ucd,INFO_MRK
"updateAllUcdFlashImages: Device has MFR revision of "
"0x%04X which matches incoming UCD sub-flash image "
"version, so inhibit flash update",
Expand All @@ -1810,11 +1832,11 @@ errlHndl_t updateAllUcdFlashImages(
}
else
{
TRACFCOMP(g_trac_ucd,INFO_MRK
TRACFCOMP(g_trac_ucd,INFO_MRK
"updateAllUcdFlashImages: Device has different MFR revision"
" (0x%04X) than the incoming UCD sub-flash image "
"version (0x%04X), so perform flash update",
mfrRevision, tocEntry.mfrRevision);
mfrRevision, mfrRevisionCheck);
}

// Turns out doing the check via UtilMem is not that easy,
Expand Down
14 changes: 14 additions & 0 deletions src/usr/targeting/common/xmltohb/attribute_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8104,6 +8104,20 @@
<id>TYPE</id>
</enumerationType>

<attribute>
<id>UCD_MFR_REVISION_OVERRIDE</id>
<description>
If non-zero then use value as the discovered MFR_REVISION value from
the UCD device rather than the actual value from the device.
</description>
<simpleType>
<uint16_t/>
</simpleType>
<persistency>volatile-zeroed</persistency>
<readable/>
<no_export/>
</attribute>

<attribute>
<description>
The ultra turbo frequency in MHz.
Expand Down
6 changes: 6 additions & 0 deletions src/usr/targeting/common/xmltohb/target_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,9 @@
<id>MODEL</id>
<default>UCD90120A</default>
</attribute>
<attribute>
<id>UCD_MFR_REVISION_OVERRIDE</id>
</attribute>
</targetType>

<targetType>
Expand All @@ -1925,6 +1928,9 @@
<id>MODEL</id>
<default>UCD9090</default>
</attribute>
<attribute>
<id>UCD_MFR_REVISION_OVERRIDE</id>
</attribute>
</targetType>

<targetType>
Expand Down

0 comments on commit 571956c

Please sign in to comment.