summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/errl/test/errluserdetailtest.H4
-rw-r--r--src/usr/isteps/istep07/call_mss_volt.C241
-rw-r--r--src/usr/isteps/istep13/call_mss_draminit.C116
-rw-r--r--src/usr/isteps/istep13/hbVddrMsg.C255
-rw-r--r--src/usr/isteps/istep13/hbVddrMsg.H54
-rw-r--r--src/usr/isteps/istep13/openpower_vddr.C5
-rw-r--r--src/usr/isteps/istepHelperFuncs.H204
-rw-r--r--src/usr/isteps/makefile4
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml419
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/target_types.xml53
10 files changed, 766 insertions, 589 deletions
diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H
index c6a404d3a..204951e38 100644
--- a/src/usr/errl/test/errluserdetailtest.H
+++ b/src/usr/errl/test/errluserdetailtest.H
@@ -226,7 +226,7 @@ public:
ErrlUserDetailsAttribute pMembufEUDA(c_target,ATTR_CHIP_ID);
pMembufEUDA.addData(ATTR_EC);
pMembufEUDA.addData(ATTR_CHIP_ID);
- pMembufEUDA.addData(ATTR_MSS_VOLT);
+ pMembufEUDA.addData(ATTR_MSS_VOLT_VDDR_MILLIVOLTS);
pMembufEUDA.addData(ATTR_MSS_FREQ);
// skipped - not there
@@ -255,7 +255,7 @@ public:
ErrlUserDetailsAttribute pDimmEUDA(c_target,ATTR_CHIP_ID);
pDimmEUDA.addData(ATTR_EC);
pDimmEUDA.addData(ATTR_CHIP_ID);
- pDimmEUDA.addData(ATTR_MSS_VOLT);
+ pDimmEUDA.addData(ATTR_MSS_VOLT_VDDR_MILLIVOLTS);
pDimmEUDA.addData(ATTR_MSS_FREQ);
// skipped - not there
diff --git a/src/usr/isteps/istep07/call_mss_volt.C b/src/usr/isteps/istep07/call_mss_volt.C
index 750be93e8..68182b938 100644
--- a/src/usr/isteps/istep07/call_mss_volt.C
+++ b/src/usr/isteps/istep07/call_mss_volt.C
@@ -69,84 +69,11 @@ using namespace ERRORLOG;
using namespace TARGETING;
-// helper function to call mss_volt_hwp
-void call_mss_volt_hwp (std::vector<TARGETING::ATTR_VMEM_ID_type>& i_VmemList,
- TARGETING::TargetHandleList& i_mcsTargetList,
- IStepError& io_StepError)
-{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_mss_volt_hwp function entry" );
- errlHndl_t l_err;
-
- //for each unique VmemId filter it out of the list of mcs targets
- //to create a subsetlist of MCSs with just that vmemid
- for (auto & l_vmem : i_VmemList)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Create list of MCS targets for vmem:0x%08X",l_vmem );
-
- // declare a vector of fapi targets to pass to mss_volt procedures
- std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> >
- l_mcsFapiTargets;
-
- for(auto & l_mcs_target : i_mcsTargetList)
- {
- // make a local copy of the target for ease of use
- if (l_mcs_target->getAttr<ATTR_VMEM_ID>() == l_vmem)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "add to fapi2::Target vector vmem_id=0x%08X "
- "target HUID %.8X",
- l_mcs_target->getAttr<ATTR_VMEM_ID>(),
- TARGETING::get_huid(l_mcs_target));
-
- fapi2::Target <fapi2::TARGET_TYPE_MCS>
- l_mcs_fapi_target (l_mcs_target);
-
- l_mcsFapiTargets.push_back( l_mcs_fapi_target );
- }
- }
-
- //now have the a list of fapi MCSs with just the one VmemId
- //call the HWP on the list of fapi targets
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Calling p9_mss_volt on list of mcs targets");
-
- FAPI_INVOKE_HWP(l_err, p9_mss_volt, l_mcsFapiTargets);
-
- // process return code.
- if ( l_err )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: p9_mss_volt HWP() failed",
- l_err->reasonCode());
- // Create IStep error log and cross reference
- // to error that occurred
- io_StepError.addErrorDetails( l_err );
-
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : mss_volt HWP( )" );
- }
- }
-
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_mss_volt_hwp function exit" );
-}
-
-
-//
-// Wrapper function to call mss_volt
-//
void* call_mss_volt( void *io_pArgs )
{
-
IStepError l_StepError;
+ errlHndl_t l_err = NULL;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt entry" );
@@ -157,95 +84,113 @@ void* call_mss_volt( void *io_pArgs )
TARGETING::TargetHandleList l_mcsTargetList;
getAllChiplets(l_mcsTargetList, TYPE_MCS);
- //get a list of unique VmemIds
- std::vector<TARGETING::ATTR_VMEM_ID_type> l_VmemList;
-
- //fapi Return Code
- fapi2::ReturnCode l_fapirc;
-
- for (auto & l_mcs : l_mcsTargetList)
+ std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> > l_mcsFapiTargetsList;
+ for(auto & l_mcs_target : l_mcsTargetList)
{
- TARGETING::ATTR_VMEM_ID_type l_VmemID =
- l_mcs->getAttr<ATTR_VMEM_ID>();
- l_VmemList.push_back(l_VmemID);
+ fapi2::Target <fapi2::TARGET_TYPE_MCS>
+ l_mcs_fapi_target (l_mcs_target);
+ l_mcsFapiTargetsList.push_back( l_mcs_fapi_target );
}
- std::sort(l_VmemList.begin(), l_VmemList.end());
- auto objItr = std::unique(l_VmemList.begin(), l_VmemList.end());
- l_VmemList.erase(objItr,l_VmemList.end());
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Calling p9_mss_volt on list of mcs targets");
- //call mss_volt hwps
- call_mss_volt_hwp (l_VmemList, l_mcsTargetList, l_StepError);
+ FAPI_INVOKE_HWP(l_err, p9_mss_volt, l_mcsFapiTargetsList);
-/* TODO RTC: 152294 Enable VDDR Functions
- errlHndl_t l_err = NULL;
- l_err = setMemoryVoltageDomainOffsetVoltage<
- TARGETING::ATTR_MSS_CENT_VDD_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VDD_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_VDD_ID>();
- if(l_err)
+ // process return code
+ if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VDD domain",
- l_err->reasonCode());
- l_StepError.addErrorDetails(l_err);
- errlCommit(l_err,HWPF_COMP_ID);
- }
+ "ERROR 0x%.8X: p9_mss_volt HWP() failed",
+ l_err->reasonCode());
- l_err = setMemoryVoltageDomainOffsetVoltage<
- TARGETING::ATTR_MSS_CENT_AVDD_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_AVDD_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_AVDD_ID>();
- if(l_err)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for AVDD domain",
- l_err->reasonCode());
+ // Create IStep error log and cross reference to error that occurred
l_StepError.addErrorDetails(l_err);
- errlCommit(l_err,HWPF_COMP_ID);
- }
- l_err = setMemoryVoltageDomainOffsetVoltage<
- TARGETING::ATTR_MSS_CENT_VCS_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VCS_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_VCS_ID>();
- if(l_err)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VCS domain",
- l_err->reasonCode());
- l_StepError.addErrorDetails(l_err);
- errlCommit(l_err,HWPF_COMP_ID);
+ // Commit Error
+ errlCommit( l_err, HWPF_COMP_ID );
}
-
- l_err = setMemoryVoltageDomainOffsetVoltage<
- TARGETING::ATTR_MSS_VOLT_VPP_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VPP_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_VPP_ID>();
- if(l_err)
+ else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VPP domain",
- l_err->reasonCode());
- l_StepError.addErrorDetails(l_err);
- errlCommit(l_err,HWPF_COMP_ID);
- }
+ // No need to compute dynamic values if mss_volt failed
- l_err = setMemoryVoltageDomainOffsetVoltage<
- TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VDDR_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_VMEM_ID>();
- if(l_err)
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VDDR domain",
- l_err->reasonCode());
- l_StepError.addErrorDetails(l_err);
- errlCommit(l_err,HWPF_COMP_ID);
- }
- */
+ // Calculate Dynamic Offset voltages for each domain
+ TARGETING::Target* pSysTarget = NULL;
+ TARGETING::targetService().getTopLevelTarget(pSysTarget);
+ assert(
+ (pSysTarget != NULL),
+ "call_mss_volt: Code bug! System target was NULL.");
+
+ // only calculate if system supports dynamic voltage
+ if (pSysTarget->getAttr< TARGETING::ATTR_SUPPORTS_DYNAMIC_MEM_VOLT >() == 1)
+ {
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_VDD_PROGRAM,
+ TARGETING::ATTR_VDD_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "VDD domain",
+ l_err->reasonCode());
+ l_StepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_AVDD_PROGRAM,
+ TARGETING::ATTR_AVDD_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "AVDD domain",
+ l_err->reasonCode());
+ l_StepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_VCS_PROGRAM,
+ TARGETING::ATTR_VCS_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "VCS domain",
+ l_err->reasonCode());
+ l_StepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_VPP_PROGRAM,
+ TARGETING::ATTR_VPP_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "VPP domain",
+ l_err->reasonCode());
+ l_StepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_VDDR_PROGRAM,
+ TARGETING::ATTR_VDDR_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "VDDR domain",
+ l_err->reasonCode());
+ l_StepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+ }
+ }
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt exit" );
return l_StepError.getErrorHandle();
diff --git a/src/usr/isteps/istep13/call_mss_draminit.C b/src/usr/isteps/istep13/call_mss_draminit.C
index fff4463d1..1aabd9ddf 100644
--- a/src/usr/isteps/istep13/call_mss_draminit.C
+++ b/src/usr/isteps/istep13/call_mss_draminit.C
@@ -57,72 +57,84 @@ using namespace TARGETING;
namespace ISTEP_13
{
-void mss_post_draminit( IStepError & l_stepError )
+void mss_post_draminit( IStepError & io_stepError )
{
errlHndl_t l_err = NULL;
bool rerun_vddr = false;
do {
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit entry" );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss_post_draminit entry" );
- //@TODO RTC: 134081. The helper function is currently commented out because
- //some of the attributes don't exist. uncomment it once attribute support is
- //in place
- set_eff_config_attrs_helper(DEFAULT, rerun_vddr);
+ set_eff_config_attrs_helper(DEFAULT, rerun_vddr);
- if ( rerun_vddr == false )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "mss_post_draminit: nothing to do" );
- break;
- }
+ if ( rerun_vddr == false )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss_post_draminit: nothing to do" );
+ break;
+ }
- // Call mss_volt_vddr_offset to recalculate VDDR voltage
- // @TODO RTC: 152294 Uncomment once attribute support is in place
-
-// l_err = ISTEP_07::setMemoryVoltageDomainOffsetVoltage<
-// TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_DISABLE,
-// TARGETING::ATTR_MEM_VDDR_OFFSET_MILLIVOLTS,
-// TARGETING::ATTR_VMEM_ID>();
-
-// if(l_err)
-// {
-// TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit: "
-// "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VDDR domain",
-// l_err->reasonCode());
-// l_stepError.addErrorDetails(l_err);
-// errlCommit(l_err,HWPF_COMP_ID);
-// break;
-// }
-// else
-// {
-// TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
-// "mss_post_draminit: mss_volt_vddr_offset(): SUCCESS");
-// }
-
- // Call HWSV to call POWR code
- // This fuction has compile-time binding for different platforms
- l_err = platform_adjust_vddr_post_dram_init();
-
- if( l_err )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: mss_post_draminit: "
- "platform_adjust_vddr_post_dram_init() returns error",
- l_err->reasonCode());
+ // Call mss_volt_vddr_offset to recalculate VDDR voltage
+ TARGETING::Target* pSysTarget = nullptr;
+ TARGETING::targetService().getTopLevelTarget(pSysTarget);
+ assert((pSysTarget != nullptr),
+ "mss_post_draminit: Code bug! System target was NULL.");
- // Create IStep error log and cross reference to error that occurred
- l_stepError.addErrorDetails( l_err );
+ // only calculate if system supports dynamic voltage
+ if (pSysTarget->getAttr< TARGETING::ATTR_SUPPORTS_DYNAMIC_MEM_VOLT >()
+ == 1)
+ {
+ // Update mss_volt_vddr_offset_millivolts attribute
+ l_err = computeDynamicMemoryVoltage<
+ TARGETING::ATTR_MSS_VDDR_PROGRAM,
+ TARGETING::ATTR_VDDR_ID>();
+ if(l_err)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%08X: computeDynamicMemoryVoltage for "
+ "VDDR domain",
+ l_err->reasonCode());
+ io_stepError.addErrorDetails(l_err);
+ errlCommit(l_err,HWPF_COMP_ID);
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss_post_draminit: mss_volt_vddr_offset_millivolts "
+ "successfully updated");
+ }
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss_post_draminit: dynamic voltage not "
+ "supported on this system");
+ break;
+ }
- // Commit Error
- errlCommit( l_err, HWPF_COMP_ID );
- }
+ // Call HWSV to call POWR code
+ // This fuction has compile-time binding for different platforms
+ l_err = platform_adjust_vddr_post_dram_init();
+
+ if( l_err )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: mss_post_draminit: "
+ "platform_adjust_vddr_post_dram_init() returns error",
+ l_err->reasonCode());
+
+ // Create IStep error log and cross reference to error that occurred
+ io_stepError.addErrorDetails( l_err );
+
+ // Commit Error
+ errlCommit( l_err, HWPF_COMP_ID );
+ }
} while(0);
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "mss_post_draminit exit" );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit exit" );
return;
}
diff --git a/src/usr/isteps/istep13/hbVddrMsg.C b/src/usr/isteps/istep13/hbVddrMsg.C
index d9918f3dd..1a6236807 100644
--- a/src/usr/isteps/istep13/hbVddrMsg.C
+++ b/src/usr/isteps/istep13/hbVddrMsg.C
@@ -39,9 +39,12 @@
#include <initservice/initserviceif.H>
#include <pnor/pnorif.H>
#include "platform_vddr.H"
+#include <istepHelperFuncs.H>
+#include <targeting/common/target.H>
using namespace ERRORLOG;
+
using namespace TARGETING;
// Trace definition
@@ -55,7 +58,6 @@ HBVddrMsg::HBVddrMsg()
{
TRACDCOMP( g_trac_volt, ENTER_MRK "HBVddrMsg::HBVddrMsg()" );
TRACDCOMP( g_trac_volt, EXIT_MRK "HBVddrMsg::HBVddrMsg()" );
-
};
///////////////////////////////////////////////////////////////////////////////
@@ -116,54 +118,47 @@ bool isUnusedVoltageDomain(
//******************************************************************************
template<
- const ATTRIBUTE_ID OFFSET_DISABLEMENT_ATTR,
- const ATTRIBUTE_ID VOLTAGE_ATTR_WHEN_OFFSET_ENABLED,
- const ATTRIBUTE_ID VOLTAGE_ATTR_WHEN_OFFSET_DISABLED,
+ const ATTRIBUTE_ID MSS_DOMAIN_PROGRAM,
+ const ATTRIBUTE_ID VOLTAGE_ATTR_STATIC,
+ const ATTRIBUTE_ID VOLTAGE_ATTR_DYNAMIC,
const ATTRIBUTE_ID VOLTAGE_DOMAIN_ID_ATTR >
void HBVddrMsg::addMemoryVoltageDomains(
- const TARGETING::Target* const i_pMembuf,
+ const TARGETING::Target* const i_pMcbist,
HBVddrMsg::RequestContainer& io_domains) const
{
assert(
- (i_pMembuf != NULL),
+ (i_pMcbist != NULL),
"HBVddrMsg::addMemoryVoltageDomains: Code bug! Caller passed NULL "
- "memory buffer target handle.");
+ "MCBIST target handle.");
assert(
- ( ( i_pMembuf->getAttr<TARGETING::ATTR_CLASS>()
- == TARGETING::CLASS_CHIP)
- && ( i_pMembuf->getAttr<TARGETING::ATTR_TYPE>()
- == TARGETING::TYPE_MEMBUF)),
+ ( ( i_pMcbist->getAttr<TARGETING::ATTR_CLASS>()
+ == TARGETING::CLASS_UNIT)
+ && ( i_pMcbist->getAttr<TARGETING::ATTR_TYPE>()
+ == TARGETING::TYPE_MCBIST)),
"HBVddrMsg::addMemoryVoltageDomains: Code bug! Caller passed non-"
- "memory buffer target handle of class = 0x%08X and type of 0x%08X.",
- i_pMembuf->getAttr<TARGETING::ATTR_CLASS>(),
- i_pMembuf->getAttr<TARGETING::ATTR_TYPE>());
+ "MCBIST target handle of class = 0x%08X and type of 0x%08X.",
+ i_pMcbist->getAttr<TARGETING::ATTR_CLASS>(),
+ i_pMcbist->getAttr<TARGETING::ATTR_TYPE>());
- TARGETING::Target* pSysTarget = NULL;
+ TARGETING::Target* pSysTarget = nullptr;
TARGETING::targetService().getTopLevelTarget(pSysTarget);
assert(
- (pSysTarget != NULL),
+ (pSysTarget != nullptr),
"HBVddrMsg::addMemoryVoltageDomains: Code bug! System target was "
"NULL.");
- typename AttributeTraits< OFFSET_DISABLEMENT_ATTR >::Type
- disableOffsetVoltage =
- pSysTarget->getAttr< OFFSET_DISABLEMENT_ATTR >();
+ typename AttributeTraits< MSS_DOMAIN_PROGRAM >::Type
+ domainProgram = pSysTarget->getAttr< MSS_DOMAIN_PROGRAM >();
- assert(
- (disableOffsetVoltage <= true),
- "HBVddrMsg::addMemoryVoltageDomains: Code Bug! Unsupported "
- "value of 0x%02X for attribute ID of 0x%08X.",
- disableOffsetVoltage,
- OFFSET_DISABLEMENT_ATTR);
// Initialized by constructor to invalid defaults
HBVddrMsg::hwsvPowrMemVoltDomainRequest_t entry;
switch(VOLTAGE_DOMAIN_ID_ATTR)
{
- case TARGETING::ATTR_VMEM_ID:
+ case TARGETING::ATTR_VDDR_ID:
entry.domain = MEM_VOLTAGE_DOMAIN_VDDR;
break;
case TARGETING::ATTR_VCS_ID:
@@ -189,27 +184,26 @@ void HBVddrMsg::addMemoryVoltageDomains(
// There is no reasonable check to validate if a voltage ID we're reading
// is valid so it has to be assumed good
- entry.domainId = i_pMembuf->getAttr< VOLTAGE_DOMAIN_ID_ATTR >();
+ entry.domainId = i_pMcbist->getAttr< VOLTAGE_DOMAIN_ID_ATTR >();
// 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(!disableOffsetVoltage)
+ if(domainProgram == MSS_PROGRAM_TYPE::STATIC)
{
typename
- TARGETING::AttributeTraits< VOLTAGE_ATTR_WHEN_OFFSET_ENABLED >::Type
+ TARGETING::AttributeTraits< VOLTAGE_ATTR_STATIC >::Type
voltageMillivolts
- = i_pMembuf->getAttr< VOLTAGE_ATTR_WHEN_OFFSET_ENABLED >();
+ = i_pMcbist->getAttr< VOLTAGE_ATTR_STATIC >();
entry.voltageMillivolts = static_cast<uint32_t>(voltageMillivolts);
io_domains.push_back(entry);
}
- else if( VOLTAGE_ATTR_WHEN_OFFSET_DISABLED
- != VOLTAGE_ATTR_WHEN_OFFSET_ENABLED)
+ else if(domainProgram == MSS_PROGRAM_TYPE::DYNAMIC)
{
typename
- TARGETING::AttributeTraits< VOLTAGE_ATTR_WHEN_OFFSET_DISABLED >::Type
+ TARGETING::AttributeTraits< VOLTAGE_ATTR_DYNAMIC >::Type
voltageMillivolts
- = i_pMembuf->getAttr< VOLTAGE_ATTR_WHEN_OFFSET_DISABLED >();
+ = i_pMcbist->getAttr< VOLTAGE_ATTR_DYNAMIC >();
entry.voltageMillivolts = static_cast<uint32_t>(voltageMillivolts);
io_domains.push_back(entry);
@@ -226,80 +220,64 @@ void HBVddrMsg::createVddrData(
{
TRACFCOMP( g_trac_volt, ENTER_MRK "HBVddrMsg::createVddrData" );
- // Go through all the memory buffers and gather their domains, domain
+ // Go through all the mcbist targets and gather their domains, domain
// specific IDs, and domain specific voltages
io_request.clear();
do{
- TARGETING::TargetHandleList membufTargetList;
- //When request is a disable command, disable all present Centaurs
- // in case we go through a reconfigure loop
- if(i_requestType == HB_VDDR_DISABLE)
- {
- getChipResources( membufTargetList, TYPE_MEMBUF,
- UTIL_FILTER_PRESENT );
- }
- //When the request is an enable command, enable only functional
- // centaurs.
- else
- {
- getAllChips(membufTargetList, TYPE_MEMBUF);
- }
+ TARGETING::TargetHandleList l_mcbistTargetList;
- TARGETING::Target* pMembuf =NULL;
- for (TARGETING::TargetHandleList::const_iterator
- ppMembuf = membufTargetList.begin();
- ppMembuf != membufTargetList.end();
- ++ppMembuf)
- {
- pMembuf = *ppMembuf;
+ // get all functional MCBIST targets
+ getAllChiplets(l_mcbistTargetList, TYPE_MCBIST);
+ for (const auto & pMcbist: l_mcbistTargetList)
+ {
if(i_requestType == HB_VDDR_ENABLE)
{
(void)addMemoryVoltageDomains<
- TARGETING::ATTR_MSS_CENT_VDD_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VDD_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_MEM_VDD_OFFSET_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VDD_PROGRAM,
+ TARGETING::ATTR_MSS_VOLT_VDD_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VOLT_VDD_OFFSET_MILLIVOLTS,
TARGETING::ATTR_VDD_ID>(
- pMembuf,
+ pMcbist,
io_request);
(void)addMemoryVoltageDomains<
- TARGETING::ATTR_MSS_CENT_AVDD_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_AVDD_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_MEM_AVDD_OFFSET_MILLIVOLTS,
+ TARGETING::ATTR_MSS_AVDD_PROGRAM,
+ TARGETING::ATTR_MSS_VOLT_AVDD_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VOLT_AVDD_OFFSET_MILLIVOLTS,
TARGETING::ATTR_AVDD_ID>(
- pMembuf,
+ pMcbist,
io_request);
(void)addMemoryVoltageDomains<
- TARGETING::ATTR_MSS_CENT_VCS_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VCS_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_MEM_VCS_OFFSET_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VCS_PROGRAM,
+ TARGETING::ATTR_MSS_VOLT_VCS_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VOLT_VCS_OFFSET_MILLIVOLTS,
TARGETING::ATTR_VCS_ID>(
- pMembuf,
+ pMcbist,
io_request);
(void)addMemoryVoltageDomains<
- TARGETING::ATTR_MSS_VOLT_VPP_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VPP_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_MSS_VOLT_VPP,
+ TARGETING::ATTR_MSS_VPP_PROGRAM,
+ TARGETING::ATTR_MSS_VOLT_VPP_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VOLT_VPP_OFFSET_MILLIVOLTS,
TARGETING::ATTR_VPP_ID>(
- pMembuf,
+ pMcbist,
io_request);
}
(void)addMemoryVoltageDomains<
- TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_DISABLE,
- TARGETING::ATTR_MEM_VDDR_OFFSET_MILLIVOLTS,
- TARGETING::ATTR_MSS_VOLT,
- TARGETING::ATTR_VMEM_ID>(
- pMembuf,
+ TARGETING::ATTR_MSS_VDDR_PROGRAM,
+ TARGETING::ATTR_MSS_VOLT_VDDR_MILLIVOLTS,
+ TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_MILLIVOLTS,
+ TARGETING::ATTR_VDDR_ID>(
+ pMcbist,
io_request);
}
- if (membufTargetList.size() > 1)
+ if (l_mcbistTargetList.size() > 1)
{
// Take out the duplicate records in io_request by first
// sorting and then removing the duplicates
@@ -314,7 +292,7 @@ void HBVddrMsg::createVddrData(
if( ( (i_requestType == HB_VDDR_ENABLE) ||
(i_requestType == HB_VDDR_POST_DRAM_INIT_ENABLE) )
- && (!membufTargetList.empty()) )
+ && (!l_mcbistTargetList.empty()) )
{
// Inhibit sending any request to turn on a domain with no voltage.
// When disabling we don't need to do this because the voltage is
@@ -343,6 +321,12 @@ errlHndl_t HBVddrMsg::sendMsg(VDDR_MSG_TYPE i_msgType) const
do
{
RequestContainer l_request;
+ if (!TARGETING::is_vpo())
+ {
+ TRACFCOMP(g_trac_volt,
+ "hbVddrMsg::sendMsg skipped because of VPO environment");
+ break;
+ }
if ( ! ( (i_msgType == HB_VDDR_ENABLE) ||
(i_msgType == HB_VDDR_DISABLE) ||
@@ -367,11 +351,11 @@ errlHndl_t HBVddrMsg::sendMsg(VDDR_MSG_TYPE i_msgType) const
}
createVddrData(i_msgType, l_request);
-
size_t l_dataCount = l_request.size();
// Only send a message if there is data to send
- if (l_dataCount)
+ // Skip sending message if VPO
+ if ( l_dataCount )
{
uint32_t l_msgSize = l_dataCount *
sizeof(hwsvPowrMemVoltDomainRequest_t);
@@ -390,7 +374,7 @@ errlHndl_t HBVddrMsg::sendMsg(VDDR_MSG_TYPE i_msgType) const
hwsvPowrMemVoltDomainRequest_t* l_ptr =
reinterpret_cast<hwsvPowrMemVoltDomainRequest_t*>(l_data);
- for (size_t j =0; j<l_dataCount; ++j)
+ for (size_t j = 0; j<l_dataCount; ++j)
{
l_ptr->domain=l_request.at(j).domain;
l_ptr->domainId=l_request.at(j).domainId;
@@ -434,34 +418,31 @@ errlHndl_t HBVddrMsg::sendMsg(VDDR_MSG_TYPE i_msgType) const
}
//
-// calloutCentaurChildDimms : HW callout for the failing DIMMs
+// calloutMcbistChildDimms : HW callout for the failing DIMMs
//
-void calloutCentaurChildDimms(
- errlHndl_t & io_errl,
- const TARGETING::Target * i_membuf)
+void calloutMcbistChildDimms( errlHndl_t & io_errl,
+ const TARGETING::Target * i_mcbist)
{
- TRACFCOMP(g_trac_volt, ENTER_MRK "calloutCentaurChildDimms");
+ TRACFCOMP(g_trac_volt, ENTER_MRK "calloutMcbistChildDimms");
TARGETING::TargetHandleList l_dimmList;
// Get child dimms
getChildAffinityTargets( l_dimmList,
- i_membuf,
+ i_mcbist,
CLASS_NA,
TYPE_DIMM );
if( !l_dimmList.empty())
{
// iterate over the DIMMs and call them out
- TargetHandleList::iterator l_iter = l_dimmList.begin();
-
- for(;l_iter != l_dimmList.end(); ++l_iter)
+ for (const auto & l_dimm : l_dimmList)
{
TRACFCOMP( g_trac_volt, INFO_MRK
- "HBVddrMsg::calloutCentaurChildDimms Target HUID = 0x%08X" ,
- TARGETING::get_huid(*l_iter) );
+ "HBVddrMsg::calloutMcbistChildDimms Target HUID = 0x%08X" ,
+ TARGETING::get_huid(l_dimm) );
- io_errl->addHwCallout( *l_iter,
+ io_errl->addHwCallout( l_dimm,
HWAS::SRCI_PRIORITY_LOW,
HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
@@ -469,14 +450,13 @@ void calloutCentaurChildDimms(
}
else
{
- TRACFCOMP(g_trac_volt, "Centuar [ 0x%08X ] No child DIMMs found!",
- TARGETING::get_huid(i_membuf));
+ TRACFCOMP(g_trac_volt, "Mcbist [ 0x%08X ] No child DIMMs found!",
+ TARGETING::get_huid(i_mcbist));
}
- TRACFCOMP(g_trac_volt, EXIT_MRK "calloutCentaurChildDimms");
+ TRACFCOMP(g_trac_volt, EXIT_MRK "calloutMcbistChildDimms");
}
-
///////////////////////////////////////////////////////////////////////////////
// HBVddrMsg::processVDDRmsg
///////////////////////////////////////////////////////////////////////////////
@@ -484,9 +464,9 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
{
TRACFCOMP(g_trac_volt, ENTER_MRK "HBVddrMsg::processVDDRmsg");
errlHndl_t l_errLog = NULL;
+
//check to see if an error occurred from the powr Enable/Disable functions
//and is inside the message
-
uint32_t l_msgSize = i_recvMsg->data[1];
uint16_t l_elementCount = l_msgSize/sizeof(hwsvPowrMemVoltDomainReply_t);
const uint8_t* l_extraData = NULL;
@@ -495,7 +475,7 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
do{
if (l_extraData==NULL)
{
- //an error occred in obtaining the extra data from the response msg
+ //an error occurred in obtaining the extra data from the response msg
TRACFCOMP( g_trac_volt, ERR_MRK
"HBVddrMsg::processVDDRmsg: l_extraData = NULL");
//create an errorlog
@@ -516,7 +496,7 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
}
MEM_VOLTAGE_DOMAIN domain = MEM_VOLTAGE_DOMAIN_UNKNOWN;
- TARGETING::ATTR_VMEM_ID_type l_domainId =0x0;
+ TARGETING::ATTR_VDDR_ID_type l_domainId =0x0;
uint32_t l_errPlid =0x0;
TRACFCOMP( g_trac_volt, INFO_MRK "HBVddrMsg::processVDDRmsg: "
@@ -534,7 +514,7 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
TRACFCOMP( g_trac_volt, INFO_MRK "HBVddrMsg::processVDDRmsg: "
"domain = 0x%08X, l_domainId=0x%08X, l_errPlid=0x%08X",
domain,l_domainId,l_errPlid);
- if (l_errPlid ==0x0)
+ if (l_errPlid == 0x0)
{
TRACFCOMP( g_trac_volt, INFO_MRK "HBVddrMsg::processVDDRmsg: "
"no plid error found for domain = 0x%08X, "
@@ -542,10 +522,10 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
}
else
{
- //error occured so break out of the loop and indicate
+ //error occurred so break out of the loop and indicate
//an error was present
TRACFCOMP( g_trac_volt, ERR_MRK
- "HBVddrMsg::processVDDRmsg: error occured "
+ "HBVddrMsg::processVDDRmsg: error occurred "
"on the powr function called in hwsv");
//create an errorlog
/*@
@@ -567,60 +547,56 @@ errlHndl_t HBVddrMsg::processVDDRmsg(msg_t* i_recvMsg) const
HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR,
HWAS::SRCI_PRIORITY_MED );
- // Find the centaur buffers associated with this Domain id
- TARGETING::TargetHandleList membufTargetList;
- TARGETING::ATTR_VMEM_ID_type l_attr_domainId = 0x0;
- TARGETING::Target* pMembuf =NULL;
- getAllChips(membufTargetList, TYPE_MEMBUF);
+ // Find the MCBIST associated with this Domain ID
+ TARGETING::TargetHandleList mcbistTargetList;
+ TARGETING::ATTR_VDDR_ID_type l_attr_domainId = 0x0;
- for (TARGETING::TargetHandleList::const_iterator
- ppMembuf = membufTargetList.begin();
- ppMembuf != membufTargetList.end();
- ++ppMembuf)
+ getAllChiplets(mcbistTargetList, TYPE_MCBIST);
+
+ bool l_domain_found;
+ for (const auto & pMcbist: mcbistTargetList)
{
- pMembuf = *ppMembuf;
- // Get the domain id and check if this Id is matching
- // centaur chip reported for failing domain Id
+ l_domain_found = true;
switch(domain)
{
- // Add hw callouts for the failing Centaur and it's
- // child DIMMs
+ // Add hw callouts for child DIMMs
case MEM_VOLTAGE_DOMAIN_VDDR:
l_attr_domainId =
- pMembuf->getAttr< TARGETING::ATTR_VMEM_ID >();
+ pMcbist->getAttr< TARGETING::ATTR_VDDR_ID >();
break;
case MEM_VOLTAGE_DOMAIN_VCS:
l_attr_domainId =
- pMembuf->getAttr< TARGETING::ATTR_VCS_ID>();
+ pMcbist->getAttr< TARGETING::ATTR_VCS_ID>();
break;
case MEM_VOLTAGE_DOMAIN_VPP:
l_attr_domainId =
- pMembuf->getAttr< TARGETING::ATTR_VPP_ID>();
+ pMcbist->getAttr< TARGETING::ATTR_VPP_ID>();
break;
case MEM_VOLTAGE_DOMAIN_AVDD:
l_attr_domainId =
- pMembuf->getAttr< TARGETING::ATTR_AVDD_ID>();
+ pMcbist->getAttr< TARGETING::ATTR_AVDD_ID>();
break;
case MEM_VOLTAGE_DOMAIN_VDD:
l_attr_domainId =
- pMembuf->getAttr< TARGETING::ATTR_VDD_ID>();
+ pMcbist->getAttr< TARGETING::ATTR_VDD_ID>();
break;
default:
- // Mark this Centaur as Not found
- pMembuf = NULL;
+ // Mark this Dimm as Not found
+ l_domain_found = false;
TRACFCOMP( g_trac_volt, ERR_MRK
- "[ ERROR ] unsupported Domain" );
+ "[ ERROR ] unsupported Domain %d", domain );
break;
}
- // Call out DIMMs associated for this Centaur
- if(( pMembuf != NULL ) && ( l_attr_domainId == l_domainId ))
+ // Add Callout MCBIST dimms
+ if((l_domain_found) && ( l_attr_domainId == l_domainId ))
{
TRACFCOMP( g_trac_volt, INFO_MRK
- " Target Centaur HUID = 0x%08X",
- TARGETING::get_huid(pMembuf));
+ "HBVddrMsg::processVDDRmsg MCBIST Target HUID = 0x%08X"
+ " matches failing domain 0x%08X and ID = 0x%08X",
+ TARGETING::get_huid(pMcbist), domain, l_domainId );
- calloutCentaurChildDimms( l_errLog, pMembuf );
+ calloutMcbistChildDimms(l_errLog, pMcbist);
}
}
@@ -653,7 +629,6 @@ errlHndl_t HBVddrMsg::processMsg(msg_t* i_Msg) const
if (l_value1 ==0)
{
//process a response to a request
-
uint32_t l_msgType =i_Msg->type;
TRACFCOMP( g_trac_volt, INFO_MRK
"HBVddrMsg::processMsg l_msgType=x%08X",l_msgType );
@@ -667,7 +642,6 @@ errlHndl_t HBVddrMsg::processMsg(msg_t* i_Msg) const
{
break;
}
-
}
else
{
@@ -694,6 +668,7 @@ errlHndl_t HBVddrMsg::processMsg(msg_t* i_Msg) const
//an error occurred so should stop the IPL
TRACFCOMP( g_trac_volt, ERR_MRK
"HBVddrMsg::RecvMsgHndlr recv'd an error message" );
+
//generate an errorlog
/*@
* @errortype
@@ -743,7 +718,16 @@ void HBVddrMsg::createErrLog(errlHndl_t& io_err,
errlHndl_t platform_enable_vddr()
{
errlHndl_t l_err = NULL;
- if(INITSERVICE::spBaseServicesEnabled())
+
+ TARGETING::Target* pSysTarget = nullptr;
+ TARGETING::targetService().getTopLevelTarget(pSysTarget);
+ assert(
+ (pSysTarget != nullptr),
+ "platform_enable_vddr: Code bug! System target was NULL.");
+
+ // only enable vddr if system supports dynamic voltage and MBOX available
+ if((pSysTarget->getAttr< TARGETING::ATTR_SUPPORTS_DYNAMIC_MEM_VOLT >() == 1)
+ && (INITSERVICE::spBaseServicesEnabled()))
{
HBVddrMsg l_hbVddr;
@@ -764,7 +748,8 @@ errlHndl_t platform_enable_vddr()
else // no FSP/mbox services available
{
TRACFCOMP(g_trac_volt,"call_host_enable_vddr"
- "no-op because mbox not available");
+ " no-op because mbox not available or system"
+ " does not support dynamic voltages");
}
return l_err;
diff --git a/src/usr/isteps/istep13/hbVddrMsg.H b/src/usr/isteps/istep13/hbVddrMsg.H
index 22c3557c2..1f491b7b5 100644
--- a/src/usr/isteps/istep13/hbVddrMsg.H
+++ b/src/usr/isteps/istep13/hbVddrMsg.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2015 */
+/* Contributors Listed Below - COPYRIGHT 2012,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -78,7 +78,7 @@ public:
MEM_VOLTAGE_DOMAIN_AVDD = 0x02,
MEM_VOLTAGE_DOMAIN_VCS = 0x03,
MEM_VOLTAGE_DOMAIN_VPP = 0x04,
- MEM_VOLTAGE_DOMAIN_VDDR = 0x05,
+ MEM_VOLTAGE_DOMAIN_VDDR = 0x05, // aka VMEM
// Good range markers - Need to be adjusted if the above change
MEM_VOLTAGE_DOMAIN_MIN_VALUE = MEM_VOLTAGE_DOMAIN_VDD,
@@ -94,8 +94,8 @@ public:
struct hwsvPowrMemVoltDomainRequest_t
{
MEM_VOLTAGE_DOMAIN domain;
- TARGETING::ATTR_VMEM_ID_type domainId;
- TARGETING::ATTR_MSS_VOLT_type voltageMillivolts;
+ TARGETING::ATTR_VDDR_ID_type domainId;
+ TARGETING::ATTR_MSS_VOLT_VDDR_MILLIVOLTS_type voltageMillivolts;
hwsvPowrMemVoltDomainRequest_t()
: domain(MEM_VOLTAGE_DOMAIN_UNKNOWN),
@@ -116,7 +116,7 @@ public:
struct hwsvPowrMemVoltDomainReply_t
{
MEM_VOLTAGE_DOMAIN domain;
- TARGETING::ATTR_VMEM_ID_type domainId;
+ TARGETING::ATTR_VDDR_ID_type domainId;
uint32_t plid;
hwsvPowrMemVoltDomainReply_t()
@@ -207,40 +207,38 @@ public:
private:
/**
- * @brief For a given memory buffer and memory voltage domain, adds a
+ * @brief For a given mcbist and memory voltage domain, adds a
* voltage programming request record to the input list
*
- * @tparam OFFSET_DISABLEMENT_ATTR
- * ID of the attribute to read to determine if a given memory voltage
- * domain offset voltage should be applied or not. Should be one of
- * the TARGETING::ATTR_*_ID attribute IDs, where * = VMEM, VPP, VCS,
- * VDD, or AVDD.
+ * @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
*
- * @tparam VOLTAGE_ATTR_WHEN_OFFSET_ENABLED
+ * @tparam VOLTAGE_ATTR_STATIC
* ID of the attribute which should be read to obtain the given memory
* voltage domain's offset voltage to program. In this case the offset
* voltage acts as the actual voltage. Should be one of the
- * TARGETING::ATTR_MEM_*_OFFSET_MILLIVOLTS attribute IDs, where
+ * TARGETING::ATTR_MSS_VOLT_*_MILLIVOLTS attribute IDs, where
* * = VMEM, VPP, VCS, VDD, or AVDD. Only used when the memory voltage
- * domain's offset voltage is enabled. Otherwise the parameter, below,
+ * domain's programming equals static. Otherwise the parameter, below,
* controls how the voltage, if any, is programmed.
*
- * @tparam VOLTAGE_ATTR_WHEN_OFFSET_DISABLED
+ * @tparam VOLTAGE_ATTR_DYNAMIC
* ID of the attribute which should be read to obtain the given memory
* voltage domain's voltage to program. Only applied if the memory
- * voltage domain's offset voltage is disabled -AND- the attribute ID
- * is different than the one given by
- * VOLTAGE_ATTR_WHEN_OFFSET_ENABLED. Should be one of
- * TARGETING::ATTR_VPP_BASE, TARGETING::ATTR_MSS_VOLT, or
- * TARGETING::ATTR_MEM_*_OFFSET_MILLIVOLTS where * = VPP, AVDD, or
- * VCS.
+ * voltage domain's programming equals dynamic. Should be one of the
+ * TARGETING::ATTR_MSS_VOLT_*_OFFSET_MILLIVOLTS attribute IDs,
+ * where * = VMEM, VPP, VCS, VDD, or AVDD.
*
* @note: This function does not ensure that all permutations of the above
* template parameters are valid.
*
- * @param[in] i_pMembuf
- * Handle to a memory buffer target. Function will assert if NULL or
- * not a memory buffer target.
+ * @param[in] i_pMcbist
+ * Handle to a MCBIST target. Function will assert if NULL or
+ * not a MCBIST target.
*
* @param[in,out] io_domains
* On input, an existing list of 0 or more voltage domain records. On
@@ -250,12 +248,12 @@ private:
* @return N/A
*/
template<
- const TARGETING::ATTRIBUTE_ID OFFSET_DISABLEMENT_ATTR,
- const TARGETING::ATTRIBUTE_ID VOLTAGE_ATTR_WHEN_OFFSET_ENABLED,
- const TARGETING::ATTRIBUTE_ID VOLTAGE_ATTR_WHEN_OFFSET_DISABLED,
+ const TARGETING::ATTRIBUTE_ID MSS_DOMAIN_PROGRAM,
+ const TARGETING::ATTRIBUTE_ID VOLTAGE_ATTR_STATIC,
+ const TARGETING::ATTRIBUTE_ID VOLTAGE_ATTR_DYNAMIC,
const TARGETING::ATTRIBUTE_ID VOLTAGE_DOMAIN_ID_ATTR >
void addMemoryVoltageDomains(
- const TARGETING::Target* const i_pMembuf,
+ const TARGETING::Target* const i_pMcbist,
HBVddrMsg::RequestContainer& io_domains) const;
protected:
diff --git a/src/usr/isteps/istep13/openpower_vddr.C b/src/usr/isteps/istep13/openpower_vddr.C
index 2ee7800da..5d8b4c8fc 100644
--- a/src/usr/isteps/istep13/openpower_vddr.C
+++ b/src/usr/isteps/istep13/openpower_vddr.C
@@ -177,10 +177,7 @@ static errlHndl_t for_each_vddr_domain_with_functional_memory(
l_membufTargetList.erase(pInvalidEntries,l_membufTargetList.end());
// Invoke callback for one Centaur per unique VDDR domain
- for (TargetHandleList::iterator
- l_membuf_iter = l_membufTargetList.begin();
- l_membuf_iter != l_membufTargetList.end();
- ++l_membuf_iter)
+ for (const auto & l_membuf_iter: l_membufTargetList)
{
Target* l_pCentaur = *l_membuf_iter;
diff --git a/src/usr/isteps/istepHelperFuncs.H b/src/usr/isteps/istepHelperFuncs.H
index 6b877fe19..1f6a5c8dd 100644
--- a/src/usr/isteps/istepHelperFuncs.H
+++ b/src/usr/isteps/istepHelperFuncs.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,6 +31,12 @@
#include <targeting/common/utilFilter.H>
#include <attributetraits.H>
#include <attributeenums.H>
+#include <initservice/isteps_trace.H>
+#include <fapi2.H>
+
+// fapi2 HWP invoker
+#include <fapi2/plat_hwp_invoker.H>
+
/**
* @brief Enum specifying what attributes should be used to set the
* memory _EFF_CONFIG attributes
@@ -42,6 +48,15 @@ enum EFF_CONFIG_ATTRIBUTES_BASE
POST_DRAM_INIT = 0x01, ///< Use POST_DRAM_INIT attributes if non-zero
};
+/**
+ * @brief Enum for per-domain control of different voltages
+ */
+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
+};
//
// Helper function to set _EFF_CONFIG attributes for HWPs
@@ -51,73 +66,72 @@ void set_eff_config_attrs_helper( const EFF_CONFIG_ATTRIBUTES_BASE i_base,
/**
- * @brief Compares two memory buffer targets based on the voltage domain ID for
+ * @brief Compares two mcbist targets based on the voltage domain ID for
* the voltage domain given by the template parameter. Used for sorting
- * memory buffer targets within containers. API should be called in well
+ * mcbist targets within containers. API should be called in well
* controlled conditions where the input restrictions can be guaranteed.
*
- * @param[in] i_pMembufLhs
- * Left hand side memory buffer target. Must be a memory buffer target,
+ * @param[in] i_pMcbistLhs
+ * Left hand side mcbist target. Must be a mcbist target,
* and must not be NULL. These conditions are not enforced internally.
*
- * @param[in] i_pMembufRhs
- * Right hand side memory buffer target. Must be a memory buffer target,
+ * @param[in] i_pMcbistRhs
+ * Right hand side mcbist target. Must be a mcbist target,
* and must not be NULL. These conditions are not enforced internally.
*
* @tparam VOLTAGE_DOMAIN_ID_ATTR
* Attribute corresponding to voltage domain to compare
*
- * @return Bool indicating whether LHS memory buffer target's voltage domain ID
- * for the specified domain logically precedes the RHS memory buffer
+ * @return Bool indicating whether LHS mcbist target's voltage domain ID
+ * for the specified domain logically precedes the RHS mcbist
* target's voltage domain ID for the same domain
*/
template < const TARGETING::ATTRIBUTE_ID VOLTAGE_DOMAIN_ID_ATTR>
-bool _compareMembufWrtVoltageDomain(
- TARGETING::Target* i_pMembufLhs,
- TARGETING::Target* i_pMembufRhs)
+bool _compareMcbistWrtVoltageDomain(
+ TARGETING::Target* i_pMcbistLhs,
+ TARGETING::Target* i_pMcbistRhs)
{
typename TARGETING::AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type
- lhsDomain = i_pMembufLhs->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
+ lhsDomain = i_pMcbistLhs->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
typename TARGETING::AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type
- rhsDomain = i_pMembufRhs->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
+ rhsDomain = i_pMcbistRhs->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
return lhsDomain < rhsDomain;
}
+
+
//******************************************************************************
-// setMemoryVoltageDomainOffsetVoltage
+// computeDynamicMemoryVoltage
//******************************************************************************
// TODO via RTC: 110777
-// Optimize setMemoryVoltageDomainOffsetVoltage into templated and non-templated
+// Optimize computeDynamicMemoryVoltage into templated and non-templated
// pieces to reduce code size
-/*
- * TODO: RTC:133830 Re-enable this function, the following ATTRs don't seem to
- * exist currently.
-template< const ATTRIBUTE_ID OFFSET_DISABLEMENT_ATTR,
- const ATTRIBUTE_ID OFFSET_VOLTAGE_ATTR,
- const ATTRIBUTE_ID VOLTAGE_DOMAIN_ID_ATTR >
-errlHndl_t setMemoryVoltageDomainOffsetVoltage()
+template< const TARGETING::ATTRIBUTE_ID OFFSET_DISABLEMENT_ATTR,
+ const TARGETING::ATTRIBUTE_ID VOLTAGE_DOMAIN_ID_ATTR >
+errlHndl_t computeDynamicMemoryVoltage()
{
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "setMemoryVoltageDomainOffsetVoltage enter");
+ TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "computeDynamicMemoryVoltage enter");
- errlHndl_t pError = NULL;
-
- do {
+ errlHndl_t pError = NULL;
+ do
+ {
TARGETING::Target* pSysTarget = NULL;
TARGETING::targetService().getTopLevelTarget(pSysTarget);
- assert(pSysTarget != NULL,"setMemoryVoltageDomainOffsetVoltage: "
- "System target was NULL.");
+ assert(pSysTarget != NULL,
+ "computeDynamicMemoryVoltage: System target was NULL.");
- typename AttributeTraits< OFFSET_DISABLEMENT_ATTR >::Type
- disableOffsetVoltage =
+ typename TARGETING::AttributeTraits< OFFSET_DISABLEMENT_ATTR >::Type
+ domainProgram =
pSysTarget->getAttr< OFFSET_DISABLEMENT_ATTR >();
- if(disableOffsetVoltage)
+
+ if(domainProgram != MSS_PROGRAM_TYPE::DYNAMIC)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "INFO: Offset voltage processing disabled for domain type 0x%08X.",
+ "INFO: Dynamic offset voltage processing disabled for domain type 0x%08X.",
OFFSET_DISABLEMENT_ATTR);
break;
}
@@ -126,7 +140,7 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
"INFO: Offset voltage processing enabled for domain type 0x%08X.",
OFFSET_DISABLEMENT_ATTR);
- typedef fapi::ReturnCode (*pOffsetFn_t)(std::vector<fapi::Target>&);
+ typedef fapi2::ReturnCode (*pOffsetFn_t)(std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCS>>&);
struct {
@@ -136,17 +150,18 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
bool callIfAllNonFunc;
} fnMap[] = {
-
+/* TODO: RTC 157349 -- These HWPs don't exist yet
{TARGETING::ATTR_AVDD_ID,
- mss_volt_avdd_offset,"mss_volt_avdd_offset", true},
+ p9_mss_dynamic_vid_avdd,"p9_mss_dynamic_vid_avdd", true},
{TARGETING::ATTR_VDD_ID ,
- mss_volt_vdd_offset ,"mss_volt_vdd_offset", true},
+ p9_mss_dynamic_vid_vdd ,"p9_mss_dynamic_vid_vdd", true},
{TARGETING::ATTR_VCS_ID ,
- mss_volt_vcs_offset ,"mss_volt_vcs_offset", true},
- {TARGETING::ATTR_VMEM_ID,
- mss_volt_vddr_offset,"mss_volt_vddr_offset", false},
+ p9_mss_dynamic_vcs_avdd ,"p9_mss_dynamic_vcs_avdd", true},
+ {TARGETING::ATTR_VDDR_ID,
+ p9_mss_dynamic_vid_vddr,"p9_mss_dynamic_vid_vddr", false},
{TARGETING::ATTR_VPP_ID ,
- mss_volt_vpp_offset ,"mss_volt_vpp_offset", false}
+ p9_mss_dynamic_vid_vpp ,"p9_mss_dynamic_vid_vpp", false}
+*/
};
size_t recordIndex = 0;
@@ -159,33 +174,29 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
}
}
- if(recordIndex >= records)
- {
- assert(recordIndex < records,
- "Code bug! Called setMemoryVoltageDomainOffsetVoltage "
- "using unsupported voltage offset attribute type of 0x%08X.",
- VOLTAGE_DOMAIN_ID_ATTR);
- break;
- }
+ assert(recordIndex < records,
+ "Code bug! Called computeDynamicMemoryVoltage "
+ "using unsupported voltage offset attribute type of 0x%08X.",
+ VOLTAGE_DOMAIN_ID_ATTR);
- TARGETING::TargetHandleList membufTargetList;
+ TARGETING::TargetHandleList l_mcbistTargetList;
- // Must pull ALL present memory buffers (not just functional) for these
+ // Must pull ALL present mcbist (not just functional) for these
// computations
- getChipResources(membufTargetList, TYPE_MEMBUF,
- TARGETING::UTIL_FILTER_PRESENT);
+ getAllChiplets(l_mcbistTargetList, TARGETING::TYPE_MCBIST, false);
- std::sort(membufTargetList.begin(), membufTargetList.end(),
- _compareMembufWrtVoltageDomain< VOLTAGE_DOMAIN_ID_ATTR >);
+ // sort the mcbist targets based on domain id
+ std::sort(l_mcbistTargetList.begin(), l_mcbistTargetList.end(),
+ _compareMcbistWrtVoltageDomain< VOLTAGE_DOMAIN_ID_ATTR >);
- std::vector<fapi::Target> membufFapiTargetsList;
- typename AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type lastDomainId
+ std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCS>> l_mcsFapiTargetsList;
+ typename TARGETING::AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type lastDomainId
= 0;
- if(!membufTargetList.empty())
+ if(!l_mcbistTargetList.empty())
{
lastDomainId =
- (*membufTargetList.begin())->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
+ (*l_mcbistTargetList.begin())->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
}
// O(n) algorithm to execute HWPs on groups of memory buffers. As the
@@ -201,37 +212,39 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
// Prevent running the HWP on the first target. Var is used to push us
// through the loop after we exhausted all the targets
- bool last = membufTargetList.empty();
- for (TargetHandleList::const_iterator
- ppPresentMembuf = membufTargetList.begin();
- ((ppPresentMembuf != membufTargetList.end()) || (last == false));
- ++ppPresentMembuf)
+ bool last = l_mcbistTargetList.empty();
+ for (TARGETING::TargetHandleList::const_iterator
+ ppPresentMcbist = l_mcbistTargetList.begin();
+ ((ppPresentMcbist != l_mcbistTargetList.end()) || (last == false));
+ ++ppPresentMcbist)
{
// If no valid target to process, this is our last time through the loop
- last = (ppPresentMembuf == membufTargetList.end());
+ last = (ppPresentMcbist == l_mcbistTargetList.end());
- typename AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type
+ typename TARGETING::AttributeTraits< VOLTAGE_DOMAIN_ID_ATTR >::Type
currentDomainId = last ? lastDomainId :
- (*ppPresentMembuf)->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
+ (*ppPresentMcbist)->getAttr<VOLTAGE_DOMAIN_ID_ATTR>();
// Invoke the HWP if the domain ID in the sorted list change relative to
// prior entry or this is our final time through the loop (and there is
// a list entry to process)
- if( ( (currentDomainId != lastDomainId)
+ if( ( (currentDomainId != lastDomainId)
|| (last))
- && (!membufFapiTargetsList.empty()) )
+ && (!l_mcsFapiTargetsList.empty()) )
{
- // Skip HWP if this domain has all deconfigured membufs and the
+ // Skip HWP if this domain has all deconfigured mcs and the
// domain rule specifies not running the HWP for that case
bool invokeHwp = true;
if(fnMap[recordIndex].callIfAllNonFunc == false)
{
invokeHwp = false;
TARGETING::PredicateIsFunctional funcPred;
- std::vector<fapi::Target>::const_iterator pFapiTarget =
- membufFapiTargetsList.begin();
- for(;pFapiTarget != membufFapiTargetsList.end();++pFapiTarget)
+ std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCS>>::const_iterator
+ pFapiTarget = l_mcsFapiTargetsList.begin();
+
+ for(;pFapiTarget != l_mcsFapiTargetsList.end();++pFapiTarget)
{
+ // Is there a functional mcs target?
if(funcPred(
reinterpret_cast<const TARGETING::Target*>(
pFapiTarget->get())))
@@ -249,10 +262,12 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
fnMap[recordIndex].fnName,
VOLTAGE_DOMAIN_ID_ATTR, lastDomainId);
+ // HWP should set up ATTR_MSS_VOLT_<domain>_OFFSET_MILLIVOLTS
+ // for MCBIST targets associated with the mcs list
FAPI_INVOKE_HWP(
pError,
fnMap[recordIndex].fn,
- membufFapiTargetsList);
+ l_mcsFapiTargetsList);
if (pError)
{
@@ -271,33 +286,41 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"INFO not invoking %s on domain type 0x%08X, ID 0x%08X "
- "since domain has no functional memory buffers.",
+ "since domain has no functional mcbist.",
fnMap[recordIndex].fnName,
VOLTAGE_DOMAIN_ID_ATTR, lastDomainId);
}
- membufFapiTargetsList.clear();
+ l_mcsFapiTargetsList.clear();
lastDomainId = currentDomainId;
}
- // If not the last time through loop, there is a new target to
- // accumulate
+ // If not the last time through loop, there is a new target
+ // to accumulate
if(!last)
{
- const TARGETING::Target* pPresentMembuf = *ppPresentMembuf;
+ const TARGETING::Target* pPresentMcbist = *ppPresentMcbist;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"===== add to fapi::Target vector attr type=0x%08X, "
"id=0x%08X, target HUID=0x%08X",
VOLTAGE_DOMAIN_ID_ATTR,
- pPresentMembuf->getAttr<VOLTAGE_DOMAIN_ID_ATTR>(),
- TARGETING::get_huid(pPresentMembuf));
+ pPresentMcbist->getAttr<VOLTAGE_DOMAIN_ID_ATTR>(),
+ TARGETING::get_huid(pPresentMcbist));
+
+ fapi2::Target<fapi2::TARGET_TYPE_MCBIST> mcbistFapiTarget(
+ (const_cast<TARGETING::Target*>(pPresentMcbist)) );
- fapi::Target membufFapiTarget(fapi::TARGET_TYPE_MEMBUF_CHIP,
- (const_cast<TARGETING::Target*>(pPresentMembuf)) );
+ // Get the mcs targets under this current mcbist target
+ std::vector<fapi2::Target<fapi2::TARGET_TYPE_MCS>> l_childMCSs =
+ mcbistFapiTarget.getChildren<fapi2::TARGET_TYPE_MCS>(fapi2::TARGET_STATE_PRESENT);
- membufFapiTargetsList.push_back(membufFapiTarget);
+ // append this mcs target list to the overall mcs target list
+ // for that particular domain
+ l_mcsFapiTargetsList.insert( l_mcsFapiTargetsList.end(),
+ l_childMCSs.begin(),
+ l_childMCSs.end() );
}
// Otherwise need to bail, lest we increment the iterator again, which
// is undefined
@@ -312,12 +335,13 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
break;
}
- } while(0);
+ } while(0);
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "setMemoryVoltageDomainOffsetVoltage exit");
+ TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "computeDynamicMemoryVoltage exit");
- return pError;
+ return pError;
}
-*/
+
+
#endif
diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile
index 20adfc509..9fd69913a 100644
--- a/src/usr/isteps/makefile
+++ b/src/usr/isteps/makefile
@@ -46,6 +46,10 @@ OBJS += hwpistepud.o
OBJS += istepHelperFuncs.o
OBJS += pbusLinkSvc.o
+
EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
+EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
include ${ROOTPATH}/config.mk
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 3944a83e7..1306780d6 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -377,6 +377,7 @@
</enumerator>
<default>NO_MASTER</default>
</enumerationType>
+
<attribute>
<id>CLASS</id>
<description>Attribute indicating the target's class</description>
@@ -6624,10 +6625,28 @@ DEPRECATED!!!!
<readable/>
</attribute>
+<!-- TODO RTC:158505 - VMEM replaced with VDDR for consistency in P9 -->
<attribute>
<id>VMEM_ID</id>
<description>Voltage Memory Rail Manager ID. Currently HB only needs
- to configured the Vmem voltage rail manger during the IPL. The ID
+ to configured the Vmem voltage rail manager during the IPL. The ID
+ is an arbitary value and needed as correlation token between HB and
+ HWSV. It will be generated by the genHwsvMrwXml.pl.
+ </description>
+ <simpleType>
+ <uint16_t>
+ <default>0</default>
+ </uint16_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+</attribute>
+<!-- End of deprecated VMEM_ID -->
+
+<attribute>
+ <id>VDDR_ID</id>
+ <description>Voltage Memory Rail Manager ID. Currently HB only needs
+ to configured the Vddr voltage rail manager during the IPL. The ID
is an arbitary value and needed as correlation token between HB and
HWSV. It will be generated by the genHwsvMrwXml.pl.
</description>
@@ -7012,9 +7031,80 @@ DEPRECATED!!!!
</attribute>
<!-- ===== Attributes supporting memory_attributes.xml HWPF Attributes ===== -->
+<attribute>
+ <id>MSS_VDDR_PROGRAM</id>
+ <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
+ </description>
+ <simpleType>
+ <uint8_t><default>0</default></uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <hasStringConversion/>
+</attribute>
+<attribute>
+ <id>MSS_VPP_PROGRAM</id>
+ <description>VPP 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
+ </description>
+ <simpleType>
+ <uint8_t><default>0</default></uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <hasStringConversion/>
+</attribute>
+<attribute>
+ <id>MSS_VCS_PROGRAM</id>
+ <description>VCS 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
+ </description>
+ <simpleType>
+ <uint8_t><default>0</default></uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <hasStringConversion/>
+</attribute>
+<attribute>
+ <id>MSS_AVDD_PROGRAM</id>
+ <description>AVDD 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
+ </description>
+ <simpleType>
+ <uint8_t><default>0</default></uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <hasStringConversion/>
+</attribute>
+<attribute>
+ <id>MSS_VDD_PROGRAM</id>
+ <description>VDD 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
+ </description>
+ <simpleType>
+ <uint8_t><default>0</default></uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <hasStringConversion/>
+</attribute>
+<!-- TODO RTC:158505 - deprecated until hwsv updated -->
<attribute>
- <id>MSS_VOLT</id><!-- deprecated for MSS_VOLT_VDDR -->
+ <id>MSS_VOLT</id><!-- deprecated for MSS_VOLT_VDDR_MILLIVOLTS -->
<description>
DRAM Voltage, each voltage rail would need to have a value.
Computed in mss_volt C code - in millivolts
@@ -7030,9 +7120,10 @@ DEPRECATED!!!!
<readable/>
<writeable/>
</attribute>
+<!-- END OF DEPRECATED -->
<attribute>
- <id>MSS_VOLT_VDDR</id>
+ <id>MSS_VOLT_VDDR_MILLIVOLTS</id>
<description>
DRAM Voltage, each voltage rail would need to have a value.
Computed in mss_volt C code - in millivolts
@@ -7054,7 +7145,7 @@ DEPRECATED!!!!
</attribute>
<attribute>
- <id>MSS_VOLT_VPP</id> <!-- VPP_BASE -->
+ <id>MSS_VOLT_VPP_MILLIVOLTS</id> <!-- VPP_BASE -->
<description>
DRAM VPP Voltage, each voltage rail would need to have a value.
Computed in mss_volt C code - in millivolts. 0V - DDR3, 2.5V - DDR4
@@ -7076,6 +7167,200 @@ DEPRECATED!!!!
</attribute>
<attribute>
+ <id>MSS_VOLT_VCS_MILLIVOLTS</id>
+ <description>
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VCS</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_VDD_MILLIVOLTS</id>
+ <description>
+ DRAM Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VDD</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_AVDD_MILLIVOLTS</id>
+ <description>
+ DRAM Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_AVDD</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+
+<!-- Calculated dynamic voltages -->
+<attribute>
+ <id>MSS_VOLT_VDDR_OFFSET_MILLIVOLTS</id>
+ <description>
+ DRAM Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VDDR_OFFSET</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_VPP_OFFSET_MILLIVOLTS</id> <!-- VPP_BASE -->
+ <description>
+ DRAM VPP Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts. 0V - DDR3, 2.5V - DDR4
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VPP_OFFSET</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_VCS_OFFSET_MILLIVOLTS</id>
+ <description>
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VCS_OFFSET</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_VDD_OFFSET_MILLIVOLTS</id>
+ <description>
+ DRAM Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_VDD_OFFSET</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+
+<attribute>
+ <id>MSS_VOLT_AVDD_OFFSET_MILLIVOLTS</id>
+ <description>
+ DRAM Voltage, each voltage rail would need to have a value.
+ Computed in mss_volt C code - in millivolts
+ creator: mss_volt
+ consumer: mss_eff_cnfg, others
+ firmware notes: none
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+<!-- TODO RTC:157672
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_VOLT_AVDD_OFFSET</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+-->
+</attribute>
+<!-- end of Dynamic voltage -->
+
+
+<attribute>
<id>MSS_FREQ</id>
<description>
Frequency of this memory channel in MT/s (Mega Transfers per second),
@@ -16195,115 +16480,6 @@ DEPRECATED!!!!
</attribute>
<attribute>
- <id>MSS_CENT_AVDD_OFFSET_DISABLE</id>
- <description>
- Boolean indicating whether to disable configuring VDDR offset voltage
- for memory voltage domains.
- 0x00 = Enable VDDR offset voltage for memory voltage domains
- 0x01 = Disable VDDR offset voltage for memory voltage domains
- </description>
- <simpleType>
- <uint8_t>
- <default>1</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_MSS_AVDD_OFFSET_DISABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
-<attribute>
- <id>MSS_CENT_VDD_OFFSET_DISABLE</id>
- <description>
- Boolean indicating whether to disable configuring VDD offset voltage
- for memory voltage domains.
- 0x00 = Enable VDD offset voltage for memory voltage domains
- 0x01 = Disable VDD offset voltage for memory voltage domains
- </description>
- <simpleType>
- <uint8_t>
- <default>1</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_MSS_VDD_OFFSET_DISABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
-<attribute>
- <id>MSS_CENT_VCS_OFFSET_DISABLE</id>
- <description>
- Boolean indicating whether to disable configuring VCS offset voltage
- for memory voltage domains.
- 0x00 = Enable VCS offset voltage for memory voltage domains
- 0x01 = Disable VCS offset voltage for memory voltage domains
- </description>
- <simpleType>
- <uint8_t>
- <default>1</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_MSS_VCS_OFFSET_DISABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
-<attribute>
- <id>MSS_VOLT_VPP_OFFSET_DISABLE</id>
- <description>
- Boolean indicating whether to disable configuring VPP offset voltage
- for memory voltage domains.
- 0x00 = Enable VPP offset voltage for memory voltage domains
- 0x01 = Disable VPP offset voltage for memory voltage domains
- If disabled, Hostboot will send VPP_BASE in place of this to program the
- VPP voltage domain.
- </description>
- <simpleType>
- <uint8_t>
- <default>1</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_MSS_VPP_OFFSET_DISABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
-<attribute>
- <id>MSS_VOLT_VDDR_OFFSET_DISABLE</id>
- <description>
- Boolean indicating whether to disable configuring VDDR offset voltage
- for memory voltage domains.
- 0x00 = Enable VDDR offset voltage for memory voltage domains
- 0x01 = Disable VDDR offset voltage for memory voltage domains
- If disabled, Hostboot will send MSS_VOLT in place of this to program the
- VDDR voltage domain.
- </description>
- <simpleType>
- <uint8_t>
- <default>1</default>
- </uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_MSS_VDDR_OFFSET_DISABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
-<attribute>
<id>MSS_CENT_AVDD_SLOPE_ACTIVE</id>
<description>Units: uV/Membuf
</description>
@@ -28425,7 +28601,7 @@ DEPRECATED!!!!
</attribute>
<attribute>
- <id>PIBMEM_REPAIR0</id>
+ <id>PIBMEM_REPAIR0</id>
<description>
Pibmem repair attribute 0
</description>
@@ -28492,6 +28668,21 @@ DEPRECATED!!!!
</hwpfToHbAttrMap>
</attribute>
+<attribute>
+ <id>SUPPORTS_DYNAMIC_MEM_VOLT</id>
+ <description>
+ Do we support dynamically updating memory voltages?
+ 0 = no, 1 = yes
+ </description>
+ <simpleType>
+ <uint8_t>
+ <default>0</default>
+ </uint8_t>
+ </simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+</attribute>
+
<!--- TODO: RTC 155880
The attributes in this block have their names changed from ATTR_x to ATTR_x_MHZ.
The old definitions are left in this block in order to avoid build break in FSP.
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 5786c8e40..4c425dd3e 100755
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -394,13 +394,7 @@
<id>I2C_BUS_SPEED_ARRAY</id>
<default>400,0,0,0,0,0</default>
</attribute>
- <attribute><id>MSS_VOLT</id></attribute>
- <attribute><id>VPP_BASE</id></attribute>
- <attribute><id>MEM_VDDR_OFFSET_MILLIVOLTS</id></attribute>
- <attribute><id>MEM_AVDD_OFFSET_MILLIVOLTS</id></attribute>
- <attribute><id>MEM_VDD_OFFSET_MILLIVOLTS</id></attribute>
- <attribute><id>MEM_VCS_OFFSET_MILLIVOLTS</id></attribute>
- <attribute><id>MEM_VPP_OFFSET_MILLIVOLTS</id></attribute>
+
<attribute><id>MSS_FREQ</id></attribute>
<attribute><id>MSS_LAB_OVERRIDE_FOR_MEM_PLL</id></attribute>
<attribute><id>ECID</id></attribute>
@@ -420,11 +414,7 @@
<default>0</default>
</attribute>
<attribute><id>MSS_CACHE_ENABLE</id></attribute>
- <attribute><id>VMEM_ID</id></attribute>
- <attribute><id>AVDD_ID</id></attribute>
- <attribute><id>VDD_ID</id></attribute>
- <attribute><id>VCS_ID</id></attribute>
- <attribute><id>VPP_ID</id></attribute>
+
<attribute><id>EI_BUS_TX_LANE_INVERT</id></attribute>
<!-- Begin poreve_memory_attributes.xml -->
<attribute><id>SBE_SEEPROM_I2C_ADDRESS_BYTES</id></attribute>
@@ -786,6 +776,7 @@
<attribute><id>PIBMEM_REPAIR0</id></attribute>
<attribute><id>PIBMEM_REPAIR1</id></attribute>
<attribute><id>PIBMEM_REPAIR2</id></attribute>
+
<!-- proc_fbc_eff_config -->
<attribute><id>PROC_FABRIC_CORE_FLOOR_RATIO</id></attribute>
<attribute><id>PROC_FABRIC_CORE_CEILING_RATIO</id></attribute>
@@ -822,6 +813,15 @@
<attribute><id>FREQ_X</id></attribute>
<!-- End TODO -->
+
+<!-- Enable memory voltages -->
+ <attribute><id>SUPPORTS_DYNAMIC_MEM_VOLT</id></attribute>
+ <attribute><id>MSS_VDD_PROGRAM</id></attribute>
+ <attribute><id>MSS_AVDD_PROGRAM</id></attribute>
+ <attribute><id>MSS_VCS_PROGRAM</id></attribute>
+ <attribute><id>MSS_VPP_PROGRAM</id></attribute>
+ <attribute><id>MSS_VDDR_PROGRAM</id></attribute>
+
</targetType>
<!-- enc-node-power9 -->
@@ -1645,7 +1645,6 @@
<attribute><id>EFF_DRAM_TWTR_L</id></attribute>
<attribute><id>EFF_DRAM_TMAW</id></attribute>
<attribute><id>CDM_DOMAIN</id><default>MEM</default></attribute>
- <attribute><id>VMEM_ID</id></attribute>
<attribute><id>MEMVPD_POS</id></attribute>
<attribute><id>VPD_OVERRIDE_MT</id></attribute>
<attribute><id>VPD_OVERRIDE_MT_ENABLE</id></attribute>
@@ -1703,14 +1702,36 @@
<attribute><id>SCRATCH_UINT8_1</id><default>5</default></attribute>
<attribute><id>PARENT_PERVASIVE</id></attribute>
<attribute><id>MSS_FREQ</id></attribute>
- <attribute><id>MSS_VOLT</id></attribute>
- <attribute><id>MSS_VOLT_VDDR</id></attribute>
<attribute><id>MSS_FREQ_OVERRIDE</id></attribute>
<attribute><id>MSS_VOLT_OVERRIDE</id></attribute>
- <attribute><id>MSS_VOLT_VPP</id></attribute>
<attribute><id>MSS_FREQ_BIAS_PERCENTAGE</id></attribute>
<attribute><id>MSS_NEST_CAPABLE_FREQUENCIES</id></attribute>
<attribute><id>CDM_DOMAIN</id><default>MEM</default></attribute>
+
+ <attribute><id>MSS_VOLT</id></attribute><!-- deprecated -->
+
+<!-- Enable memory voltage attributes -->
+<!-- Static voltages -->
+ <attribute><id>MSS_VOLT_VPP_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VDDR_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VCS_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VDD_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_AVDD_MILLIVOLTS</id></attribute>
+
+<!-- Dynamic voltages -->
+ <attribute><id>MSS_VOLT_VPP_OFFSET_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VDDR_OFFSET_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VCS_OFFSET_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_VDD_OFFSET_MILLIVOLTS</id></attribute>
+ <attribute><id>MSS_VOLT_AVDD_OFFSET_MILLIVOLTS</id></attribute>
+
+<!-- Unique domain id -->
+ <attribute><id>VPP_ID</id></attribute>
+ <attribute><id>VDDR_ID</id></attribute>
+ <attribute><id>VCS_ID</id></attribute>
+ <attribute><id>VDD_ID</id></attribute>
+ <attribute><id>AVDD_ID</id></attribute>
+
</targetType>
<targetType>
OpenPOWER on IntegriCloud