diff options
author | Santosh Puranik <santosh.puranik@in.ibm.com> | 2016-06-20 04:36:35 -0500 |
---|---|---|
committer | Santosh S. Puranik <santosh.puranik@in.ibm.com> | 2016-08-12 10:56:33 -0400 |
commit | e598dab7f300aad26b3b9590c4865e4f3af9800e (patch) | |
tree | 6c65ac9c71c6d57043ccfa88582079bdcaeee4c3 /sbe | |
parent | 62e342b244867bbd6441f786b37faa574f56d678 (diff) | |
download | talos-sbe-e598dab7f300aad26b3b9590c4865e4f3af9800e.tar.gz talos-sbe-e598dab7f300aad26b3b9590c4865e4f3af9800e.zip |
PPE Multicast implementation
Change-Id: I01ac5566e80ba5a0a539f58cddc3f22fd763e63b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26114
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com>
Diffstat (limited to 'sbe')
-rw-r--r-- | sbe/hwpf/include/fapi2_hw_access.H | 72 | ||||
-rw-r--r-- | sbe/hwpf/include/hw_access.H | 96 | ||||
-rw-r--r-- | sbe/image/img_defs.mk | 2 | ||||
-rw-r--r-- | sbe/sbefw/sbecmdiplcontrol.C | 3 |
4 files changed, 87 insertions, 86 deletions
diff --git a/sbe/hwpf/include/fapi2_hw_access.H b/sbe/hwpf/include/fapi2_hw_access.H index 4bd5eb64..2a5c2889 100644 --- a/sbe/hwpf/include/fapi2_hw_access.H +++ b/sbe/hwpf/include/fapi2_hw_access.H @@ -91,9 +91,9 @@ namespace fapi2 /// @param[in] i_address SCOM register address to read from. /// @param[out] o_data Buffer that holds data read from HW target. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > + template< TargetType K, typename V > __attribute__((always_inline)) - inline ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address, + inline ReturnCode getScom(const Target<K, V>& i_target, const uint64_t i_address, buffer<uint64_t>& o_data); /// @brief Writes a SCOM register on a chip. @@ -102,9 +102,9 @@ namespace fapi2 /// @param[in] i_address SCOM register address to write to. /// @param[in] i_data Buffer that holds data to write into address. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > + template< TargetType K, typename V > __attribute__((always_inline)) - inline ReturnCode putScom(const Target<K>& i_target, const uint64_t i_address, + inline ReturnCode putScom(const Target<K, V>& i_target, const uint64_t i_address, const buffer<uint64_t> i_data); /// @brief Writes a SCOM register under mask on a chip @@ -114,8 +114,8 @@ namespace fapi2 /// @param[in] i_data Buffer that holds data to write into address. /// @param[in] i_mask Buffer that holds the mask value. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode putScomUnderMask(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putScomUnderMask(const Target<K, V>& i_target, const uint64_t i_address, const buffer<uint64_t> i_data, const buffer<uint64_t> i_mask); @@ -127,8 +127,8 @@ namespace fapi2 /// @param[in] i_address CFAM register address to read from. /// @param[out] o_data Buffer that holds data read from HW target. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode getCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, buffer<uint32_t>& o_data); @@ -139,8 +139,8 @@ namespace fapi2 /// @param[in] i_address CFAM register address to write to. /// @param[in] i_data Buffer that holds data to write into address. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode putCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, const buffer<uint32_t> i_data); @@ -152,8 +152,8 @@ namespace fapi2 /// @param[in] i_data Buffer that holds data to be modified. /// @param[in] i_modifyMode The modify mode (or/and/xor). /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode modifyCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode modifyCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, const buffer<uint32_t> i_data, const ChipOpModifyMode i_modifyMode); @@ -164,8 +164,8 @@ namespace fapi2 /// @param[in] i_RingID Ring ID to write to. /// @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, +template< TargetType K, typename V > +inline ReturnCode putRing(const Target<K, V>& i_target, const RingID i_ringID, const RingMode i_ringMode = RING_MODE_HEADER_CHECK); @@ -178,8 +178,8 @@ inline ReturnCode putRing(const Target<K>& i_target, /// @param[out] o_data Buffer that holds data read from HW target. /// @param[in] i_ringMode Ring operation mode. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode getRing(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getRing(const Target<K, V>& i_target, const scanRingId_t i_address, variable_buffer& o_data, const RingMode i_ringMode = 0); @@ -195,8 +195,8 @@ inline ReturnCode putRing(const Target<K>& i_target, /// @param[in] i_modifyMode The modify mode (or/and/xor) /// @param[in] i_ringMode Ring operation mode. /// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode modifyRing(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode modifyRing(const Target<K, V>& i_target, const scanRingId_t i_address, const variable_buffer& i_data, const ChipOpModifyMode i_modifyMode, @@ -243,8 +243,8 @@ inline ReturnCode putRing(const Target<K>& i_target, /// SCOM_BULK_WRITE_MODE operations are not supported due to /// hardware limitations. /// - template< TargetType K > - fapi2::ReturnCode multiScom (const Target<K>& i_target, + template< TargetType K, typename V > + fapi2::ReturnCode multiScom (const Target<K, V>& i_target, MultiScom& io_multiScomObj); #endif @@ -297,8 +297,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_GET_SPY(TARGET, ID, DATA) fapi2::getSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA) - template< TargetType K > - inline ReturnCode getSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpy(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& o_data); #endif @@ -307,8 +307,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_GET_SPY(TARGET, ID, DATA) fapi2::getSpy(TARGET, #ID, DATA) - template< TargetType K > - inline ReturnCode getSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpy(const Target<K, V>& i_target, const char * const i_spyId, variable_buffer& o_data); #endif @@ -356,8 +356,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_PUT_SPY(TARGET, ID, DATA) fapi2::putSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA) - template< TargetType K > - inline ReturnCode putSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpy(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& i_data); #endif @@ -366,8 +366,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_PUT_SPY(TARGET, ID, DATA) fapi2::putSpy(TARGET, #ID, DATA) - template< TargetType K > - inline ReturnCode putSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpy(const Target<K, V>& i_target, const char* const i_spyId, variable_buffer& i_data); #endif @@ -398,8 +398,8 @@ inline ReturnCode putRing(const Target<K>& i_target, fapi2::putSpyImage(TARGET, FAPI_SPY_NAMES::ID.value, \ DATA1, DATA2) - template< TargetType K > - inline ReturnCode putSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpyImage(const Target<K, V>& i_target, const spyId_t i_spyId, const variable_buffer& i_data, variable_buffer& o_imageData); @@ -410,8 +410,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_PUT_SPY_IMAGE(TARGET, ID, DATA1, DATA2) \ fapi2::putSpyImage(TARGET, #ID, DATA1,DATA2) - template< TargetType K > - inline ReturnCode putSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpyImage(const Target<K, V>& i_target, const char* const i_spyId, const variable_buffer& i_data, variable_buffer& o_imageData); @@ -440,8 +440,8 @@ inline ReturnCode putRing(const Target<K>& i_target, fapi2:getSpyImage(TARGET, FAPI_SPY_NAMES::ID.value, \ DATA1, DATA2) - template< TargetType K > - inline ReturnCode getSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpyImage(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& o_data, const variable_buffer& i_imageData); @@ -452,8 +452,8 @@ inline ReturnCode putRing(const Target<K>& i_target, #define FAPI_GET_SPY_IMAGE(TARGET, ID, DATA1, DATA2) \ fapi2::getSpyImage(TARGET, #ID, DATA1,DATA2) - template< TargetType K > - inline ReturnCode getSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpyImage(const Target<K, V>& i_target, const char * const i_spyId, variable_buffer& o_data, const variable_buffer& i_imageData); diff --git a/sbe/hwpf/include/hw_access.H b/sbe/hwpf/include/hw_access.H index 9cca1c00..0f9f3dfb 100644 --- a/sbe/hwpf/include/hw_access.H +++ b/sbe/hwpf/include/hw_access.H @@ -53,7 +53,7 @@ namespace fapi2 /// @brief Sets the PIB error mask - platform dependant /// @param[in] i_mask The new error mask void setPIBErrorMask(uint8_t i_mask) - { + { PLAT_SET_PIB_ERROR_MASK(i_mask); } @@ -100,9 +100,9 @@ namespace fapi2 /// @param[in] i_address SCOM register address to read from. /// @param[out] o_data Buffer that holds data read from HW target. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > + template< TargetType K, typename V > __attribute__((always_inline)) - inline ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address, + inline ReturnCode getScom(const Target<K, V>& i_target, const uint64_t i_address, buffer<uint64_t>& o_data) { fapi2::ReturnCode l_rc; @@ -120,9 +120,9 @@ namespace fapi2 /// @param[in] i_address SCOM register address to write to. /// @param[in] i_data Buffer that holds data to write into address. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > + template< TargetType K, typename V > __attribute__((always_inline)) - inline ReturnCode putScom(const Target<K>& i_target, const uint64_t i_address, + inline ReturnCode putScom(const Target<K, V>& i_target, const uint64_t i_address, const buffer<uint64_t> i_data) { fapi2::ReturnCode l_rc; @@ -141,19 +141,19 @@ namespace fapi2 /// @param[in] i_data Buffer that holds data to be modified. /// @param[in] i_modifyMode The modify mode (or/and/xor). /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode modifyScom(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode modifyScom(const Target<K, V>& i_target, const uint64_t i_address, const buffer<uint64_t> i_data, const ChipOpModifyMode i_modifyMode) { fapi2::buffer<uint64_t> l_modifyDataBuffer; - - fapi2::ReturnCode l_rc; + + fapi2::ReturnCode l_rc; PLAT_GETSCOM(l_rc, i_target, (uint32_t)(i_address & BITS(40,24)), - &(l_modifyDataBuffer())); + &(l_modifyDataBuffer())); if (l_rc) goto __fapi2exit__; if ( i_modifyMode == CHIP_OP_MODIFY_MODE_OR) @@ -170,12 +170,12 @@ namespace fapi2 { l_modifyDataBuffer ^= i_data; } - + PLAT_PUTSCOM(l_rc, i_target, (uint32_t)(i_address & BITS(40,24)), - l_modifyDataBuffer()); - if (l_rc) goto __fapi2exit__; + l_modifyDataBuffer()); + if (l_rc) goto __fapi2exit__; __fapi2exit__: @@ -190,8 +190,8 @@ __fapi2exit__: /// @param[in] i_data Buffer that holds data to write into address. /// @param[in] i_mask Buffer that holds the mask value. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode putScomUnderMask( const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putScomUnderMask( const Target<K, V>& i_target, const uint64_t i_address, buffer<uint64_t> i_data, buffer<uint64_t> i_mask) @@ -199,8 +199,8 @@ __fapi2exit__: fapi2::buffer<uint64_t> l_modifyDataBuffer = i_data; l_modifyDataBuffer &= i_mask; - - fapi2::ReturnCode l_rc; + + fapi2::ReturnCode l_rc; PLAT_PUTSCOM(l_rc, i_target, (uint32_t)(i_address & BITS(40,24)), @@ -209,7 +209,7 @@ __fapi2exit__: return l_rc; } - + /// @brief Reads a CFAM register from a chip. /// CFAM register is 32-bit wide. @@ -218,8 +218,8 @@ __fapi2exit__: /// @param[in] i_address CFAM register address to read from. /// @param[out] o_data Buffer that holds data read from HW target. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode getCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, buffer<uint32_t>& o_data) { @@ -237,8 +237,8 @@ __fapi2exit__: /// @param[in] i_address CFAM register address to write to. /// @param[in] i_data Buffer that holds data to write into address. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode putCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, buffer<uint32_t>& i_data) { @@ -257,8 +257,8 @@ __fapi2exit__: /// @param[in] i_data Buffer that holds data to be modified. /// @param[in] i_modifyMode The modify mode (or/and/xor). /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode modifyCfamRegister(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode modifyCfamRegister(const Target<K, V>& i_target, const uint32_t i_address, const buffer<uint32_t>& i_data, const ChipOpModifyMode i_modifyMode) @@ -278,8 +278,8 @@ __fapi2exit__: /// @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, + template< TargetType K, typename V > + inline ReturnCode putRing(const Target<K, V>& i_target, const RingID i_ringID, const RingMode i_ringMode) { @@ -300,8 +300,8 @@ __fapi2exit__: /// @param[out] o_data Buffer that holds data read from HW target. /// @param[in] i_ringMode Ring operation mode. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode getRing(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getRing(const Target<K, V>& i_target, const scanRingId_t i_address, variable_buffer& o_data, const RingMode i_ringMode = 0) @@ -330,8 +330,8 @@ __fapi2exit__: /// @param[in] i_modifyMode The modify mode (or/and/xor) /// @param[in] i_ringMode Ring operation mode. /// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - template< TargetType K > - inline ReturnCode modifyRing(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode modifyRing(const Target<K, V>& i_target, const scanRingId_t i_address, variable_buffer& i_data, const ChipOpModifyMode i_modifyMode, @@ -383,8 +383,8 @@ __fapi2exit__: /// SCOM_BULK_WRITE_MODE operations are not supported due to /// hardware limitations. /// - template< TargetType K > - fapi2::ReturnCode multiScom (const Target<K>& i_target, + template< TargetType K, typename V > + fapi2::ReturnCode multiScom (const Target<K, V>& i_target, MultiScom& io_multiScomObj) { } @@ -437,8 +437,8 @@ __fapi2exit__: /// the quotes for the cronus environment /// #ifdef FAPI_SUPPORT_SPY_AS_ENUM - template< TargetType K > - inline ReturnCode getSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpy(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& o_data) { @@ -447,8 +447,8 @@ __fapi2exit__: } #endif #ifdef FAPI_SUPPORT_SPY_AS_STRING - template< TargetType K > - inline ReturnCode getSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpy(const Target<K, V>& i_target, const char * const i_spyId, variable_buffer& o_data) { @@ -496,8 +496,8 @@ __fapi2exit__: /// the quotes for the cronus environment /// #ifdef FAPI_SUPPORT_SPY_AS_ENUM - template< TargetType K > - inline ReturnCode putSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpy(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& i_data) { @@ -506,8 +506,8 @@ __fapi2exit__: } #endif #ifdef FAPI_SUPPORT_SPY_AS_STRING - template< TargetType K > - inline ReturnCode putSpy(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpy(const Target<K, V>& i_target, const char* const i_spyId, variable_buffer& i_data) { @@ -536,8 +536,8 @@ __fapi2exit__: /// See fapiPutSpy for details on spy id specifics. /// #ifdef FAPI_SUPPORT_SPY_AS_ENUM - template< TargetType K > - inline ReturnCode putSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpyImage(const Target<K, V>& i_target, const spyId_t i_spyId, const variable_buffer& i_data, variable_buffer& o_imageData) @@ -547,8 +547,8 @@ __fapi2exit__: } #endif #ifdef FAPI_SUPPORT_SPY_AS_STRING - template< TargetType K > - inline ReturnCode putSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode putSpyImage(const Target<K, V>& i_target, const char* const i_spyId, const variable_buffer& i_data, variable_buffer& o_imageData) @@ -575,8 +575,8 @@ __fapi2exit__: /// See fapiPutSpy for details on spy id specifics. /// #ifdef FAPI_SUPPORT_SPY_AS_ENUM - template< TargetType K > - inline ReturnCode getSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpyImage(const Target<K, V>& i_target, const spyId_t i_spyId, variable_buffer& o_data, const variable_buffer& i_imageData) @@ -586,8 +586,8 @@ __fapi2exit__: } #endif #ifdef FAPI_SUPPORT_SPY_AS_STRING - template< TargetType K > - inline ReturnCode getSpyImage(const Target<K>& i_target, + template< TargetType K, typename V > + inline ReturnCode getSpyImage(const Target<K, V>& i_target, const char * const i_spyId, variable_buffer& o_data, const variable_buffer& i_imageData) diff --git a/sbe/image/img_defs.mk b/sbe/image/img_defs.mk index 80bfe04d..025ab55a 100644 --- a/sbe/image/img_defs.mk +++ b/sbe/image/img_defs.mk @@ -368,7 +368,7 @@ GCC-CFLAGS += -DP9_HCD_STOP_SKIP_SCAN CFLAGS = PPE-CFLAGS = $(CFLAGS) -c $(GCC-CFLAGS) $(PIPE-CFLAGS) $(GCC-O-LEVEL) $(INCLUDES) -CXXFLAGS = -std=c++11 -nostdinc++ -fno-rtti -fno-threadsafe-statics +CXXFLAGS = -std=c++11 -nostdinc++ -fno-rtti -fno-threadsafe-statics -fno-strict-aliasing CPPFLAGS = -E ASFLAGS = -mppe42 diff --git a/sbe/sbefw/sbecmdiplcontrol.C b/sbe/sbefw/sbecmdiplcontrol.C index 49ced429..ac5f75c2 100644 --- a/sbe/sbefw/sbecmdiplcontrol.C +++ b/sbe/sbefw/sbecmdiplcontrol.C @@ -618,7 +618,8 @@ ReturnCode istepLoadBootLoader( sbeIstepHwp_t i_hwp) uint8_t exId = 0; Target<TARGET_TYPE_PROC_CHIP > proc = plat_getChipTarget(); FAPI_ATTR_GET(fapi2::ATTR_MASTER_EX,proc,exId); - fapi2::Target<fapi2::TARGET_TYPE_EX > exTgt(exId); + fapi2::Target<fapi2::TARGET_TYPE_EX > + exTgt(plat_getTargetHandleByInstance<fapi2::TARGET_TYPE_EX>(exId)); // Get hbbl section P9XipHeader *hdr = getXipHdr(); P9XipSection *hbblSection = &(hdr->iv_section[P9_XIP_SECTION_SBE_HBBL]); |