Skip to content

Commit

Permalink
Support a default risk/init level per MRW
Browse files Browse the repository at this point in the history
 -Previously default risk/init level was always 0 and required
  manual overriding to change.  This commit allows for a default
  risk level to be specified in the MRW for a per system control
  without involving the BMC
 - Note that this is dependent on a change in the SBE to not
  always set the valid flags on the mbox scratch regs to actually
  control the default (today SBE always sets the valid bits). In
  the future the valid bit will only be set when someone manually
  overrides the scratch reg.

Change-Id: Ia0e935a0d436f9dbb8233a8f1f181b4c7300d6d4
CQ: SW451891
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69064
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
  • Loading branch information
sannerd committed Nov 26, 2018
1 parent 8226322 commit 9ffcb90
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
15 changes: 15 additions & 0 deletions src/usr/targeting/common/xmltohb/attribute_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7183,6 +7183,21 @@ Selects which voltage level to place the Core and ECO domain PFETs upon Winkle e
<readable/>
</attribute>

<attribute>
<id>MRW_DEFAULT_RISK_LEVEL</id>
<description>
Attribute indicating the default risk level for the system. Applied if
scratch registers are not overriden
</description>
<persistency>non-volatile</persistency>
<readable/>
<simpleType>
<uint32_t>
<default>0x0</default>
</uint32_t>
</simpleType>
</attribute>

<attribute>
<id>MRW_MEM_THROTTLE_DENOMINATOR</id>
<description>Machine Readable Workbook throttle value for denominator cfg_nm_m</description>
Expand Down
3 changes: 3 additions & 0 deletions src/usr/targeting/common/xmltohb/target_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,9 @@
<attribute>
<id>MRW_DDR4_VDDR_MAX_LIMIT_POST_DRAM_INIT</id>
</attribute>
<attribute>
<id>MRW_DEFAULT_RISK_LEVEL</id>
</attribute>
<attribute>
<id>MSS_VOLT_VPP_SLOPE</id>
</attribute>
Expand Down
16 changes: 11 additions & 5 deletions src/usr/targeting/targetservicestart.C
Original file line number Diff line number Diff line change
Expand Up @@ -408,21 +408,27 @@ static void initializeAttributes(TargetService& i_targetService,
l_pTopLevel->setAttr<ATTR_ISTEP_MODE>(0);
}

//Set the RISK_LEVEL ATTR based off of master Scratch regs
//Set the RISK_LEVEL ATTR based off of master Scratch regs if set
//otherwise use default level defined by system MRW
// Risk Level is a 4 bit value that is treated as an integer, but
// there is a legacy mode that we need to maintain support for
ATTR_RISK_LEVEL_type l_riskLevel = 0;
ATTR_RISK_LEVEL_type l_riskLevel =
l_pTopLevel->getAttr<ATTR_MRW_DEFAULT_RISK_LEVEL>();

INITSERVICE::SPLESS::MboxScratch8_t l_scratch8;
l_scratch8.data32 =
i_masterScratch[INITSERVICE::SPLESS::SCRATCH_8];

// Scratch5:bit2 is legacy risk level bit for backward compatibility
INITSERVICE::SPLESS::MboxScratch5_t l_scratch5;
l_scratch5.data32 =
i_masterScratch[INITSERVICE::SPLESS::SCRATCH_5];
if( l_scratch5.oldRiskLevel )
if( l_scratch5.oldRiskLevel && l_scratch8.validHwpControlFlags)
{
l_riskLevel = 1;
}
// Scratch3 has the real risk level
else
// Scratch3 has the real risk level if the valid bit is on
else if (l_scratch8.validFwMode)
{
INITSERVICE::SPLESS::MboxScratch3_t l_scratch3;
l_scratch3.data32 =
Expand Down

0 comments on commit 9ffcb90

Please sign in to comment.