diff options
author | Bilicon Patil <bilpatil@in.ibm.com> | 2016-01-08 05:42:25 -0600 |
---|---|---|
committer | Jennifer A. Stofer <stofer@us.ibm.com> | 2016-02-23 16:47:02 -0600 |
commit | 95726474637e4e5c50a76bc88ba3260911bf58fc (patch) | |
tree | 21d9e9b5cd33f57f40bcfc53289380211ed0c0a3 /import/hwpf | |
parent | 9baeb044c30bc1aa9966dbe410b33df1bf66adc5 (diff) | |
download | talos-sbe-95726474637e4e5c50a76bc88ba3260911bf58fc.tar.gz talos-sbe-95726474637e4e5c50a76bc88ba3260911bf58fc.zip |
Updates to the fapi2 putRing API
Changes for "putRing from image" -
1) Will take a Ring ID instead of Ring Address
2) Will not support variable buffer type for PPE platforms
3) A new file is created that will have the enum constants of
Ring IDs
Change-Id: Ie7ba1d2f2cb7d5954d9c6d6c4c2938673d963811
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23130
Tested-by: Jenkins Server
Reviewed-by: Claus Michael Olsen <cmolsen@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/24668
Diffstat (limited to 'import/hwpf')
-rw-r--r-- | import/hwpf/fapi2/include/fapi2_hw_access.H | 29 | ||||
-rw-r--r-- | import/hwpf/fapi2/include/plat/hw_access.H | 50 |
2 files changed, 36 insertions, 43 deletions
diff --git a/import/hwpf/fapi2/include/fapi2_hw_access.H b/import/hwpf/fapi2/include/fapi2_hw_access.H index 5c26a8c4..2296f415 100644 --- a/import/hwpf/fapi2/include/fapi2_hw_access.H +++ b/import/hwpf/fapi2/include/fapi2_hw_access.H @@ -7,7 +7,7 @@ /* */ /* EKB Project */ /* */ -/* COPYRIGHT 2012,2015 */ +/* COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -42,6 +42,7 @@ #include <target.H> #include <hw_access_def.H> #include <plat_hw_access.H> +#include <p9_ringId.H> #ifdef FAPI_SUPPORT_MULTI_SCOM #include <multi_scom.H> @@ -148,6 +149,17 @@ inline ReturnCode modifyCfamRegister(const Target<K>& i_target, const buffer<uint32_t> i_data, const ChipOpModifyMode i_modifyMode); +/// @brief Writes a ring to a chip. +/// @tparam K template parameter, passed in target. +/// @param[in] i_target Target to operate on. +/// @param[in] i_ringID Ring ID that will identify the Ring in the image. +/// @param[in] i_ringMode Ring operation mode. +/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. +template< TargetType K > +inline ReturnCode putRing(const Target<K>& i_target, + const RingID i_ringID, + const RingMode i_ringMode = RING_MODE_HEADER_CHECK); + // variable_buffer isn't supported on PPE #ifndef __PPE__ /// @brief Reads a ring from a chip. @@ -163,21 +175,6 @@ inline ReturnCode getRing(const Target<K>& i_target, variable_buffer& o_data, const RingMode i_ringMode = 0); -/// @brief Writes a ring to a chip. -/// @tparam K template parameter, passed in target. -/// @param[in] i_target Target to operate on. -/// @param[in] i_address Ring address to write to. -/// @param[in] i_data Buffer that contains RS4 compressed ring data -/// to write into address -/// @param[in] i_ringMode Ring operation mode. -/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. -template< TargetType K > -inline ReturnCode putRing(const Target<K>& i_target, - const scanRingId_t i_address, - const variable_buffer& i_data, - const RingMode i_ringMode = 0); - - /// @brief Read-modify-write a ring on a chip. /// @tparam K template parameter, passed in target. /// @param[in] i_target Target to operate on. diff --git a/import/hwpf/fapi2/include/plat/hw_access.H b/import/hwpf/fapi2/include/plat/hw_access.H index ed6c3fb3..2d883022 100644 --- a/import/hwpf/fapi2/include/plat/hw_access.H +++ b/import/hwpf/fapi2/include/plat/hw_access.H @@ -7,7 +7,7 @@ /* */ /* EKB Project */ /* */ -/* COPYRIGHT 2012,2015 */ +/* COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -229,6 +229,28 @@ inline ReturnCode modifyCfamRegister(const Target<K>& i_target, return FAPI2_RC_SUCCESS; } +/// @brief Platform-level implementation of putRing() +/// Hardware procedures writers will not call this function. +/// @tparam K template parameter, passed in target. +/// @param[in] i_target Target to operate on. +/// @param[in] i_ringID Ring ID that will identify the Ring in the image. +/// @param[in] i_ringMode Ring operation mode. +/// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. +template< TargetType K > +inline ReturnCode putRing(const Target<K>& i_target, + const RingID i_ringID, + const RingMode i_ringMode) +{ + std::cout << std::hex << " putRing " + << "target: {" << i_target.getType() << "," + << uint64_t(i_target) << "}; " + << "Ring ID: " << i_ringID << "; " + << "ring mode: " << i_ringMode + << std::endl; + + return FAPI2_RC_SUCCESS; +} + // variable_buffer isn't supported on PPE #ifndef __PPE__ /// @@ -260,32 +282,6 @@ inline ReturnCode getRing(const Target<K>& i_target, return FAPI2_RC_SUCCESS; } -/// @brief Platform-level implementation of putRing() -/// Hardware procedures writers will not call this function. -/// @tparam K template parameter, passed in target. -/// @param[in] i_target Target to operate on. -/// @param[in] i_address Ring address to write to. -/// @param[in] i_data Buffer that contains RS4 compressed ring data -/// to write into address -/// @param[in] i_ringMode Ring operation mode. -/// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. -template< TargetType K > -inline ReturnCode putRing(const Target<K>& i_target, - const scanRingId_t i_address, - const variable_buffer& i_data, - const RingMode i_ringMode) -{ - std::cout << std::hex << " putRing " - << "target: {" << i_target.getType() << "," - << uint64_t(i_target) << "}; " - << "address: " << i_address << "; " - << "ring mode: " << i_ringMode << "; " - << "first element of the input data: " << i_data()[0] - << std::endl; - - return FAPI2_RC_SUCCESS; -} - /// @brief Platform-level implementation of modifyRing() /// @tparam K template parameter, passed in target. /// @param[in] i_target Target to operate on. |