diff options
author | Sangeetha T S <sangeet2@in.ibm.com> | 2017-04-25 05:15:24 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-05-19 06:49:08 -0400 |
commit | a2dc28d3764e4c747fa34557f4fbcee7eadc2baf (patch) | |
tree | 1595cfcfa7e9e8043dd8cd8884f6bc15c158203b /src/import/chips | |
parent | 3b3b66ac88691a5e83baf8a623b428c21528c92a (diff) | |
download | talos-sbe-a2dc28d3764e4c747fa34557f4fbcee7eadc2baf.tar.gz talos-sbe-a2dc28d3764e4c747fa34557f4fbcee7eadc2baf.zip |
Level 3 : OCB & OCC procedures
Change-Id: I9c41fbb577680070742549f9ba9aec764ce0516c
RTC: 172617
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39636
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39639
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips')
6 files changed, 102 insertions, 27 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C index 1ef50413..bae4958a 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,8 +29,8 @@ // *HWP HWP Backup Owner: Greg Still <stillgs@us.ibm.com> // *HWP FW Owner : Sangeetha T S <sangeet2@in.ibm.com> // *HWP Team : PM -// *HWP Level : 2 -// *HWP Consumed by : FSP:HS +// *HWP Level : 3 +// *HWP Consumed by : SBE:HS /// /// High-level procedure flow: @@ -60,6 +60,10 @@ enum OCB_FULL_POLL_DELAY_SIM = 0 }; +// ---------------------------------------------------------------------- +// Function definitions +// ---------------------------------------------------------------------- + fapi2::ReturnCode p9_pm_ocb_indir_access( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, const p9ocb::PM_OCB_CHAN_NUM i_ocb_chan, @@ -134,12 +138,15 @@ fapi2::ReturnCode p9_pm_ocb_indir_access( FAPI_TRY(fapi2::putScom(i_target, l_OCBAR_address, l_data64)); } - // PUT Operation + // PUT Operation: Write data to the SRAM in the given location + // via the OCB channel if ( i_ocb_op == p9ocb::OCB_PUT ) { FAPI_INF("OCB access for data write operation"); FAPI_ASSERT(io_ocb_buffer != NULL, - fapi2::PM_OCB_PUT_NO_DATA_ERROR(), + fapi2::PM_OCB_PUT_NO_DATA_ERROR(). + set_CHANNEL(i_ocb_chan). + set_DATA_SIZE(i_ocb_req_length), "No data provided for PUT operation"); fapi2::buffer<uint64_t> l_data64; @@ -186,7 +193,9 @@ fapi2::ReturnCode p9_pm_ocb_indir_access( FAPI_ASSERT((true == l_push_ok_flag), fapi2::PM_OCB_PUT_DATA_POLL_NOT_FULL_ERROR(). - set_PUSHQ_STATE(l_data64), + set_CHANNEL(i_ocb_chan). + set_DATA_SIZE(i_ocb_req_length). + set_TARGET(i_target), "Polling timeout waiting on push non-full"); } } @@ -196,6 +205,13 @@ fapi2::ReturnCode p9_pm_ocb_indir_access( for(uint32_t l_index = 0; l_index < i_ocb_req_length; l_index++) { l_data64.insertFromRight(io_ocb_buffer[l_index], 0, 64); + /* The data read is done via this getscom operation. + * A data write failure will be logged off as a simple scom failure. + * Need to find a way to distiniguish this error and collect + * additional information incase of a failure.*/ + // @TODO RTC 173286 - FAPI2: FAPI_TRY (or surrogate name) + // that allows access to the return code for + // HWP reaction FAPI_TRY(fapi2::putScom(i_target, l_OCBDR_address, l_data64), "ERROR:Failed to complete write to channel data register"); o_ocb_act_length++; @@ -205,7 +221,7 @@ fapi2::ReturnCode p9_pm_ocb_indir_access( FAPI_DBG("%d blocks(64bits each) of data put", o_ocb_act_length); } - // GET Operation + // GET Operation: Data read from the given location in SRAM via OCB channel else if( i_ocb_op == p9ocb::OCB_GET ) { FAPI_INF("OCB access for data read operation"); @@ -213,9 +229,17 @@ fapi2::ReturnCode p9_pm_ocb_indir_access( fapi2::buffer<uint64_t> l_data64; uint64_t l_data = 0; + // Read data from the Channel Data Register in blocks of 64 bits. for (uint32_t l_loopCount = 0; l_loopCount < i_ocb_req_length; l_loopCount++) { + /* The data read is done via this getscom operation. + * A data read failure will be logged off as a simple scom failure. + * Need to find a way to distiniguish this error and collect + * additional information incase of a failure.*/ + // @TODO RTC 173286 - FAPI2: FAPI_TRY (or surrogate name) + // that allows access to the return code for + // HWP reaction FAPI_TRY(fapi2::getScom(i_target, l_OCBDR_address, l_data64), "ERROR: Failed to read data from channel %d", i_ocb_chan); l_data64.extract(l_data, 0, 64); diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H index f1268381..88f590ca 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,8 +31,8 @@ // *HWP HWP Backup Owner: Greg Still <stillgs@us.ibm.com> // *HWP FW Owner : Sangeetha T S <sangeet2@in.ibm.com> // *HWP Team : PM -// *HWP Level : 2 -// *HWP Consumed by : FSP:HS +// *HWP Level : 3 +// *HWP Consumed by : SBE:HS #ifndef _P9_PM_OCB_INDIR_ACCESS_H_ #define _P9_PM_OCB_INDIR_ACCESS_H_ diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C index 4bdec401..66e77022 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,14 +26,13 @@ /// @file p9_pm_ocb_init.C /// @brief Setup and configure OCB channels /// -// *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com> -// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> -// *HWP Team: PM -// *HWP Level: 2 -// *HWP Consumed by: FSP:HS +// *HWP HWP Owner : Amit Kumar <akumar3@us.ibm.com> +// *HWP HWP Backup Owner: Greg Still <stillgs@us.ibm.com> +// *HWP FW Owner : Sangeetha T S <sangeet2@in.ibm.com> +// *HWP Team : PM +// *HWP Level : 3 +// *HWP Consumed by : SBE:HS -/// Add support for linear window mode -/// /// High-level procedure flow: /// /// - if mode = PM_INIT @@ -293,7 +292,9 @@ fapi2::ReturnCode pm_ocb_setup( FAPI_ASSERT( false, fapi2::PM_OCBINIT_BAD_Q_LENGTH_PARM(). - set_BADQLENGTH(i_ocb_q_len), + set_BADQLENGTH(i_ocb_q_len). + set_CHANNEL(i_ocb_chan). + set_TYPE(i_ocb_type), "ERROR: Bad Queue Length Passed to Procedure => %d", i_ocb_q_len); } diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H index 2075fcdb..fb181014 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -27,10 +27,11 @@ /// @brief Setup and configure OCB channels /// // *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com> +// *HWP HWP Backup Owner: Greg Still <stillgs@us.ibm.com> // *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> // *HWP Team: PM -// *HWP Level: 2 -// *HWP Consumed by: FSP:HS +// *HWP Level: 3 +// *HWP Consumed by: SBE:HS #ifndef _P9_PM_OCB_INIT_H_ #define _P9_PM_OCB_INIT_H_ diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_indir_access_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_indir_access_errors.xml index f11df8b4..edadce1b 100644 --- a/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_indir_access_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_indir_access_errors.xml @@ -5,7 +5,7 @@ <!-- --> <!-- OpenPOWER sbe Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2015,2016 --> +<!-- Contributors Listed Below - COPYRIGHT 2015,2017 --> <!-- [+] International Business Machines Corp. --> <!-- --> <!-- --> @@ -23,14 +23,29 @@ <!-- --> <!-- IBM_PROLOG_END_TAG --> <!-- Error definitions for p9_pm_ocb_indir_access procedure --> +<!-- + *HWP HWP Owner: Greg Still <stillgs@us.ibm.com> + *HWP HWP Backup Owner: Amit Kumar <akumar3@us.ibm.com> + *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> + *HWP Team: PM + *HWP Level: 3 + *HWP Consumed by: SBE:HS:FSP +--> + <hwpErrors> <!-- ******************************************************************* --> <hwpError> <sbeError/> <rc>RC_PM_OCB_PUT_NO_DATA_ERROR</rc> <description> - No data passed for Put operation. + Valid data not provided to be written via the OCB channel. </description> + <ffdc>CHANNEL</ffdc> + <ffdc>DATA_SIZE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> </hwpError> <!-- ******************************************************************* --> <hwpError> @@ -41,7 +56,22 @@ before writing data. Is likely due to OCC firmware not pulling entries off of the queue in a timely manner. </description> - <ffdc>PUSHQ_STATE</ffdc> + <ffdc>CHANNEL</ffdc> + <ffdc>DATA_SIZE</ffdc> + <ffdc>TARGET</ffdc> + <collectRegisterFfdc> + <id>OCB_CHANNEL_FFDC_REGISTERS</id> + <target>TARGET</target> + <targetType>TARGET_TYPE_PROC_CHIP</targetType> + </collectRegisterFfdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + <callout> + <target>TARGET</target> + <priority>LOW</priority> + </callout> </hwpError> <!-- ******************************************************************* --> </hwpErrors> diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml index acb78105..40fdb233 100644 --- a/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml @@ -5,7 +5,7 @@ <!-- --> <!-- OpenPOWER sbe Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2015,2016 --> +<!-- Contributors Listed Below - COPYRIGHT 2015,2017 --> <!-- [+] International Business Machines Corp. --> <!-- --> <!-- --> @@ -23,6 +23,14 @@ <!-- --> <!-- IBM_PROLOG_END_TAG --> <!-- Error definitions for p9_pm_ocb_init procedure --> +<!-- + *HWP HWP Owner: Greg Still <stillgs@us.ibm.com> + *HWP HWP Backup Owner: Amit Kumar <akumar3@us.ibm.com> + *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> + *HWP Team: PM + *HWP Level: 3 + *HWP Consumed by: SBE:HS:FSP +--> <hwpErrors> <!-- ******************************************************************** --> <hwpError> @@ -31,14 +39,25 @@ <description>Unknown mode passed to p9_pm_ocb_init. </description> <ffdc>BADMODE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> </hwpError> <!-- ******************************************************************** --> <hwpError> <sbeError/> <rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc> - <description>Bad Queue Length Passed to p9_pm_ocb_init. + <description>Bad push/pull Queue Length provided while setting + up of the OCB channel. </description> <ffdc>BADQLENGTH</ffdc> + <ffdc>CHANNEL</ffdc> + <ffdc>TYPE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> </hwpError> <!-- ********************************************************************* --> </hwpErrors> |