summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/utils
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2017-06-11 21:32:04 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-18 10:52:03 -0400
commitd4c08be2b76339d60f098968bfe05f5a34a19c0b (patch)
tree7172f0d5dd28238121bafd489be0618c46258b1c /src/import/chips/p9/procedures/hwp/memory/lib/utils
parenta6109ca9369683e80c2d3e20bd3e1435c594b25f (diff)
downloadtalos-hostboot-d4c08be2b76339d60f098968bfe05f5a34a19c0b.tar.gz
talos-hostboot-d4c08be2b76339d60f098968bfe05f5a34a19c0b.zip
Fix duplicate symbol error when linking mss and cen libs
Change-Id: I010b7fb2a7efbc5e9d2ec20206e82723514b631c Original-Change-Id: Ib643f56d66f844d9ac59a86712622ed9f7453703 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41662 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: LUCAS W. MULKEY <lwmulkey@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44371 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/utils')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C113
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/pos.C71
2 files changed, 0 insertions, 184 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C b/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C
deleted file mode 100644
index 7db26186a..000000000
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C
+++ /dev/null
@@ -1,113 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-
-///
-/// @file c_str.C
-/// @brief Storage for the C-string name of a thing
-///
-// *HWP HWP Owner: Brian Silver <bsilver@us.ibm.com>
-// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com>
-// *HWP Team: Memory
-// *HWP Level: 2
-// *HWP Consumed by: HB:FSP
-
-#include <fapi2.H>
-#include <lib/mss_attribute_accessors.H>
-#include <generic/memory/lib/utils/c_str.H>
-
-using fapi2::TARGET_TYPE_MCBIST;
-using fapi2::TARGET_TYPE_MCA;
-using fapi2::TARGET_TYPE_MCS;
-using fapi2::TARGET_TYPE_DIMM;
-
-using fapi2::FAPI2_RC_SUCCESS;
-
-namespace mss
-{
-
-// Thread local storage for the string we're going to create.
-//TODO RTC:153924 Remove the else case when issue is resolved
-#ifndef PLAT_NO_THREAD_LOCAL_STORAGE
- thread_local char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
-#else
- char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
-#endif
-
-
-template<>
-const char* c_str( const fapi2::template Target<fapi2::TARGET_TYPE_DIMM>& i_target )
-{
- constexpr auto l_max_gen = 3;
- constexpr auto l_max_type = 4;
- static const char* l_map_gen_to_string[l_max_gen] = {"empty", "DDR3", "DDR4"};
- static const char* l_map_type_to_string[l_max_type] = {"empty", "RDIMM", "UDIMM", "LRDIMM"};
- char l_buffer[fapi2::MAX_ECMD_STRING_LEN];
-
- uint8_t l_type = 0;
- uint8_t l_gen = 0;
-
- uint8_t l_value[2][2];
- auto l_mca = i_target.getParent<TARGET_TYPE_MCA>();
- auto l_mcs = l_mca.getParent<TARGET_TYPE_MCS>();
-
- fapi2::toString( i_target, c_str_storage, fapi2::MAX_ECMD_STRING_LEN );
-
- // Had to unroll FAPI_TRY so that fapi2::current_err doesn't get overwritten, causes errors
- // when calling c_str inside of a function that returns fapi2::ReturnCode
- if (FAPI_ATTR_GET(fapi2::ATTR_EFF_DIMM_TYPE, l_mcs, l_value) != FAPI2_RC_SUCCESS)
- {
- goto fapi_try_exit;
- }
-
- l_type = l_value[mss::index(l_mca)][mss::index(i_target)];
-
- if (l_type >= l_max_type)
- {
- goto fapi_try_exit;
- }
-
- // Had to unroll FAPI_TRY so that fapi2::current_err doesn't get overwritten, causes errors
- // when calling c_str inside of a function that returns fapi2::ReturnCode
- if (FAPI_ATTR_GET(fapi2::ATTR_EFF_DRAM_GEN, l_mcs, l_value) != FAPI2_RC_SUCCESS)
- {
- goto fapi_try_exit;
- }
-
- l_gen = l_value[mss::index(l_mca)][mss::index(i_target)];
-
- if (l_gen >= l_max_gen)
- {
- goto fapi_try_exit;
- }
-
- snprintf(l_buffer, fapi2::MAX_ECMD_STRING_LEN, " %s (%s)", l_map_type_to_string[l_type], l_map_gen_to_string[l_gen]);
- return strncat( c_str_storage, l_buffer, fapi2::MAX_ECMD_STRING_LEN - strlen(c_str_storage) );
-
-fapi_try_exit:
- // Probably the best we're going to do ...
- return c_str_storage;
-}
-
-}
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/pos.C b/src/import/chips/p9/procedures/hwp/memory/lib/utils/pos.C
deleted file mode 100644
index 238f22bfe..000000000
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/pos.C
+++ /dev/null
@@ -1,71 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/import/chips/p9/procedures/hwp/memory/lib/utils/pos.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); */
-/* you may not use this file except in compliance with the License. */
-/* You may obtain a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
-/* implied. See the License for the specific language governing */
-/* permissions and limitations under the License. */
-/* */
-/* IBM_PROLOG_END_TAG */
-
-#include <fapi2.H>
-#include <generic/memory/lib/utils/pos.H>
-
-namespace mss
-{
-
-///
-/// @brief Return a DIMM's position from a fapi2 target
-/// @param[in] i_target a target representing the target in question
-/// @return The position relative to the chip
-///
-template<>
-posTraits<fapi2::TARGET_TYPE_DIMM>::pos_type
-pos(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target)
-{
- typedef posTraits<fapi2::TARGET_TYPE_DIMM> TT;
-
- // Proc 0 is DIMM 0-15, proc 2 is 64-79 - 64 is the stride between processors
- constexpr uint64_t DIMM_STRIDE_PER_PROC = 64;
- constexpr uint64_t TOTAL_DIMM = TT::MC_PER_MODULE * TT::MCS_PER_MC * TT::PORTS_PER_MCS * TT::DIMMS_PER_PORT;
-
- TT::pos_type l_pos = 0;
-
- // Using fapi2 rather than mss::find as this is pretty low level stuff.
- const auto l_proc_pos =
- mss::template pos(i_target.getParent<fapi2::TARGET_TYPE_MCA>().getParent<fapi2::TARGET_TYPE_PROC_CHIP>());
-
- if (FAPI_ATTR_GET(fapi2::ATTR_FAPI_POS, i_target, l_pos) != fapi2::FAPI2_RC_SUCCESS)
- {
- goto fapi_try_exit;
- }
-
- // To get the FAPI_POS to the equivilent of ATTR_POS, we need to normalize the fapi_pos value
- // to the processor (stride across which ever processor we're on) and then add in the delta
- // per processor as ATTR_POS isn't processor relative (delta is the total dimm on a processor)
- return ((l_pos - (l_proc_pos * DIMM_STRIDE_PER_PROC)) % TOTAL_DIMM) + (TOTAL_DIMM * l_proc_pos);
-
-fapi_try_exit:
- // If we can't get our position, we're in other trouble
- FAPI_ERR("can't get our fapi position");
- fapi2::Assert(false);
- return 0;
-
-}
-
-}// mss
OpenPOWER on IntegriCloud