Skip to content

Commit

Permalink
Support non-std VDDR DEFAULT voltage on ZZ
Browse files Browse the repository at this point in the history
Change-Id: Ifc67849e18868c29cd84de698b7d50da8bbe4981
RTC:179196
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45813
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@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: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Sep 19, 2017
1 parent 3bd9350 commit 57a4232
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 deletions.
10 changes: 8 additions & 2 deletions src/usr/isteps/hbToHwsvVoltageMsg.C
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void HBToHwsvVoltageMsg::addMemoryVoltageDomains(

// There is no reasonable check to validate if a voltage we're
// reading is valid so it has to be assumed good for the cases below
if(domainProgram == MSS_PROGRAM_TYPE::STATIC)
if(domainProgram == MSS_PROGRAM_TYPE::STATIC_TYPE)
{
typename
TARGETING::AttributeTraits< VOLTAGE_ATTR_STATIC >::Type
Expand All @@ -257,7 +257,7 @@ void HBToHwsvVoltageMsg::addMemoryVoltageDomains(
entry.voltageMillivolts = static_cast<uint32_t>(voltageMillivolts);
io_domains.push_back(entry);
}
else if(domainProgram == MSS_PROGRAM_TYPE::DYNAMIC)
else if(domainProgram == MSS_PROGRAM_TYPE::DYNAMIC_TYPE)
{
typename
TARGETING::AttributeTraits< VOLTAGE_ATTR_DYNAMIC >::Type
Expand All @@ -267,6 +267,12 @@ void HBToHwsvVoltageMsg::addMemoryVoltageDomains(
entry.voltageMillivolts = static_cast<uint32_t>(voltageMillivolts);
io_domains.push_back(entry);
}
else if(domainProgram == MSS_PROGRAM_TYPE::DEFAULT_TYPE)
{
entry.voltageMillivolts =
HBToHwsvVoltageMsg::VOLTAGE_SETTING_ALERT_DEFAULT;
io_domains.push_back(entry);
}
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
16 changes: 12 additions & 4 deletions src/usr/isteps/hbToHwsvVoltageMsg.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2016 */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -90,6 +90,13 @@ public:
VOLTAGE_DOMAIN_MAX_VALUE = VOLTAGE_DOMAIN_NEST_VDDR,
};

/**
* @brief Identifies hwsvPowrMemVoltDomainRequest_t as a DEFAULT voltage
* request if voltageMillivolts is set to this constant
*
*/
const uint32_t VOLTAGE_SETTING_ALERT_DEFAULT = 0xFFFFFFFF;

/**
* @struct hwsvPowrMemVoltDomainRequest_t
*
Expand Down Expand Up @@ -234,9 +241,10 @@ private:
* @tparam MSS_DOMAIN_PROGRAM
* ID of the attribute to read to determine how we program this domain.
* Value of the attribute should be one of these:
* MSS_PROGRAM_TYPE::POWERON = no additional programming necessary,
* MSS_PROGRAM_TYPE::STATIC = use static value,
* MSS_PROGRAM_TYPE::DYNAMIC = use dynamic value
* MSS_PROGRAM_TYPE::POWERON_TYPE = no add'l programming necessary,
* MSS_PROGRAM_TYPE::STATIC_TYPE = use static value,
* MSS_PROGRAM_TYPE::DYNAMIC_TYPE = use dynamic value,
* MSS_PROGRAM_TYPE::DEFAULT_TYPE = send special alert value
*
* @tparam VOLTAGE_ATTR_STATIC
* ID of the attribute which should be read to obtain the given memory
Expand Down
20 changes: 15 additions & 5 deletions src/usr/isteps/istepHelperFuncs.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -53,11 +53,21 @@ enum EFF_CONFIG_ATTRIBUTES_BASE
*/
enum MSS_PROGRAM_TYPE
{
POWERON = 0, // domain is programmed as part of regular power on sequence
STATIC = 1, // domain needs to be programmed, no special computation needed
DYNAMIC = 2, // domain needs to be programmed, uses dynamic vid logic
// domain is programmed as part of regular power on sequence
POWERON_TYPE = 0,

// domain needs to be programmed, no special computation needed
STATIC_TYPE = 1,

// domain needs to be programmed, uses dynamic vid logic
DYNAMIC_TYPE = 2,

// domain needs to be programmed,
// POWR responsible for vid values attained via sys vrm xml
DEFAULT_TYPE = 3,
};


//
// Helper function to set _EFF_CONFIG attributes for HWPs
//
Expand Down Expand Up @@ -128,7 +138,7 @@ errlHndl_t computeDynamicMemoryVoltage()
pSysTarget->getAttr< OFFSET_DISABLEMENT_ATTR >();


if(domainProgram != MSS_PROGRAM_TYPE::DYNAMIC)
if(domainProgram != MSS_PROGRAM_TYPE::DYNAMIC_TYPE)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"INFO: Dynamic offset voltage processing disabled for domain type 0x%08X.",
Expand Down
9 changes: 8 additions & 1 deletion src/usr/targeting/common/genHwsvMrwXml.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
# --system=systemname
# Specify which system MRW XML to be generated
# --systemnodes=systemnodesinbrazos

# Specify number of nodes for brazos system, by default it is 4
# --mrwdir=pathname
# Specify the complete dir pathname of the MRW. Colon-delimited
Expand Down Expand Up @@ -158,6 +157,10 @@
# Domain needs to be programmed during host_enable_memvolt, and the
# new dynamic vid values must be computed beyond what p9_mss_volt() did
DYNAMIC_PROGRAM => 2,

# Domain needs to be programmed during host_enable_memvolt, and the
# new vid values will come from VRM xml system file consumed by POWR code
DEFAULT_PROGRAM => 3,
};

our $mrwdir = "";
Expand Down Expand Up @@ -523,6 +526,10 @@
{
push @systemAttr, [$domain, DYNAMIC_PROGRAM];
}
elsif ($domainProgram{$domain} eq "default")
{
push @systemAttr, [$domain, DEFAULT_PROGRAM];
}
else
{
# default to not program in host_enable_memvolt
Expand Down
3 changes: 2 additions & 1 deletion src/usr/targeting/common/xmltohb/attribute_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,8 @@
<description>VDDR memory programming type
0 = POWERON - domain is programmed as part of regular power on sequence,
1 = STATIC - domain needs to be programmed, no special computation needed,
2 = DYNAMIC - domain needs to be programmed, uses dynamic vid logic
2 = DYNAMIC - domain needs to be programmed, uses dynamic vid logic,
3 = DEFAULT - domain needs to be programmed, pgm values in sys xml file
</description>
<hasStringConversion></hasStringConversion>
<id>MSS_VDDR_PROGRAM</id>
Expand Down

0 comments on commit 57a4232

Please sign in to comment.