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 /hwpf | |
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 'hwpf')
-rw-r--r-- | hwpf/include/plat/plat_trace.H | 31 | ||||
-rw-r--r-- | hwpf/include/return_code.H | 12 | ||||
-rw-r--r-- | hwpf/src/plat/target.C | 10 |
3 files changed, 37 insertions, 16 deletions
diff --git a/hwpf/include/plat/plat_trace.H b/hwpf/include/plat/plat_trace.H index d3d553ee..cc044066 100644 --- a/hwpf/include/plat/plat_trace.H +++ b/hwpf/include/plat/plat_trace.H @@ -65,21 +65,50 @@ namespace fapi2 PK_TRACE("%s: %s:%d ", _id_, __FUNCTION__, __LINE__); \ PK_TRACE(_fmt_, ##_args_); */ - +// FAPI_TRACE_LEVEL controls what traces are included in the code build +// 0 == No tracing +// 1 == ERR traces only +// 2 == ERR and IMP only +// 3 == ERR, IMP and INF only. This is the default in Makefile +// > 4 == All traces (ERR, IMP, INF, DBG, SCAN, MFG) +#if (FAPI_TRACE_LEVEL >= 3) #define FAPI_INF(_fmt_, _args_...) FAPI_TRACE("inf", _fmt_, ##_args_) +#else +#define FAPI_INF(_fmt_, _args_...) +#endif // Important traces (go into slow trace buffer that should not wrap often) +#if (FAPI_TRACE_LEVEL >= 2) #define FAPI_IMP(_fmt_, _args_...) FAPI_TRACE("imp", _fmt_, ##_args_) +#else +#define FAPI_IMP(_fmt_, _args_...) +#endif // Error traces (go into slow trace buffer that should not wrap often) +#if (FAPI_TRACE_LEVEL >= 1) #define FAPI_ERR(_fmt_, _args_...) FAPI_TRACE("err", _fmt_, ##_args_) +#else +#define FAPI_ERR(_fmt_, _args_...) +#endif // Debug traces (go into fast trace buffer that can wrap often) +#if (FAPI_TRACE_LEVEL >= 4) #define FAPI_DBG(_fmt_, _args_...) FAPI_TRACE("dbg", _fmt_, ##_args_) +#else +#define FAPI_DBG(_fmt_, _args_...) +#endif // Scan traces +#if (FAPI_TRACE_LEVEL >= 4) #define FAPI_SCAN(_fmt_, _args_...) FAPI_TRACE("scan", _fmt_, ##_args_) +#else +#define FAPI_SCAN(_fmt_, _args_...) +#endif +#if (FAPI_TRACE_LEVEL >= 4) #define FAPI_MFG(_fmt_, _args_...) FAPI_TRACE("mfg", _fmt_, ##_args_) +#else +#define FAPI_MFG(_fmt_, _args_...) +#endif #endif // FAPI2_PLATTRACE_H_ diff --git a/hwpf/include/return_code.H b/hwpf/include/return_code.H index fd2f7c29..1ad46c9e 100644 --- a/hwpf/include/return_code.H +++ b/hwpf/include/return_code.H @@ -56,7 +56,7 @@ namespace fapi2 /// @brief Constructor. /// @param[in] i_rc the rc to set /// - ReturnCode(const uint64_t i_rc = FAPI2_RC_SUCCESS): + ReturnCode(const uint32_t i_rc = FAPI2_RC_SUCCESS): iv_rc(i_rc) {}; @@ -64,7 +64,7 @@ namespace fapi2 /// @brief integral type conversion function. Returns the error code /// @return The error code /// - inline operator uint64_t() const { return iv_rc; } + inline operator uint32_t() const { return iv_rc; } /// /// @brief Returns true iff iv_rc == SUCCESS @@ -76,24 +76,24 @@ namespace fapi2 /// @brief Assignement operator /// #ifdef DOXYGEN - inline ReturnCode& operator=(const uint64_t& rhs) + inline ReturnCode& operator=(const uint32_t& rhs) inline ReturnCode& operator=(const ReturnCodes& rhs) #endif - inline bool operator==(const uint64_t& rhs) const + inline bool operator==(const uint32_t& rhs) const { return rhs == iv_rc; } inline bool operator==(const ReturnCodes& rhs) const { return rhs == iv_rc; } - inline bool operator!=(const uint64_t& rhs) const + inline bool operator!=(const uint32_t& rhs) const { return rhs != iv_rc; } inline bool operator!=(const ReturnCodes& rhs) const { return rhs != iv_rc; } private: - uint64_t iv_rc; + uint32_t iv_rc; }; /// This implementation assumes no exception handling and leverages thread-local diff --git a/hwpf/src/plat/target.C b/hwpf/src/plat/target.C index a1c6ca38..fea3a6f7 100644 --- a/hwpf/src/plat/target.C +++ b/hwpf/src/plat/target.C @@ -295,7 +295,6 @@ fapi_try_exit: fapi2::ReturnCode plat_TargetsInit() { bool b_present = false; - uint32_t c = 0; // Initialise global attribute pointers G_system_attributes_ptr = &G_system_attributes; @@ -405,14 +404,6 @@ fapi_try_exit: G_vec_targets.at(l_beginning_offset+i) = revle64((fapi2::plat_target_handle_t)(target_name.get())); } - // Trace all entries - for (auto tgt_iter : G_vec_targets) - { - FAPI_DBG("G_vec_targets[%u] value=%08X", - c, (uint32_t)(tgt_iter)); - ++c; - } - fapi_try_exit: return fapi2::current_err; } @@ -466,6 +457,7 @@ fapi_try_exit: { if((l_mask >> l_idx) & (l_ecGards)) { + FAPI_DBG("Making %d'th EC non-functional", l_idx); // EC chiplet l_idx is to be marked non-functional fapi2::Target<fapi2::TARGET_TYPE_CORE> l_target = G_vec_targets.at(l_idx + CORE_TARGET_OFFSET); l_target.setFunctional(false); |