summaryrefslogtreecommitdiffstats
path: root/src/usr/sbe/sbe_update.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/sbe/sbe_update.C')
-rw-r--r--src/usr/sbe/sbe_update.C127
1 files changed, 66 insertions, 61 deletions
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C
index ef222e04d..ccbbe2480 100644
--- a/src/usr/sbe/sbe_update.C
+++ b/src/usr/sbe/sbe_update.C
@@ -52,7 +52,6 @@
#include <hwas/common/hwas.H>
#include <initservice/initserviceif.H>
#include <console/consoleif.H>
-#include <config.h>
#include <sbe/sbeif.H>
#include <sbeio/sbeioif.H>
#include <sbe/sbereasoncodes.H>
@@ -1204,74 +1203,80 @@ namespace SBE
procIOMask ); // Bits(8:31) = EC00:EC23
// Check for no error and use of input cores
- if ( (NULL == err) && (procIOMask == coreMask))
+ if (nullptr == err)
{
- // Procedure was successful
- procedure_success = true;
-
- o_actImgSize = static_cast<size_t>(tmpImgSize);
-
- TRACUCOMP( g_trac_sbe, "procCustomizeSbeImg(): "
- "p9_xip_customize success=%d, procIOMask=0x%X "
- "o_actImgSize=0x%X",
- procedure_success, procIOMask, o_actImgSize);
-
- // exit inner loop
- break;
- }
- // Check if p9_xip_customize returned a different core mask
- else if ( procIOMask != coreMask )
- {
- // A different core mask is returned from p9_xip_customize
- // when the cores sent in couldn't fit, but possibly
- // a different procIOMask would work
+ // FAPI_INVOKE_HWP returned with no error, check input cores
+ if (procIOMask == coreMask)
+ {
+ // Procedure was successful
+ procedure_success = true;
- TRACFCOMP( g_trac_sbe,
- ERR_MRK"procCustomizeSbeImg(): FAPI_INVOKE_HWP("
- "p9_xip_customize) returned rc=0x%X, "
- "XIPC_IMAGE_WOULD_OVERFLOW-Retry "
- "MaxCores=0x%.8X. HUID=0x%X. coreMask=0x%.8X, "
- "procIOMask=0x%.8X. coreCount=%d",
- ERRL_GETRC_SAFE(err), maxCores,
- TARGETING::get_huid(i_target),
- coreMask, procIOMask, coreCount);
+ o_actImgSize = static_cast<size_t>(tmpImgSize);
- // Setup for next loop - update coreMask
- err = selectBestCores(i_target,
- --coreCount,
- coreMask);
+ TRACUCOMP( g_trac_sbe, "procCustomizeSbeImg(): "
+ "p9_xip_customize success=%d, procIOMask=0x%X "
+ "o_actImgSize=0x%X",
+ procedure_success, procIOMask, o_actImgSize);
- 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 inner while loop
+ // exit inner loop
break;
- }
+ } // end if (procIOMask == coreMask)
+ // p9_xip_customize returned a different core mask:
+ // procIOMask != coreMask
+ else
+ {
+ // A different core mask is returned from
+ // p9_xip_customize, when the cores sent in couldn't
+ // fit, but possibly a different procIOMask would work
- TRACFCOMP( g_trac_sbe, "procCustomizeSbeImg(): for "
- "next loop: coreMask=0x%.8X, coreCount=%d",
- coreMask, coreCount);
+ TRACFCOMP( g_trac_sbe,
+ ERR_MRK"procCustomizeSbeImg(): FAPI_INVOKE_HWP("
+ "p9_xip_customize) returned rc=0x%X, "
+ "XIPC_IMAGE_WOULD_OVERFLOW-Retry "
+ "MaxCores=0x%.8X. HUID=0x%X. coreMask=0x%.8X, "
+ "procIOMask=0x%.8X. coreCount=%d",
+ ERRL_GETRC_SAFE(err), maxCores,
+ TARGETING::get_huid(i_target),
+ coreMask, procIOMask, coreCount);
+
+ // Setup for next loop - update coreMask
+ err = selectBestCores(i_target,
+ --coreCount,
+ coreMask);
+
+ 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 inner while loop
+ break;
+ }
- // Check if loop will execute again
- // Clean up some data if it will
- if( coreCount >= min_cores )
- {
- // Reset size and clear image buffer
- tmpImgSize = static_cast<uint32_t>(i_maxImgSize);
- memset ( io_imgPtr,
- 0,
- tmpImgSize);
- }
+ TRACFCOMP( g_trac_sbe, "procCustomizeSbeImg(): for "
+ "next loop: coreMask=0x%.8X, coreCount=%d",
+ coreMask, coreCount);
+
+ // Check if loop will execute again
+ // Clean up some data if it will
+ if( coreCount >= min_cores )
+ {
+ // Reset size and clear image buffer
+ tmpImgSize = static_cast<uint32_t>(i_maxImgSize);
+ memset ( io_imgPtr,
+ 0,
+ tmpImgSize);
+ }
+ } // end if (procIOMask == coreMask) ... else ...
// No break - keep looping
- }
+
+ } // end if (nullptr == err)
else
{
// Unexpected return code - create err and fail
@@ -1292,7 +1297,7 @@ namespace SBE
// break from inner while loop
break;
- }
+ } // end if (nullptr == err) ... else ...
} // end of inner while loop
if(err)
OpenPOWER on IntegriCloud