summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2018-02-19 18:42:47 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-04-19 15:08:47 -0400
commitd81499bb6b6ed8614a88b2fab1ff1fb439771864 (patch)
tree332e90253f0dcf770141a4a570e9fbf8483c3826
parenta600e574610742073727851ab1d04de85e1b5429 (diff)
downloadtalos-hostboot-d81499bb6b6ed8614a88b2fab1ff1fb439771864.tar.gz
talos-hostboot-d81499bb6b6ed8614a88b2fab1ff1fb439771864.zip
Adding path to use alt-memory when proc0 does not have memory
When proc0 doesn't have memory, and we are on a phyp system, we don't need to swap our master proc and we can instead just swap memory. This commit adds in the functionality to look for working memory, and send both the group and chip ID down to HWSV. Change-Id: I664d5bfcd308a4ba2ee71e3e708533c6ec9a0a71 RTC:176434 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54403 CI-Ready: Elizabeth K. Liner <eliner@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> CI-Ready: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/include/usr/initservice/mboxRegs.H3
-rw-r--r--src/usr/isteps/istep07/call_mss_attr_update.C131
-rw-r--r--src/usr/isteps/istep07/makefile2
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl6
-rw-r--r--src/usr/targeting/common/xmltohb/hb_customized_attrs.xml5
5 files changed, 126 insertions, 21 deletions
diff --git a/src/include/usr/initservice/mboxRegs.H b/src/include/usr/initservice/mboxRegs.H
index 52cd45ea6..889f2126b 100644
--- a/src/include/usr/initservice/mboxRegs.H
+++ b/src/include/usr/initservice/mboxRegs.H
@@ -156,7 +156,8 @@ namespace SPLESS
uint32_t data32;
struct
{
- uint32_t reserved1 :23; //0:22
+ uint32_t procMemToUse :7; //0:6
+ uint32_t reserved1 :23; //7:22
uint32_t groupPumpMode :1; //23
uint32_t isSlave :1; //24
uint32_t reserved2 :1; //25
diff --git a/src/usr/isteps/istep07/call_mss_attr_update.C b/src/usr/isteps/istep07/call_mss_attr_update.C
index 3cd28a17f..f4eb9fb1d 100644
--- a/src/usr/isteps/istep07/call_mss_attr_update.C
+++ b/src/usr/isteps/istep07/call_mss_attr_update.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -119,6 +119,9 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
TargetHandleList l_procsList;
getAllChips(l_procsList, TYPE_PROC);
+ TARGETING::Target * l_sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(l_sys);
+
// Loop through all procs getting IDs
procIds_t l_procIds[l_procsList.size()];
uint8_t i = 0;
@@ -187,12 +190,14 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
TargetService::ALL,
&l_checkExprFunctional);
+ TARGETING::ATTR_PAYLOAD_KIND_type payload_kind =
+ l_sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>();
+
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"check_proc0_memory_config: %d functional dimms behind proc0 "
"%.8X",
l_dimms.size(), get_huid(l_procIds[l_proc0].proc) );
- // Check if proc0 does not have memory
if(l_dimms.empty())
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
@@ -227,6 +232,42 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
continue;
}
+ // If our master proc doesn't have memory, and we're on a phyp
+ // system, we want to use this proc's memory instead.
+#if 0
+ // TODO RTC: 181139. This support can not be put into place
+ // until we're able to use the Get Capabilities function
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "check_proc0_memory_config: Payload kind is %llx",
+ payload_kind);
+ if(payload_kind == TARGETING::PAYLOAD_KIND_PHYP)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "check_proc0_memory_config: We are in a PHYP system, "
+ "setting master to use alt memory from proc %llx.",
+ get_huid(l_procIds[i].proc));
+
+ uint8_t l_chipID = l_procIds[i].chipId;
+ uint8_t l_groupID = l_procIds[i].groupId;
+
+ TargetHandle_t l_masterProc = NULL;
+ targetService().masterProcChipTargetHandle(l_masterProc);
+
+ uint8_t l_proc_memory = l_masterProc->getAttr<
+ TARGETING::ATTR_PROC_MEM_TO_USE>();
+
+ if( l_proc_memory != ((l_groupID <<3) | l_chipID))
+ {
+ l_masterProc->setAttr<TARGETING::ATTR_PROC_MEM_TO_USE>(
+ ((l_groupID << 3) | l_chipID));
+
+ l_updateNeeded = true;
+ // Leave loop after switching memory
+ break;
+ }
+ }else
+ {
+#endif
// Use this proc for swapping memory with proc0
l_victim = i;
@@ -252,16 +293,68 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
// Leave loop after swapping memory
break;
+#if 0
+ }
+#endif
+ }
+
+ if(payload_kind != TARGETING::PAYLOAD_KIND_PHYP)
+ {
+ // Check that a victim was found
+ assert( l_victim < l_procsList.size(), "No swap match found" );
}
+ }
+#if 0
+ // TODO RTC: 181139. This support can not be put into place
+ // until we're able to use the Get Capabilities function
+ else if( !(l_dimms.empty()) &&
+ (payload_kind == TARGETING::PAYLOAD_KIND_PHYP) )
+ {
+ // If the memory isn't empty, and we're on a phyp system,
+ // we want to verify that we're set up to use the correct memory
+ uint8_t l_chipID = l_procIds[i].chipId;
+ uint8_t l_groupID = l_procIds[i].groupId;
+
+ TargetHandle_t l_masterProc = NULL;
+ targetService().masterProcChipTargetHandle(l_masterProc);
+
+ uint8_t l_proc_memory =
+ l_masterProc->getAttr<TARGETING::ATTR_PROC_MEM_TO_USE>();
- // Check that a victim was found
- assert( l_victim < l_procsList.size(), "No swap match found" );
+ if( l_proc_memory != ((l_groupID <<3) | l_chipID))
+ {
+ l_masterProc->setAttr<TARGETING::ATTR_PROC_MEM_TO_USE>(
+ ((l_groupID << 3) | l_chipID));
+
+ l_updateNeeded = true;
+ }
}
+#endif
- // Loop through all procs detecting that IDs are set correctly
- for (i = 0; i < l_procsList.size(); i++)
+ if(payload_kind != TARGETING::PAYLOAD_KIND_PHYP)
{
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+#if 0
+ // TODO RTC: 181139. This support can not be put into place
+ // until we're able to use the Get Capabilities function
+ TargetHandle_t l_masterProc = NULL;
+ targetService().masterProcChipTargetHandle(l_masterProc);
+
+ // Check the attribute, and default it to proc0 if
+ // it doesn't match.
+ uint8_t l_proc_memory =
+ l_masterProc->getAttr<TARGETING::ATTR_PROC_MEM_TO_USE>();
+
+ if( l_proc_memory != 0)
+ {
+ l_masterProc->setAttr<TARGETING::ATTR_PROC_MEM_TO_USE>(0);
+
+ l_updateNeeded = true;
+ }
+#endif
+ // Loop through all procs detecting that IDs are set correctly
+ for (i = 0; i < l_procsList.size(); i++)
+ {
+ TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"check_proc0_memory_config: Compare settings for "
"Proc %.8X\n"
" groupIdEff = %d, groupId = %d\n"
@@ -272,19 +365,19 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
l_procIds[i].chipIdEff,
l_procIds[i].chipId);
- if((l_procIds[i].groupId != l_procIds[i].groupIdEff) ||
- (l_procIds[i].chipId != l_procIds[i].chipIdEff) )
- {
- // Update attributes
- (l_procIds[i].proc)->
- setAttr<ATTR_PROC_EFF_FABRIC_GROUP_ID>(l_procIds[i].groupId);
- (l_procIds[i].proc)->
- setAttr<ATTR_PROC_EFF_FABRIC_CHIP_ID>(l_procIds[i].chipId);
+ if((l_procIds[i].groupId != l_procIds[i].groupIdEff) ||
+ (l_procIds[i].chipId != l_procIds[i].chipIdEff) )
+ {
+ // Update attributes
+ (l_procIds[i].proc)->
+ setAttr<ATTR_PROC_EFF_FABRIC_GROUP_ID>(l_procIds[i].groupId);
+ (l_procIds[i].proc)->
+ setAttr<ATTR_PROC_EFF_FABRIC_CHIP_ID>(l_procIds[i].chipId);
- l_updateNeeded = true;
- }
+ l_updateNeeded = true;
+ }
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"check_proc0_memory_config: Current attribute "
"settings for Proc %.8X\n"
" ATTR_PROC_EFF_FABRIC_GROUP_ID = %d\n"
@@ -298,6 +391,8 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr)
(l_procIds[i].proc)->
getAttr<ATTR_PROC_EFF_FABRIC_CHIP_ID>(),
(l_procIds[i].proc)->getAttr<ATTR_FABRIC_CHIP_ID>());
+ }
+
}
if(l_updateNeeded)
diff --git a/src/usr/isteps/istep07/makefile b/src/usr/isteps/istep07/makefile
index b4b6c1eee..f9cc94058 100644
--- a/src/usr/isteps/istep07/makefile
+++ b/src/usr/isteps/istep07/makefile
@@ -56,12 +56,14 @@ EXTRAINCDIR += ${HWP_PATH_1}/lib/freq/
EXTRAINCDIR += ${HWP_PATH_1}/lib/utils/
EXTRAINCDIR += ${HWP_PATH_1}/lib/eff_config/
EXTRAINCDIR += $(PROCEDURES_PATH)/hwp/nest
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/perv/
EXTRAINCDIR += ${HWP_PATH_2}/lib/
EXTRAINCDIR += ${HWP_PATH_2}/lib/shared/
EXTRAINCDIR += ${HWP_PATH_2}/lib/utils/
VPATH += ${HWP_PATH} ${HWP_PATH_1}/lib/spd
VPATH += $(PROCEDURES_PATH)/hwp/nest ${ROOTPATH}/src/usr/fapi2
+VPATH += ${PROCEDURES_PATH}/hwp/perv
VPATH += ${HWP_PATH_1}/lib ${HWP_PATH_1}/lib/utils ${HWP_PATH_1}/lib/eff_config
VPATH += ${HWP_PATH_1}/lib/freq ${HWP_PATH_1}/lib/dimm
VPATH += ${ROOTPATH}/src/usr/sbe
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
index d8c9b63dd..ac5ec311a 100755
--- a/src/usr/targeting/common/processMrw.pl
+++ b/src/usr/targeting/common/processMrw.pl
@@ -296,6 +296,7 @@ foreach my $target (@targets)
{
$targetObj->setAttribute($target,"PROC_FABRIC_PUMP_MODE","CHIP_IS_GROUP");
}
+
}
elsif ($type eq "PROC")
{
@@ -1087,9 +1088,12 @@ sub processProcessor
$targetObj->getAttribute($target,
"FABRIC_CHIP_ID"));
-
processMembufVpdAssociation($targetObj,$target);
setupBars($targetObj,$target);
+
+ $targetObj->setAttribute($target,
+ "PROC_MEM_TO_USE", ( $targetObj->getAttribute($target,
+ "FABRIC_GROUP_ID") << 3));
}
diff --git a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
index d967fcfa3..44e0c7d89 100644
--- a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
+++ b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml
@@ -700,11 +700,14 @@
<id>ATTR_SKIP_WAKEUP</id>
<persistency>volatile-zeroed</persistency>
</attribute>
-
<attribute>
<id>ATTR_EI_BUS_TX_MSBSWAP</id>
<global/>
</attribute>
+ <attribute>
+ <id>ATTR_PROC_MEM_TO_USE</id>
+ <writeable/>
+ </attribute>
<!-- =====================================================================
End of customizations definitions
================================================================= -->
OpenPOWER on IntegriCloud