diff options
author | Santosh Puranik <santosh.puranik@in.ibm.com> | 2016-02-18 06:30:40 -0600 |
---|---|---|
committer | Gregory S. Still <stillgs@us.ibm.com> | 2016-02-29 07:56:32 -0500 |
commit | fe372b80a09ce301e02dcc0bf0059f057a042be1 (patch) | |
tree | 6aca53776acb2b4e2d643ad77bcb83e51bae6948 /sbe | |
parent | 1ed76cca77ac405c8daec3ac3ff3bb6e4a2e6c6b (diff) | |
download | talos-sbe-fe372b80a09ce301e02dcc0bf0059f057a042be1.tar.gz talos-sbe-fe372b80a09ce301e02dcc0bf0059f057a042be1.zip |
Some changes to reduce image size
1) Force get/put scom plat functions to be inline
2) Inline ATTR get/set functions
3) FAPI RC is now 32-bit
4) Enable selective trace levels
RTC: 141492
Change-Id: Ie8a5bce597751b5484b2e9c89d614999a555f366
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21023
Tested-by: Jenkins Server
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'sbe')
-rw-r--r-- | sbe/hwpf/include/fapi2_hw_access.H | 6 | ||||
-rw-r--r-- | sbe/hwpf/include/hw_access.H | 2 | ||||
-rw-r--r-- | sbe/image/img_defs.mk | 6 | ||||
-rw-r--r-- | sbe/sbefw/sbeSpMsg.H | 12 |
4 files changed, 17 insertions, 9 deletions
diff --git a/sbe/hwpf/include/fapi2_hw_access.H b/sbe/hwpf/include/fapi2_hw_access.H index 7ce2af37..f1e60b52 100644 --- a/sbe/hwpf/include/fapi2_hw_access.H +++ b/sbe/hwpf/include/fapi2_hw_access.H @@ -91,8 +91,9 @@ namespace fapi2 /// @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 > + __attribute__((always_inline)) inline ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address, - buffer<uint64_t>& o_data); + buffer<uint64_t>& o_data); /// @brief Writes a SCOM register on a chip. /// @tparam K template parameter, passed in target. @@ -101,8 +102,9 @@ namespace fapi2 /// @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 > + __attribute__((always_inline)) inline ReturnCode putScom(const Target<K>& i_target, const uint64_t i_address, - const buffer<uint64_t> i_data); + const buffer<uint64_t> i_data); /// @brief Writes a SCOM register under mask on a chip /// @tparam K template parameter, passed in target. diff --git a/sbe/hwpf/include/hw_access.H b/sbe/hwpf/include/hw_access.H index af688421..00079797 100644 --- a/sbe/hwpf/include/hw_access.H +++ b/sbe/hwpf/include/hw_access.H @@ -100,6 +100,7 @@ namespace fapi2 /// @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 > + __attribute__((always_inline)) inline ReturnCode getScom(const Target<K>& i_target, const uint64_t i_address, buffer<uint64_t>& o_data) { @@ -119,6 +120,7 @@ namespace fapi2 /// @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 > + __attribute__((always_inline)) inline ReturnCode putScom(const Target<K>& i_target, const uint64_t i_address, const buffer<uint64_t> i_data) { diff --git a/sbe/image/img_defs.mk b/sbe/image/img_defs.mk index 339b10d0..ba883473 100644 --- a/sbe/image/img_defs.mk +++ b/sbe/image/img_defs.mk @@ -213,6 +213,11 @@ GCC-O-LEVEL = -Os endif endif +FAPI_TRACE_LEVEL_DEF = 3 +ifdef FAPI_TRACE_LEVEL_ENV +FAPI_TRACE_LEVEL_DEF = $(FAPI_TRACE_LEVEL_ENV) +endif + GCC-DEFS += -DIMAGE_NAME=$(IMAGE_SEEPROM_NAME) GCC-DEFS += -DPK_TIMER_SUPPORT=$(PK_TIMER_SUPPORT) GCC-DEFS += -DPK_THREAD_SUPPORT=$(PK_THREAD_SUPPORT) @@ -223,6 +228,7 @@ GCC-DEFS += -D__PK__=1 GCC-DEFS += -D__SBE__=1 GCC-DEFS += -D__PPE__=1 GCC-DEFS += -DFAPI2_NO_FFDC=1 +GCC-DEFS += -DFAPI_TRACE_LEVEL=$(FAPI_TRACE_LEVEL_DEF) # use the default settings in the code unless a size is defined ifdef PK_TRACE_SZ GCC-DEFS += -DPK_TRACE_SZ=$(PK_TRACE_SZ) diff --git a/sbe/sbefw/sbeSpMsg.H b/sbe/sbefw/sbeSpMsg.H index 57a00f98..8c021184 100644 --- a/sbe/sbefw/sbeSpMsg.H +++ b/sbe/sbefw/sbeSpMsg.H @@ -88,7 +88,7 @@ typedef struct sbeResponseFfdc { uint32_t magicBytes:16; uint32_t lenInWords:16; // length in word( 4 byte ) - uint32_t hiFapiRc; + uint32_t hiFapiRc; // Unused since FAPI RC is 32 bit on the SBE uint32_t lowFapiRc; /** @@ -98,10 +98,9 @@ typedef struct sbeResponseFfdc * * @return */ - void setRc(const uint64_t i_rc) + void setRc(const uint32_t i_rc) { - lowFapiRc = uint32_t(i_rc); - hiFapiRc = uint32_t(i_rc>>32); + lowFapiRc = i_rc; } /** @@ -109,10 +108,9 @@ typedef struct sbeResponseFfdc * * @return fapiRc */ - uint64_t getRc() + uint32_t getRc() { - uint64_t temp = ( (uint64_t)hiFapiRc << 32) | lowFapiRc; - return temp; + return lowFapiRc; } /** |