summaryrefslogtreecommitdiffstats
path: root/src/usr/sbe/sbe_update.C
diff options
context:
space:
mode:
authorMike Baiocchi <baiocchi@us.ibm.com>2014-03-24 15:23:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-04-03 07:44:46 -0500
commit8cfc83f1024fcc3597f353b622d6276138b1d378 (patch)
treeec353efa477f0a8847dbfc86b4a628689905c7d1 /src/usr/sbe/sbe_update.C
parentdcb83156a08caae51f3a6a35e0d2cacc1cf659f1 (diff)
downloadtalos-hostboot-8cfc83f1024fcc3597f353b622d6276138b1d378.tar.gz
talos-hostboot-8cfc83f1024fcc3597f353b622d6276138b1d378.zip
Improve Core Selection in SBE Update code
This code improves how cores are selected in the case that the p8_xip_customize() procedure can't fit certain cores into the custom SBE image. The fix ensures that 'good' cores are always used when possible. Change-Id: Idf606dca9316879f5aae4c728b582de628a54667 RTC: 98673 Backport: release-fips810 CQ: SW253657 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9842 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/sbe/sbe_update.C')
-rw-r--r--src/usr/sbe/sbe_update.C41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C
index 84bd69b7d..4ec16a3eb 100644
--- a/src/usr/sbe/sbe_update.C
+++ b/src/usr/sbe/sbe_update.C
@@ -713,7 +713,6 @@ namespace SBE
else
{
// Look for a specific return code
-
if ( static_cast<uint32_t>(rc_fapi) ==
fapi::RC_PROC_XIPC_OVERFLOW_BEFORE_REACHING_MINIMUM_EXS
)
@@ -732,9 +731,24 @@ namespace SBE
TARGETING::get_huid(i_target),
coreMask, procIOMask, coreCount);
- // Setup for next loop - trim original core mask
- procIOMask = trimBitMask(coreMask,
- --coreCount);
+ // Setup for next loop - update coreMask
+ err = selectBestCores(i_target,
+ --coreCount,
+ procIOMask);
+
+ if ( err )
+ {
+ TRACFCOMP(g_trac_sbe,
+ ERR_MRK"procCustomizeSbeImg() - "
+ "selectBestCores() failed rc=0x%X. "
+ "coreCount=0x%.8X. HUID=0x%X. Aborting "
+ "Customization of SBE Image",
+ err->reasonCode(), coreCount,
+ TARGETING::get_huid(i_target));
+
+ // break from while loop
+ break;
+ }
TRACFCOMP( g_trac_sbe, "procCustomizeSbeImg(): for "
"next loop: procIOMask=0x%.8X, coreMask="
@@ -879,11 +893,6 @@ namespace SBE
{
o_exMask |= (0x00008000 >> chipUnit);
exCount++;
-
- if(exCount >= i_maxExs)
- {
- break;
- }
}
else
{
@@ -915,13 +924,23 @@ namespace SBE
}
} // end ex target loop
- if(exCount >= i_maxExs)
+ if(exCount == i_maxExs)
{
- //We've found enough, break out of function
+ //We've found the exact amount, break out of function
break;
}
+
+ else if(exCount > i_maxExs)
+ {
+ //We have too many, so need to trim
+ o_exMask = trimBitMask(o_exMask,
+ i_maxExs);
+ break;
+ }
+
else
{
+ // We need to add 'other' cores
TRACUCOMP( g_trac_sbe,INFO_MRK"selectBestCores: non-functional "
"cores needed for bit mask: exCount=%d, i_maxExs=%d,"
" o_exMask=0x%.8X, manGuardExs=0x%.8X, "
OpenPOWER on IntegriCloud