Skip to content

Commit

Permalink
Base HWP mirroring control on HB policy
Browse files Browse the repository at this point in the history
  PHYP can't support mixed mirroring/non mirroed memory, so
  MRW mirroring needs to be on/off.  HB already has this info
  in a TARGETING ATTR (but not FAPI) and they don't match meaning
  one for one.   Thus make ATTR writable and replicate FW setting
  to HWP setting

Change-Id: I899272d338947f4c41f93c1ece88028053ce9d5f
CQ:SW438826
CQ:SW459005
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64580
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: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sannerd authored and dcrowell77 committed Mar 7, 2019
1 parent 9055269 commit 73fc80f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/usr/isteps/istep07/host_mss_attr_cleanup.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -80,6 +80,25 @@ void* host_mss_attr_cleanup( void *io_pArgs )
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_mss_attr_cleanup entry");
// errlHndl_t l_err = NULL;

// Replicate HB memory mirroring policy into HWP policy
// Default to non mirror (so if tryGet fails just keep going)
Target* l_pTopLevel = NULL;
TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
TARGETING::ATTR_PAYLOAD_IN_MIRROR_MEM_type l_mirror = 0x0;
l_pTopLevel->tryGetAttr<TARGETING::ATTR_PAYLOAD_IN_MIRROR_MEM>
(l_mirror);

if(l_mirror)
{
l_pTopLevel->setAttr<TARGETING::ATTR_MRW_HW_MIRRORING_ENABLE>
(fapi2::ENUM_ATTR_MRW_HW_MIRRORING_ENABLE_TRUE);
}
else
{
l_pTopLevel->setAttr<TARGETING::ATTR_MRW_HW_MIRRORING_ENABLE>
(fapi2::ENUM_ATTR_MRW_HW_MIRRORING_ENABLE_FALSE);
}

TargetHandleList l_funcDimmList;
// Get all the functional Dimms
TARGETING::getAllLogicalCards(l_funcDimmList, TYPE_DIMM, true);
Expand Down
5 changes: 5 additions & 0 deletions src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,11 @@
<id>ATTR_EI_BUS_TX_MSBSWAP</id>
<global/>
</attribute>
<attribute>
<id>ATTR_MRW_HW_MIRRORING_ENABLE</id>
<writeable/>
<no_export/>
</attribute>
<attribute>
<id>ATTR_PROC_MEM_TO_USE</id>
<writeable/>
Expand Down

0 comments on commit 73fc80f

Please sign in to comment.