diff options
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_tod_init.C | 20 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/xml/error_info/p9_tod_errors.xml | 28 |
2 files changed, 46 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_tod_init.C b/src/import/chips/p9/procedures/hwp/nest/p9_tod_init.C index 411dded8f..29400f3ad 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_tod_init.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_tod_init.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -94,6 +94,8 @@ fapi2::ReturnCode init_tod_node( // Timeout counter for bits that are cleared by hardware uint32_t l_tod_init_pending_count = 0; fapi2::buffer<uint64_t> l_tod_fsm_reg; + // Flag to check if the TOD FSM is running + bool l_tod_running = false; FAPI_DBG("Start"); // Sequence details are in TOD Workbook section 1.6.3 @@ -161,12 +163,28 @@ fapi2::ReturnCode init_tod_node( if (l_tod_fsm_reg.getBit<PERV_TOD_FSM_REG_IS_RUNNING>()) { FAPI_DBG("TOD is running!"); + l_tod_running = true; break; } ++l_tod_init_pending_count; } + if (l_tod_running == false) + { + FAPI_DBG("TOD FSM failed !"); + fapi2::buffer<uint64_t> l_tod_err_reg = 0; + FAPI_TRY(fapi2::getScom(*(i_tod_node->i_target), + PERV_TOD_ERROR_REG, + l_tod_err_reg), + "Error from getScom (PERV_TOD_ERROR_REG)!"); + + FAPI_ASSERT(!l_tod_err_reg.getBit<PERV_TOD_ERROR_ROUTING_REG_OSCSWITCH_INTERRUPT>(), + fapi2::P9_TOD_MF_CLK_FAILURE() + .set_TARGET(*(i_tod_node->i_target)), + "Interrupt from TOD Oscillator Switch"); + } + FAPI_ASSERT((l_tod_init_pending_count < P9_TOD_UTIL_TIMEOUT_COUNT), fapi2::P9_TOD_INIT_NOT_RUNNING() .set_TARGET(*(i_tod_node->i_target)) diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_tod_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_tod_errors.xml index 0696166f5..bd7022fe3 100644 --- a/src/import/chips/p9/procedures/xml/error_info/p9_tod_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_tod_errors.xml @@ -5,7 +5,7 @@ <!-- --> <!-- OpenPOWER HostBoot Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2016,2017 --> +<!-- Contributors Listed Below - COPYRIGHT 2016,2018 --> <!-- [+] International Business Machines Corp. --> <!-- --> <!-- --> @@ -243,5 +243,31 @@ <!-- no callout, deconfig, gard tags as FW does not consume --> </hwpError> <!-- ******************************************************************** --> + <hwpError> + <rc>RC_P9_TOD_MF_CLK_FAILURE</rc> + <description> + Procedure: p9_tod_init + TOD FSM did not reach running state due + to interrupt from TOD Oscillator switch + </description> + <ffdc>TARGET</ffdc> + <collectRegisterFfdc> + <id>REG_FFDC_TOD_STATUS</id> + <targetType>TARGET_TYPE_PROC_CHIP</targetType> + <target>TARGET</target> + </collectRegisterFfdc> + <callout> + <hw> + <hwid>PCI_REF_CLOCK</hwid> + <refTarget>TARGET</refTarget> + </hw> + <priority>HIGH</priority> + </callout> + <callout> + <target>TARGET</target> + <priority>LOW</priority> + </callout> + </hwpError> + <!-- ******************************************************************** --> </hwpErrors> |