summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2017-09-18 11:44:46 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-09-21 10:35:12 -0400
commit932b398a055ef7ae4dce5f1d3a8803ba8d2fb8a8 (patch)
tree0501c1d6ca6149c020201a1c159c400e310bd5d0 /src/include
parent4b2859591b45f9b83c6856c4d242e20fc236ebf0 (diff)
downloadtalos-hostboot-932b398a055ef7ae4dce5f1d3a8803ba8d2fb8a8.tar.gz
talos-hostboot-932b398a055ef7ae4dce5f1d3a8803ba8d2fb8a8.zip
Move targ info getter func for sbechipOp into common code
Before we only needed to get the target info for the scan chipop, now more sbe chip ops require this functionality so we are moving it to common code Change-Id: Ifbb680db27c5975ee216d5d21ff78192c9ea2d34 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46345 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/sbeio/sbe_psudd.H11
-rw-r--r--src/include/usr/sbeio/sbe_utils.H59
2 files changed, 59 insertions, 11 deletions
diff --git a/src/include/usr/sbeio/sbe_psudd.H b/src/include/usr/sbeio/sbe_psudd.H
index d4fd7e642..5b2983c39 100644
--- a/src/include/usr/sbeio/sbe_psudd.H
+++ b/src/include/usr/sbeio/sbe_psudd.H
@@ -517,17 +517,6 @@ class SbePsu
*/
static const uint64_t MAX_PSU_SHORT_TIMEOUT_NS=90*NS_PER_SEC; //=90sec
-
- enum SBE_TARGET_TYPES {
-
- SBE_TARGET_TYPE_PROC = 0x00,
- SBE_TARGET_TYPE_EX = 0x01,
- SBE_TARGET_TYPE_PERV = 0x02,
- SBE_TARGET_TYPE_MCS = 0x03,
- SBE_TARGET_TYPE_TOTAL ,
- SBE_TARGET_TYPE_UNKNOWN = 0xFF
- };
-
/**
* @brief get SBE FFDC buffer size
*
diff --git a/src/include/usr/sbeio/sbe_utils.H b/src/include/usr/sbeio/sbe_utils.H
new file mode 100644
index 000000000..848586e62
--- /dev/null
+++ b/src/include/usr/sbeio/sbe_utils.H
@@ -0,0 +1,59 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/sbeio/sbe_utils.H $ */
+/* */
+/* 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 */
+#ifndef __SBE_UTILS_H
+#define __SBE_UTILS_H
+
+#include <targeting/common/commontargeting.H>
+
+/**
+ * @file sbe_utils.H
+ * @brief Common sbeio utilities for both PSU and FIFO
+ */
+
+namespace SBEIO
+{
+
+ enum SBE_TARGET_TYPES {
+ SBE_TARGET_TYPE_PROC = 0x00,
+ SBE_TARGET_TYPE_EX = 0x01,
+ SBE_TARGET_TYPE_PERV = 0x02,
+ SBE_TARGET_TYPE_MCS = 0x03,
+ SBE_TARGET_TYPE_TOTAL ,
+ SBE_TARGET_TYPE_UNKNOWN = 0xFF
+ };
+
+ /// @brief translates HB target types to SBE target type groups
+ /// @param[in] i_hbTarget includes the HB target type
+ /// @return SBEIO::SBE_TARGET_TYPES returns SBE_TARGET_TYPE_UNKNOWN in error
+ SBE_TARGET_TYPES translateToSBETargetType(TARGETING::Target * i_hbTarget);
+
+ /// @brief returns a ChipletID for a give target
+ /// @param[in] i_hbTarget includes the HB target type
+ /// @return: ChipletID for i_hbTarget target
+ uint8_t getChipletIDForSBE(TARGETING::Target * i_hbTarget);
+
+}
+
+#endif // __SBE_UTILS_H \ No newline at end of file
OpenPOWER on IntegriCloud