diff options
author | crgeddes <crgeddes@us.ibm.com> | 2016-04-15 09:46:34 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-04-28 11:29:22 -0400 |
commit | df6509836636649cc2383e660ed5d113a1587fc5 (patch) | |
tree | 142002531d72b1c8a1fd70943cae29526724f2b1 /src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H | |
parent | 4e41dc1eb238e65fcb06a260a7e5c1b172eae120 (diff) | |
download | talos-hostboot-df6509836636649cc2383e660ed5d113a1587fc5.tar.gz talos-hostboot-df6509836636649cc2383e660ed5d113a1587fc5.zip |
Get PoundV Bucket function and associated attributes
Uses the MVPD accessor method provided by FAPI2 interface
to retrieve the right #V bucket data from the appropriate LRP
record.
RTC:127421
Change-Id: Icde553e910338ecffd901102bb3973c52d16710b
Original-Change-Id: I8336b015d2b412c42a9a0e959c06cac011290525
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23290
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Tested-by: PPE CI
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23777
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H | 110 |
1 files changed, 110 insertions, 0 deletions
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 new file mode 100644 index 000000000..f6581d238 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H @@ -0,0 +1,110 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015,2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// +/// @file p9_pm_get_poundv_bucket.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 +/// + +#ifndef _P9_PM_GET_POUND_V_BUCKET_H_ +#define _P9_PM_GET_POUND_V_BUCKET_H_ + +//------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------ +#include <fapi2.H> + +namespace fapi2 +{ + +//Represents the data contained within a single #V (version=2) bucket +//Note: This structure should not be assumed to be binary identical +//to the contents of the VPD itself. +//Pack the struct so that we can get a consistent size with no +//extra padding +typedef struct __attribute__((__packed__)) voltageBucketData +{ + // bucket Id + uint8_t bucketId; + // Nominal + uint16_t nomFreq; + uint16_t VddNomVltg; + uint16_t IddNomCurr; + uint16_t VcsNomVltg; + uint16_t IcsNomCurr; + // PowerSave + uint16_t PSFreq; + uint16_t VddPSVltg; + uint16_t IddPSCurr; + uint16_t VcsPSVltg; + uint16_t IcsPSCurr; + // Turbo + uint16_t turboFreq; + uint16_t VddTurboVltg; + uint16_t IddTurboCurr; + uint16_t VcsTurboVltg; + uint16_t IcsTurboCurr; + //Ultra Turbo + uint16_t uTurboFreq; + uint16_t VddUTurboVltg; + uint16_t IddUTurboCurr; + uint16_t VcsUTurboVltg; + uint16_t IcsUTurboCurr; + //PowerBus + uint16_t pbFreq; + uint16_t VdnPbVltg; + uint16_t IdnPbCurr; + uint16_t VcsPbVltg; + uint16_t IcsPbCurr; +} voltageBucketData_t; + +} + +//------------------------------------------------------------------------------ +// Function prototype +//------------------------------------------------------------------------------ +/// +/// @brief Read #V bucket data from LRP record based upon +/// 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 +/// @return FAPI2_RC_SUCCESS if success, else error code. +/// +fapi2::ReturnCode p9_pm_get_poundv_bucket( + const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target, + fapi2::voltageBucketData_t& o_data); + +/// +/// @brief Read #V bucket data from LRP record based upon +/// bucket ID read off of parent proc chip. This function +/// will pass out array of bytes as they are read from the VPD +/// NOTE: This might be incorrect endianness +/// @param[in] i_target EQ chiplet target +/// @param[in] o_data bytes read from #V keyword of an LRP record +/// @return FAPI2_RC_SUCCESS if success, else error code. +/// +fapi2::ReturnCode p9_pm_get_poundv_bucket_attr( + const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target, + uint8_t* o_data); + + +#endif // _P9_PM_GET_POUND_V_BUCKET_H_ |