diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.C index 756c4bd7e69..1dae7299441 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.C @@ -26,6 +26,12 @@ /// @file p9_pm_get_poundv_bucket.C /// @brief Grab PM data from attribute /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// // ---------------------------------------------------------------------- // Includes @@ -33,11 +39,12 @@ #include #include +// See doxygen in header file fapi2::ReturnCode p9_pm_get_poundv_bucket( const fapi2::Target& i_target, fapi2::voltageBucketData_t& o_data) { - FAPI_IMP("Entering p9_pm_get_poundv_bucket ...."); + FAPI_DBG("Entering p9_pm_get_poundv_bucket ...."); //Set up a char array to hold the bucket data from an attr read fapi2::ATTR_POUNDV_BUCKET_DATA_Type l_bucketAttr; @@ -50,7 +57,7 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket( memcpy(&o_data, l_bucketAttr, sizeof(o_data)); fapi_try_exit: - FAPI_IMP("Exiting p9_pm_get_poundv_bucket ...."); + FAPI_DBG("Exiting p9_pm_get_poundv_bucket ...."); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H index 1b278f56c70..db2823c01e7 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -28,6 +28,12 @@ /// can be stored inside of this struct. /// Also define prototype for p9_pm_get_poundv_bucket /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// #ifndef _P9_PM_GET_POUND_V_BUCKET_H_ #define _P9_PM_GET_POUND_V_BUCKET_H_ @@ -97,8 +103,8 @@ typedef struct __attribute__((__packed__)) voltageBucketData /// bucket ID read off of parent proc chip. This function /// will pass out a structured format of the #V data of correct /// endianness. -/// @param[in] i_target EQ chiplet target -/// @param[in] o_data structured data describing the #v bucket used +/// @param[in] i_target EQ chiplet target +/// @param[out] o_data structured data describing the #v bucket used /// @return FAPI2_RC_SUCCESS if success, else error code. /// fapi2::ReturnCode p9_pm_get_poundv_bucket( diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C index a456afaa6aa..ec6b75ef303 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.C @@ -23,9 +23,16 @@ /* */ /* IBM_PROLOG_END_TAG */ /// + /// @file p9_pm_get_poundv_bucket_attr.C /// @brief Grab PM data from certain bucket in #V keyword in LRPX record /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// // ---------------------------------------------------------------------- // Includes @@ -76,7 +83,6 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( lrpRecord = static_cast(l_eqChipUnitPos + fapi2::MVPD_RECORD_LRP0 ); - //check if bucket num has been overriden FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_POUNDV_BUCKET_NUM_OVERRIDE, i_target, @@ -225,10 +231,12 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( else { - FAPI_ERR("p9_pm_get_poundv_bucket_attr::Invalid number of matching nest freqs found for PBFreq=%d. Matches found = %d", + FAPI_ERR("p9_pm_get_poundv_bucket_attr::Invalid number of matching " + "nest freqs found for PBFreq=%d. Matches found = %d", l_sysNestFreq, l_numMatches ); FAPI_ASSERT(false, fapi2::INVALID_MATCHING_FREQ_NUMBER(). + set_EQ_TARGET(i_target). set_MATCHES_FOUND(l_numMatches). set_DESIRED_FREQPB(l_sysNestFreq). set_LRPREC(lrpRecord). @@ -237,8 +245,7 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( set_BUCKETC_FREQPB(l_bucketNestFreqs[2]). set_BUCKETD_FREQPB(l_bucketNestFreqs[3]). set_BUCKETE_FREQPB(l_bucketNestFreqs[4]). - set_BUCKETF_FREQPB(l_bucketNestFreqs[5]). - set_EQ(i_target), + set_BUCKETF_FREQPB(l_bucketNestFreqs[5]), "Matches found is NOT 1" ); } } @@ -246,6 +253,7 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( { FAPI_ASSERT( false, fapi2::INVALID_POUNDV_VERSION() + .set_EQ_TARGET(i_target) .set_POUNDV_VERSION(*l_fullVpdData), "p9_pm_get_poundv_bucket_attr::Invalid #V record version: 0x%x", *l_fullVpdData); @@ -254,7 +262,9 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( // This assert ensures the size of the calculated data is correct FAPI_ASSERT(l_vpdSize - POUNDV_BUCKET_OFFSET - ((l_bucketId - 1) * l_bucketSize) >= l_bucketSize, - fapi2::BAD_VPD_READ().set_EXPECTED_SIZE(sizeof(l_bucketSize)) + fapi2::BAD_VPD_READ() + .set_EQ_TARGET(i_target) + .set_EXPECTED_SIZE(sizeof(l_bucketSize)) .set_ACTUAL_SIZE(l_vpdSize - POUNDV_BUCKET_OFFSET - ((l_bucketId - 1) * l_bucketSize)), "#V data read was too small!" ); @@ -265,7 +275,7 @@ fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( // NOTE: Bucket IDs range from 1-6 FAPI_ASSERT( (l_bucketId <= NUM_BUCKETS) && (l_bucketId != 0), fapi2::INVALID_BUCKET_ID() - .set_TARGET(i_target) + .set_EQ_TARGET(i_target) .set_BUCKET_ID(l_bucketId), "Invalid Bucket Id = %d", l_bucketId ); @@ -294,5 +304,3 @@ fapi_try_exit: return fapi2::current_err; } - - diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.H index 04a5153d642..b2eb7d07305 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,11 +22,18 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /// -/// @file p9_pm_get_poundv_bucket.H +/// @file p9_pm_get_poundv_bucket_attr.H /// @brief Provide structure for voltageBucketData so that info from #V keyword /// can be stored inside of this struct. -/// Also define prototype for p9_pm_get_poundv_bucket +/// Also define prototype for p9_pm_get_poundv_bucket_attr +/// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 /// #ifndef _P9_PM_GET_POUND_V_BUCKET_ATTR_H_ diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.C index dfc2e3266b6..9a13c51a2ed 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.C @@ -26,6 +26,17 @@ /// @file p9_pm_get_poundw_bucket.C /// @brief Grab PM data from attribute /// +/// @file p9_pm_get_poundw_bucket.H +/// @brief Provide structure for vdmData so that info from #W keyword can be +/// stored inside of this struct. +/// Also define prototype for p9_pm_get_poundw_bucket +/// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// // ---------------------------------------------------------------------- // Includes @@ -33,11 +44,12 @@ #include #include +// See doxygen in header file fapi2::ReturnCode p9_pm_get_poundw_bucket( const fapi2::Target& i_target, fapi2::vdmData_t& o_data) { - FAPI_IMP("Entering p9_pm_get_poundw_bucket ...."); + FAPI_DBG("Entering p9_pm_get_poundw_bucket ...."); //Set up a char array to hold the bucket data from an attr read fapi2::ATTR_POUNDW_BUCKET_DATA_Type l_bucketAttr; @@ -50,7 +62,6 @@ fapi2::ReturnCode p9_pm_get_poundw_bucket( memcpy(&o_data, l_bucketAttr, sizeof(o_data)); fapi_try_exit: - FAPI_IMP("Exiting p9_pm_get_poundw_bucket ...."); - + FAPI_DBG("Exiting p9_pm_get_poundw_bucket ...."); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.H index cae4d3b9fff..47f72c09127 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket.H @@ -28,6 +28,12 @@ /// stored inside of this struct. /// Also define prototype for p9_pm_get_poundw_bucket /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// #ifndef _P9_PM_GET_POUND_W_BUCKET_H_ #define _P9_PM_GET_POUND_W_BUCKET_H_ @@ -66,8 +72,8 @@ typedef struct __attribute__((__packed__)) vdmData /// bucket ID read off of parent proc chip. This function /// will pass out a structured format of the #W data of correct /// endianness. -/// @param[in] i_target EQ chiplet target -/// @param[in] o_data structured data describing the #w bucket used +/// @param[in] i_target EQ chiplet target +/// @param[out] o_data structured data describing the #w bucket used /// @return FAPI2_RC_SUCCESS if success, else error code. /// fapi2::ReturnCode p9_pm_get_poundw_bucket( diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.C index ac21cb6eb92..26b6384890a 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.C @@ -26,6 +26,12 @@ /// @file p9_pm_get_poundw_bucket_attr.C /// @brief Grab PM data from certain bucket in #W keyword in CRP0 record /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// // ---------------------------------------------------------------------- // Includes @@ -36,6 +42,7 @@ #include #include +// See doxygen in header file fapi2::ReturnCode p9_pm_get_poundw_bucket_attr( const fapi2::Target& i_target, uint8_t* o_data) @@ -106,6 +113,7 @@ fapi2::ReturnCode p9_pm_get_poundw_bucket_attr( { FAPI_ASSERT( false, fapi2::INVALID_POUNDW_VERSION() + .set_EQ_TARGET(i_target) .set_POUNDW_VERSION(*l_fullVpdData), "p9_pm_get_poundw_bucket_attr::Invalid #W record " "version: 0x%x", @@ -119,6 +127,7 @@ fapi2::ReturnCode p9_pm_get_poundw_bucket_attr( FAPI_ASSERT(l_vpdSize - POUNDW_VERSION_SIZE - ((l_bucketId - 1) * l_bucketSize) >= l_bucketSize, fapi2::BAD_POUNDW_VPD_READ() + .set_EQ_TARGET(i_target) .set_EXPECTED_SIZE(l_bucketSize) .set_ACTUAL_SIZE(l_vpdSize - POUNDW_VERSION_SIZE - ((l_bucketId - 1) * l_bucketSize)), @@ -133,6 +142,7 @@ fapi2::ReturnCode p9_pm_get_poundw_bucket_attr( // This assert ensures the output data bucket ID matches what we looked for FAPI_ASSERT( (l_bucketId == ((fapi2::vdmData_t*)o_data)->bucketId), fapi2::INCORRECT_POUNDW_BUCKET_ID() + .set_EQ_TARGET(i_target) .set_BUCKET_ID(((fapi2::vdmData_t*)o_data)->bucketId) .set_EXP_BUCKET_ID(l_bucketId), "Incorrect Bucket Id = %d, expected %d", diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.H index ec68fcda004..b7f97caea63 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundw_bucket_attr.H @@ -27,6 +27,12 @@ /// @brief Define prototype for p9_pm_get_poundw_bucket_attr. This function /// retrieves a vdmData structure with info from #W keyword. /// +/// *HWP HW Owner : N/A (This is a FW delivered function) +/// *HWP FW Owner : Thi Tran +/// *HWP Team : PM - Calling this function. +/// *HWP Consumed by : FSP +/// *HWP Level : 3 +/// #ifndef _P9_PM_GET_POUND_W_BUCKET_ATTR_H_ #define _P9_PM_GET_POUND_W_BUCKET_ATTR_H_ diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundv_bucket_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundv_bucket_errors.xml index 3d67361f58b..fcca03d21ed 100644 --- a/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundv_bucket_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundv_bucket_errors.xml @@ -5,7 +5,7 @@ - + @@ -27,25 +27,50 @@ RC_BAD_VPD_READ - Attempted to read #V data and got less data than we expected + Attempted to read #V data and got less data than we expected + EQ_TARGET EXPECTED_SIZE ACTUAL_SIZE + + + VPD_PART + EQ_TARGET + + HIGH + + + CODE + LOW + RC_INVALID_POUNDV_VERSION - Read unknown version type from #V keyword in a LRP record + Read unknown version type from #V keyword in a LRP record + EQ_TARGET POUNDV_VERSION + + + VPD_PART + EQ_TARGET + + HIGH + + + CODE + LOW + RC_INVALID_MATCHING_FREQ_NUMBER - Found either zero or multiple buckets for the desired powerbus frequency + Found either zero or multiple buckets for the desired powerbus frequency + EQ_TARGET MATCHES_FOUND DESIRED_FREQPB LRPREC @@ -60,15 +85,18 @@ HIGH - EQ - LOW + + VPD_PART + EQ_TARGET + + LOW RC_INVALID_EQ_CHIP_POS - Encountered an invalid value for EQ chip position + Encountered an invalid value for EQ chip position EQ_POSITION @@ -80,19 +108,17 @@ RC_INVALID_BUCKET_ID - Encountered an invalid Bucket Id. Valid values are 1-6 inclusive. + Encountered an invalid Bucket Id. Valid values are 1-6 inclusive. + EQ_TARGET BUCKET_ID - TARGET - HIGH + + VPD_PART + EQ_TARGET + + HIGH - - TARGET - - - TARGET - diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundw_bucket_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundw_bucket_errors.xml index c77ead992b3..6a5f01f612a 100644 --- a/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundw_bucket_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_pm_get_poundw_bucket_errors.xml @@ -27,27 +27,59 @@ RC_BAD_POUNDW_VPD_READ - Attempted to read #W data and got less data than we expected + Attempted to read #W data and got less data than we expected + EQ_TARGET EXPECTED_SIZE ACTUAL_SIZE + + + VPD_PART + EQ_TARGET + + HIGH + + + CODE + LOW + RC_INVALID_POUNDW_VERSION - Read unknown version type from #W keyword in a CRP0 record + Read unknown version type from #W keyword in a CRP0 record + EQ_TARGET POUNDW_VERSION + + + VPD_PART + EQ_TARGET + + HIGH + + + CODE + LOW + RC_INCORRECT_POUNDW_BUCKET_ID - Bucket Id in #W data was not the expected Bucket Id. + Bucket Id in #W data was not the expected Bucket Id. + EQ_TARGET BUCKET_ID EXP_BUCKET_ID + + + VPD_PART + EQ_TARGET + + HIGH +