Skip to content

Commit

Permalink
Use ATTR_MAX_COMPUTE_NODES_PER_SYSTEM instead of hardcoding
Browse files Browse the repository at this point in the history
hwsvd crash observed during handling hbrt message to get
tod topology data because allocated size was based on a
hardcoded value for max_compute_nodes_per_system

Change-Id: I587dac32fab9dd67fe96e213c5ef72626e4e2ea1
CQ:SW434860
CMVC-Coreq: 1059506
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64459
Reviewed-by: Roland Veloz <rveloz@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>
Reviewed-by: Prachi Gupta <pragupta@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 Aug 18, 2018
1 parent b2ff2dd commit 14340c1
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 11 deletions.
12 changes: 3 additions & 9 deletions src/usr/isteps/tod/TodUtils.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 @@ -161,14 +161,8 @@ errlHndl_t getMaxConfigParams(
o_maxConfigParams.max_mcs_per_sys = l_pTopLevel->getAttr
< TARGETING::ATTR_MAX_MCS_PER_SYSTEM > ();

// TODO RTC 181481: attribute ATTR_MAX_COMPUTE_NODES_PER_SYSTEM is
// currently not implemented as needed to do this assignment. I was
// assured (10/2017) that HB only supports one node, so I am defaulting
// this to 1. In the future HB will need to be multi-node aware and
// TARGETING::ATTR_MAX_COMPUTE_NODES_PER_SYSTEM implemented.
o_maxConfigParams.max_compute_nodes_per_sys = 1;
// o_maxConfigParams.max_compute_nodes_per_sys = l_pTopLevel->getAttr
// < TARGETING::ATTR_MAX_COMPUTE_NODES_PER_SYSTEM > ();
o_maxConfigParams.max_compute_nodes_per_sys = l_pTopLevel->getAttr
< TARGETING::ATTR_MAX_COMPUTE_NODES_PER_SYSTEM > ();

} while(0);

Expand Down
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 @@ -8081,4 +8081,19 @@ Selects which voltage level to place the Core and ECO domain PFETs upon Winkle e
<no_export/>
</attribute>

<attribute>
<id>MAX_COMPUTE_NODES_PER_SYSTEM</id>
<description>
The max compute nodes available in the system.
Computed value based on CEC enclosures.
</description>
<simpleType>
<uint8_t>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
<no_export/>
</attribute>

</attributes>
6 changes: 5 additions & 1 deletion src/usr/targeting/common/xmltohb/simics_CUMULUS.system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,13 @@
<id>X_EREPAIR_THRESHOLD_MNFG</id>
<default>0</default>
</attribute>

<attribute>
<id>MAX_COMPUTE_NODES_PER_SYSTEM</id>
<default>4</default>
</attribute>

</targetInstance>

<targetInstance>
<id>sys0node0</id>
<type>enc-node-power9</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,13 @@
<id>X_EREPAIR_THRESHOLD_MNFG</id>
<default>0</default>
</attribute>

<attribute>
<id>MAX_COMPUTE_NODES_PER_SYSTEM</id>
<default>4</default>
</attribute>

</targetInstance>

<targetInstance>
<id>sys0node0</id>
<type>enc-node-power9</type>
Expand Down
5 changes: 5 additions & 0 deletions src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
<id>MSS_INTERLEAVE_ENABLE</id>
<default>0xAF</default>
</attribute>
<attribute>
<id>MAX_COMPUTE_NODES_PER_SYSTEM</id>
<default>1</default>
</attribute>

</targetInstance>

<!-- System node 0 -->
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 @@ -1033,6 +1033,9 @@
<attribute>
<id>BOOT_FREQ_MHZ</id>
</attribute>
<attribute>
<id>MAX_COMPUTE_NODES_PER_SYSTEM</id>
</attribute>
</targetType>

<targetType>
Expand Down

0 comments on commit 14340c1

Please sign in to comment.