diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2017-03-27 16:38:08 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-21 23:28:33 -0400 |
commit | 96b6f392d2a590938540216fd50b1b350a3b5730 (patch) | |
tree | a3e4824897c84232fda78a9d88a0f2625b5d2248 /src | |
parent | 335bd0a9a6d45518f340396e4996aba282af3118 (diff) | |
download | talos-hostboot-96b6f392d2a590938540216fd50b1b350a3b5730.tar.gz talos-hostboot-96b6f392d2a590938540216fd50b1b350a3b5730.zip |
Terminate IPL if no memory configured behind master proc
Firmware doesn't currently support booting in a configuration
where there is no functional memory behind the master processor
(proc0). Added an explicit check to the 'minimum hardware'
logic to account for this to avoid confusing CRESP errors when
this scenario shows up.
Change-Id: Ia9c1e1d1cb135efb58a52edfccffe66174f57a2c
CQ: SW384402
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39048
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: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/hwas/common/hwas_reasoncodes.H | 3 | ||||
-rw-r--r-- | src/include/usr/isteps/hwpf_reasoncodes.H | 8 | ||||
-rw-r--r-- | src/include/usr/isteps/istep_reasoncodes.H | 1 | ||||
-rw-r--r-- | src/usr/hwas/common/hwas.C | 60 | ||||
-rw-r--r-- | src/usr/isteps/istep14/call_proc_exit_cache_contained.C | 78 |
5 files changed, 121 insertions, 29 deletions
diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H index cceede164..667ac6c3f 100644 --- a/src/include/usr/hwas/common/hwas_reasoncodes.H +++ b/src/include/usr/hwas/common/hwas_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -54,6 +54,7 @@ namespace HWAS RC_RESOURCE_RECOVERED = HWAS_COMP_ID | 0x0A, RC_SYSAVAIL_MISSING_CRITICAL_RESOURCE = HWAS_COMP_ID | 0x0B, RC_SYSAVAIL_NO_MCAS_FUNC = HWAS_COMP_ID | 0x0C, + RC_SYSAVAIL_NO_MEMORY_FUNC_MASTER = HWAS_COMP_ID | 0x0D, }; }; diff --git a/src/include/usr/isteps/hwpf_reasoncodes.H b/src/include/usr/isteps/hwpf_reasoncodes.H index 23bf0501e..83a5fa18b 100644 --- a/src/include/usr/isteps/hwpf_reasoncodes.H +++ b/src/include/usr/isteps/hwpf_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2016 */ +/* Contributors Listed Below - COPYRIGHT 2013,2017 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -55,7 +55,7 @@ namespace fapi MOD_ATTR_GET_TARGETING_TARGET = 0x0D, MOD_ATTR_GET_TARGET_NAME = 0x0E, MOD_MVPD_ACCESS = 0x0F, - MOD_EXIT_CACHE_CONTAINED = 0x10, + // empty MOD_GET_CACHE_DECONFIG = 0x11, MOD_FAPI_GET_OTHER_SIDE_OF_MEM_CHANNEL = 0x12, MOD_MBVPD_ACCESS = 0x13, @@ -115,7 +115,7 @@ namespace fapi RC_UNEXPECTED_TARGET_TYPE = HWPF_COMP_ID | 0x1C, RC_INVALID_RECORD = HWPF_COMP_ID | 0x1D, RC_INVALID_KEYWORD = HWPF_COMP_ID | 0x1E, - RC_MM_EXTEND_FAILED = HWPF_COMP_ID | 0x1F, + // empty RC_INCORRECT_KEWORD_SIZE = HWPF_COMP_ID | 0x20, RC_NO_SINGLE_MCS = HWPF_COMP_ID | 0x21, RC_NO_SINGLE_MEMBUFF = HWPF_COMP_ID | 0x22, @@ -130,7 +130,7 @@ namespace fapi RC_HOST_TIMER_THREAD_FAIL = HWPF_COMP_ID | 0x2B, RC_NULL_POINTER = HWPF_COMP_ID | 0x2C, RC_RT_WAKEUP_FAILED = HWPF_COMP_ID | 0x2D, - RC_NO_MIRRORED_MEMORY = HWPF_COMP_ID | 0x2E, + // empty RC_VDDR_INVALID_VOLTAGE = HWPF_COMP_ID | 0x2F, RC_TIMEOUT_EN_VDDR = HWPF_COMP_ID | 0x30, RC_TARGET_UNSUPPORTED = HWPF_COMP_ID | 0x31, diff --git a/src/include/usr/isteps/istep_reasoncodes.H b/src/include/usr/isteps/istep_reasoncodes.H index 254793a85..a3e019c3a 100644 --- a/src/include/usr/isteps/istep_reasoncodes.H +++ b/src/include/usr/isteps/istep_reasoncodes.H @@ -92,6 +92,7 @@ namespace ISTEP RC_NOMINAL_FREQ_MISMATCH = ISTEP_COMP_ID | 0x1B, RC_PM_OCC_CHKPT_TIMEOUT = ISTEP_COMP_ID | 0x1C, RC_UPDATE_SECURITY_CTRL_HWP_FAIL = ISTEP_COMP_ID | 0x1D, + RC_NO_FUNCTIONAL_MEMORY = ISTEP_COMP_ID | 0x1E, }; }; diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index 8e6931ef7..04c47356e 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -1669,6 +1669,66 @@ errlHndl_t checkMinimumHardware(const TARGETING::ConstTargetHandle_t i_nodeOrSys // errl is now NULL } // if no dimms + //@fixme-RTC:149250-Remove when we have XOR Mask Support + // check here for functional dimms behind the master proc + targetService().getAssociated(l_dimms, l_pMasterProc, + TargetService::CHILD_BY_AFFINITY, TargetService::ALL, + &l_checkExprFunctional); + HWAS_DBG( "checkMinimumHardware: %d functional dimms behind master proc %.8X", + l_dimms.size(), get_huid(l_pMasterProc) ); + + if (l_dimms.empty()) + { + HWAS_ERR( "Insufficient hardware to continue IPL (func DIMM behind master proc)"); + + if(o_bootable) + { + *o_bootable = false; + break; + } + // determine some numbers to help figure out what's up.. + TargetHandleList l_plist; + PredicatePostfixExpr l_checkExprPresent; + l_checkExprPresent.push(&l_dimm).push(&l_present).And(); + targetService().getAssociated(l_plist, l_pMasterProc, + TargetService::CHILD_BY_AFFINITY, TargetService::ALL, + &l_checkExprPresent); + uint32_t dimms_present = l_plist.size(); + + /*@ + * @errortype + * @severity ERRL_SEV_UNRECOVERABLE + * @moduleid MOD_CHECK_MIN_HW + * @reasoncode RC_SYSAVAIL_NO_MEMORY_FUNC_MASTER + * @devdesc checkMinimumHardware found no + * functional dimms behind proc0 + * @custdesc A problem occurred during the IPL of the + * system: Found no functional dimm cards. + * @userdata1[00:31] HUID of master proc + * @userdata2[00:31] number of present, non-functional dimms + */ + const uint64_t userdata1 = + (static_cast<uint64_t>(get_huid(l_pMasterProc)) << 32); + const uint64_t userdata2 = + (static_cast<uint64_t>(dimms_present) << 32); + l_errl = hwasError(ERRL_SEV_UNRECOVERABLE, + MOD_CHECK_MIN_HW, + RC_SYSAVAIL_NO_MEMORY_FUNC, + userdata1, userdata2); + + // call out the procedure to find the deconfigured part. + hwasErrorAddProcedureCallout( l_errl, + EPUB_PRC_FIND_DECONFIGURED_PART, + SRCI_PRIORITY_HIGH ); + + // if we already have an error, link this one to the earlier; + // if not, set the common plid + hwasErrorUpdatePlid( l_errl, l_commonPlid ); + errlCommit(l_errl, HWAS_COMP_ID); + // errl is now NULL + } // if no dimms + //END section to remove + // There needs to be either functional MCS/MCAs (NIMBUS) or MCS/MBAs // (CUMULUS). Check for MCAs first. PredicateCTM l_mca(CLASS_UNIT, TYPE_MCA); diff --git a/src/usr/isteps/istep14/call_proc_exit_cache_contained.C b/src/usr/isteps/istep14/call_proc_exit_cache_contained.C index e44c0732e..827dfc0d3 100644 --- a/src/usr/isteps/istep14/call_proc_exit_cache_contained.C +++ b/src/usr/isteps/istep14/call_proc_exit_cache_contained.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -179,8 +179,8 @@ void* call_proc_exit_cache_contained (void *io_pArgs) /*@ * @errortype ERRL_SEV_CRITICAL_SYS_TERM - * @moduleid fapi::MOD_EXIT_CACHE_CONTAINED, - * @reasoncode fapi::RC_NO_MIRRORED_MEMORY, + * @moduleid ISTEP::MOD_EXIT_CACHE_CONTAINED + * @reasoncode ISTEP::RC_NO_MIRRORED_MEMORY * @userdata1 Mirrored Memory Address * @userdata2 0 * @@ -191,8 +191,8 @@ void* call_proc_exit_cache_contained (void *io_pArgs) l_errl = new ERRORLOG::ErrlEntry ( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, - fapi::MOD_EXIT_CACHE_CONTAINED, - fapi::RC_NO_MIRRORED_MEMORY, + ISTEP::MOD_EXIT_CACHE_CONTAINED, + ISTEP::RC_NO_MIRRORED_MEMORY, l_mirrorBaseAddr, 0, true); // callout firmware @@ -219,26 +219,56 @@ void* call_proc_exit_cache_contained (void *io_pArgs) l_sys->setAttr<ATTR_PAYLOAD_BASE>(payloadBase); } - for (const auto & l_procChip: l_procList) + // Make sure we actually have memory before we try to use it + uint64_t l_bottom = get_bottom_mem_addr(); + uint64_t l_top = get_top_mem_addr(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Memory range : %.llX-%.llX", l_bottom, l_top ); + if( (l_top == 0) || (l_top == l_bottom) ) { - const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> - l_fapi_cpu_target(l_procChip); - // call p9_proc_exit_cache_contained.C HWP - FAPI_INVOKE_HWP( l_errl, - p9_exit_cache_contained, - l_procChip); - - if(l_errl) + /*@ + * @errortype ERRL_SEV_CRITICAL_SYS_TERM + * @moduleid ISTEP::MOD_EXIT_CACHE_CONTAINED + * @reasoncode ISTEP::RC_NO_FUNCTIONAL_MEMORY + * @userdata1 Bottom of memory + * @userdata2 Top of memory + * + * @devdesc There is no functional memory + */ + l_errl = new ERRORLOG::ErrlEntry + ( + ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, + ISTEP::MOD_EXIT_CACHE_CONTAINED, + ISTEP::RC_NO_FUNCTIONAL_MEMORY, + l_bottom, + l_top); + // We should never get here so there is some kind of bug + l_errl->addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH ); + // Also should look at the deconfigured memory + l_errl->addProcedureCallout( HWAS::EPUB_PRC_FIND_DECONFIGURED_PART, + HWAS::SRCI_PRIORITY_MED ); + } + else + { + for (const auto & l_procChip: l_procList) { - ErrlUserDetailsTarget(l_procChip).addToLog(l_errl); - l_stepError.addErrorDetails( l_errl ); - errlCommit( l_errl, HWPF_COMP_ID ); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_exit_cache_contained:: failed on proc with HUID : %d",TARGETING::get_huid(l_procChip) ); + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi_cpu_target(l_procChip); + // call p9_proc_exit_cache_contained.C HWP + FAPI_INVOKE_HWP( l_errl, + p9_exit_cache_contained, + l_procChip); + + if(l_errl) + { + ErrlUserDetailsTarget(l_procChip).addToLog(l_errl); + l_stepError.addErrorDetails( l_errl ); + errlCommit( l_errl, HWPF_COMP_ID ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_exit_cache_contained:: failed on proc with HUID : %d", TARGETING::get_huid(l_procChip) ); + } } } - - // no errors so extend Virtual Memory Map if(!l_errl) { @@ -311,8 +341,8 @@ void* call_proc_exit_cache_contained (void *io_pArgs) { /*@ * @errortype - * @moduleid fapi::MOD_EXIT_CACHE_CONTAINED - * @reasoncode fapi::RC_MM_EXTEND_FAILED + * @moduleid ISTEP::MOD_EXIT_CACHE_CONTAINED + * @reasoncode ISTEP::RC_MM_EXTEND_FAILED * @userdata1 rc from mm_extend * @userdata2 <UNUSED> * @@ -321,8 +351,8 @@ void* call_proc_exit_cache_contained (void *io_pArgs) */ l_errl = new ERRORLOG::ErrlEntry (ERRORLOG::ERRL_SEV_UNRECOVERABLE, - fapi::MOD_EXIT_CACHE_CONTAINED, - fapi::RC_MM_EXTEND_FAILED, + ISTEP::MOD_EXIT_CACHE_CONTAINED, + ISTEP::RC_MM_EXTEND_FAILED, rc, 0); |