diff options
author | Santosh Puranik <santosh.puranik@in.ibm.com> | 2015-11-26 01:46:26 -0600 |
---|---|---|
committer | Gregory S. Still <stillgs@us.ibm.com> | 2015-12-14 08:04:11 -0600 |
commit | 1b30508467a64e4d89312fd6da3ab7bd825eb7d3 (patch) | |
tree | dfd54df8036e5c1ec12839c2b6a8f0607bb3270b /hwpf/include | |
parent | dfcfe34062a28a90dff21a4af21616a00fcb1354 (diff) | |
download | talos-sbe-1b30508467a64e4d89312fd6da3ab7bd825eb7d3.tar.gz talos-sbe-1b30508467a64e4d89312fd6da3ab7bd825eb7d3.zip |
Plat API to apply EQ/EC gards
Change-Id: Ifd019f0dbad3f817e681669a31def5f41c03ed41
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22345
Tested-by: Jenkins Server
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'hwpf/include')
-rw-r--r-- | hwpf/include/fapi2_target.H | 6 | ||||
-rw-r--r-- | hwpf/include/plat/plat_target_utils.H | 8 | ||||
-rw-r--r-- | hwpf/include/plat/target.H | 7 |
3 files changed, 16 insertions, 5 deletions
diff --git a/hwpf/include/fapi2_target.H b/hwpf/include/fapi2_target.H index d2eabf37..f8c458b2 100644 --- a/hwpf/include/fapi2_target.H +++ b/hwpf/include/fapi2_target.H @@ -278,9 +278,9 @@ namespace fapi2 /// @brief Set the target functional setting /// @return Bool whether functional /// - inline void setFunctional(void) + inline void setFunctional(const bool &i_state) { - this->iv_handle.fields.functional = 1; + this->iv_handle.fields.functional = (i_state) ? 1 : 0; return; } @@ -355,7 +355,7 @@ namespace fapi2 #endif } fields; // Union Constructor -// iv_handle(V i_value = 0):value(i_value) {} + iv_handle(V i_value = 0):value(i_value) {} } iv_handle; }; diff --git a/hwpf/include/plat/plat_target_utils.H b/hwpf/include/plat/plat_target_utils.H index e1e360c0..49f1af40 100644 --- a/hwpf/include/plat/plat_target_utils.H +++ b/hwpf/include/plat/plat_target_utils.H @@ -39,10 +39,14 @@ namespace fapi2 /// @brief Function to initialize the G_targets vector based on partial good /// attributes ReturnCode plat_TargetsInit(); - + + /// @brief Function to apply any gard records set (via + // ATTR_EQ_GARD/ATTR_EC_GARD) to mark corresponding targets non functional + ReturnCode plat_ApplyGards(); + /// @brief Function to initialize the G_targets vector based on partial good /// attributes Target<TARGET_TYPE_PROC_CHIP> plat_getChipTarget(); -} +} #endif diff --git a/hwpf/include/plat/target.H b/hwpf/include/plat/target.H index 2f1ec73d..db38d912 100644 --- a/hwpf/include/plat/target.H +++ b/hwpf/include/plat/target.H @@ -59,6 +59,13 @@ namespace fapi2 (K == TARGET_TYPE_EQ) ) != true, "TARGET_TYPE_CORE and TARGET_TYPE_EQ cannot be specified at the same time"); + // Already formed target handle? + if(static_cast<union iv_handle>(Value).fields.type != 0) + { + this->iv_handle.value = Value; + return; + } + this->iv_handle.value = 0; if(K & TARGET_TYPE_PROC_CHIP) { |