summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/hwp.mk6
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.C128
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.xml21
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data_attributes.xml69
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/n1_10_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/p8_10_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/p8_20_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/s1_10_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/s1_13_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/s1_20_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_attributes/s1_21_tp_dbg_data.attributes28
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.C250
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_data_accessors/proc_tp_dbg_data_errors.xml61
-rw-r--r--src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk31
14 files changed, 643 insertions, 119 deletions
diff --git a/src/usr/hwpf/hwp/hwp.mk b/src/usr/hwpf/hwp/hwp.mk
index ea430923d..6af31d0b7 100644
--- a/src/usr/hwpf/hwp/hwp.mk
+++ b/src/usr/hwpf/hwp/hwp.mk
@@ -5,7 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2011,2014
+# Contributors Listed Below - COPYRIGHT 2014,2015
+# [+] 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.
@@ -41,4 +43,4 @@ include ${ROOTPATH}/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk
include ${ROOTPATH}/src/usr/hwpf/hwp/utility_procedures/utils.mk
include ${ROOTPATH}/src/usr/hwpf/hwp/chip_accessors/chip.mk
include ${ROOTPATH}/src/usr/hwpf/hwp/spd_accessors/spd.mk
-
+include ${ROOTPATH}/src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.C b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.C
index d376b9c7b..4ff333420 100644
--- a/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.C
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.C
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: proc_tp_collect_dbg_data.C,v 1.6 2014/08/04 16:00:49 thi Exp $
+// $Id: proc_tp_collect_dbg_data.C,v 1.7 2014/10/03 20:25:36 jmcgill Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_tp_collect_dbg_data.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2012
@@ -47,66 +47,8 @@
//------------------------------------------------------------------------------
const uint32_t PROC_TP_COLLECT_DBG_DATA_FSI_SHIFT_CTRL = 0x00000043;
-
const uint32_t PERV_VITL_CHAIN_RING_ADDRESS = 0x0103800C;
-
-// Murano DD1.x
-const uint32_t PERV_VITL_CHAIN_LENGTH_MDD1 = 2310;
-const uint32_t TP_VITL_SPY_LENGTH_MDD1 = 576;
-const std::pair<uint32_t,uint32_t> TP_VITL_SPY_OFFSETS_MDD1[] =
-{
- std::make_pair(1197, 1260),
- std::make_pair(1342, 1392),
- std::make_pair(1401, 1403),
- std::make_pair(1641, 1641),
- std::make_pair(1644, 1665),
- std::make_pair(1667, 1679),
- std::make_pair(1688, 1943),
- std::make_pair(1963, 2005),
- std::make_pair(1503, 1520),
- std::make_pair( 849, 889),
- std::make_pair( 744, 807)
-};
-
-// Murano DD2.x
-const uint32_t PERV_VITL_CHAIN_LENGTH_MDD2 = 2288;
-const uint32_t TP_VITL_SPY_LENGTH_MDD2 = 590;
-const std::pair<uint32_t,uint32_t> TP_VITL_SPY_OFFSETS_MDD2[] =
-{
- std::make_pair(1176, 1239),
- std::make_pair(1321, 1344),
- std::make_pair(1365, 1371),
- std::make_pair(1430, 1456),
- std::make_pair(1465, 1467),
- std::make_pair(1479, 1479),
- std::make_pair(1482, 1503),
- std::make_pair(1505, 1524),
- std::make_pair(1533, 1788),
- std::make_pair(1808, 1850),
- std::make_pair(1893, 1910),
- std::make_pair( 849, 889),
- std::make_pair( 744, 807)
-};
-
-// Venice / Naples DD1.x
-const uint32_t PERV_VITL_CHAIN_LENGTH_VN = 2773;
-const uint32_t TP_VITL_SPY_LENGTH_VN = 590;
-const std::pair<uint32_t,uint32_t> TP_VITL_SPY_OFFSETS_VN[] =
-{
- std::make_pair( 209, 272),
- std::make_pair( 354, 377),
- std::make_pair( 398, 404),
- std::make_pair( 463, 489),
- std::make_pair( 498, 500),
- std::make_pair( 512, 512),
- std::make_pair( 515, 536),
- std::make_pair( 538, 557),
- std::make_pair( 566, 821),
- std::make_pair( 841, 883),
- std::make_pair( 926, 943),
- std::make_pair(2608, 2648),
- std::make_pair(2503, 2566)
-};
+const uint32_t TP_VITL_SPY_MAX_SPY_RANGES = 24;
//------------------------------------------------------------------------------
@@ -122,11 +64,11 @@ fapi::ReturnCode proc_tp_collect_dbg_data(const fapi::Target & i_target,
fapi::ReturnCode rc;
uint32_t rc_ecmd = 0;
- uint8_t chip_type;
- uint8_t dd_level;
ecmdDataBufferBase ring_data;
ecmdDataBufferBase spy_data;
- std::vector<std::pair<uint32_t, uint32_t> > spy_offsets;
+ uint32_t ring_length;
+ uint32_t spy_length;
+ uint32_t spy_offsets[TP_VITL_SPY_MAX_SPY_RANGES];
ecmdDataBufferBase fsi_data(32);
ecmdDataBufferBase scom_data(64);
@@ -259,48 +201,30 @@ fapi::ReturnCode proc_tp_collect_dbg_data(const fapi::Target & i_target,
break;
}
- // obtain chip type/EC
- rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_NAME, &i_target, chip_type);
+ // obtain ring/spy attribute data
+ rc = FAPI_ATTR_GET(ATTR_PROC_PERV_VITL_LENGTH, &i_target, ring_length);
if (rc)
{
- FAPI_ERR("proc_tp_collect_dbg_data: Error from FAPI_ATTR_GET_PRIVILEGED (ATTR_NAME)");
+ FAPI_ERR("proc_tp_collect_dbg_data: Error from FAPI_ATTR_GET (ATTR_PROC_PERV_VITL_LENGTH)");
break;
}
- rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_EC, &i_target, dd_level);
+ rc = FAPI_ATTR_GET(ATTR_PROC_TP_VITL_SPY_LENGTH, &i_target, spy_length);
if (rc)
{
- FAPI_ERR("proc_tp_collect_dbg_data: Error from FAPI_ATTR_GET_PRIVILEGED (ATTR_EC)");
+ FAPI_ERR("proc_tp_collect_dbg_data: Error from FAPI_ATTR_GET (ATTR_PROC_TP_VITL_SPY_LENGTH)");
break;
}
- // configure ring/spy data buffers & spy extraction offsets based on CT/EC
- if ((chip_type == fapi::ENUM_ATTR_NAME_MURANO) && (dd_level < 0x20))
- {
- rc_ecmd |= ring_data.setBitLength(PERV_VITL_CHAIN_LENGTH_MDD1);
- rc_ecmd |= spy_data.setBitLength(TP_VITL_SPY_LENGTH_MDD1);
- spy_offsets.assign(TP_VITL_SPY_OFFSETS_MDD1, TP_VITL_SPY_OFFSETS_MDD1 + (sizeof(TP_VITL_SPY_OFFSETS_MDD1) / sizeof(TP_VITL_SPY_OFFSETS_MDD1[0])));
- }
- else if ((chip_type == fapi::ENUM_ATTR_NAME_MURANO) && (dd_level >= 0x20))
- {
- rc_ecmd |= ring_data.setBitLength(PERV_VITL_CHAIN_LENGTH_MDD2);
- rc_ecmd |= spy_data.setBitLength(TP_VITL_SPY_LENGTH_MDD2);
- spy_offsets.assign(TP_VITL_SPY_OFFSETS_MDD2, TP_VITL_SPY_OFFSETS_MDD2 + (sizeof(TP_VITL_SPY_OFFSETS_MDD2) / sizeof(TP_VITL_SPY_OFFSETS_MDD2[0])));
- }
- else if ((chip_type == fapi::ENUM_ATTR_NAME_VENICE) ||
- (chip_type == fapi::ENUM_ATTR_NAME_NAPLES))
- {
- rc_ecmd |= ring_data.setBitLength(PERV_VITL_CHAIN_LENGTH_VN);
- rc_ecmd |= spy_data.setBitLength(TP_VITL_SPY_LENGTH_VN);
- spy_offsets.assign(TP_VITL_SPY_OFFSETS_VN, TP_VITL_SPY_OFFSETS_VN + (sizeof(TP_VITL_SPY_OFFSETS_VN) / sizeof(TP_VITL_SPY_OFFSETS_VN[0])));
- }
- else
+
+ rc = FAPI_ATTR_GET(ATTR_PROC_TP_VITL_SPY_OFFSETS, &i_target, spy_offsets);
+ if (rc)
{
- FAPI_ERR("proc_tp_collect_dbg_data: Unsupported CT/EC combination!");
- const uint8_t CT = chip_type;
- const uint8_t EC = dd_level;
- FAPI_SET_HWP_ERROR(rc, RC_TP_COLLECT_DBG_DATA_UNSUPPORTED_CHIP);
+ FAPI_ERR("proc_tp_collect_dbg_data: Error from FAPI_ATTR_GET (ATTR_PROC_TP_VITL_SPY_OFFSETS)");
break;
}
+
+ rc_ecmd |= ring_data.setBitLength(ring_length);
+ rc_ecmd |= spy_data.setBitLength(spy_length);
if (rc_ecmd)
{
FAPI_ERR("proc_tp_collect_dbg_data: Error 0x%x sizing FFDC data buffers",
@@ -319,15 +243,23 @@ fapi::ReturnCode proc_tp_collect_dbg_data(const fapi::Target & i_target,
// extract spy data from ring image
uint32_t spy_offset_curr = 0;
- for (std::vector<std::pair<uint32_t, uint32_t> >::const_iterator offset = spy_offsets.begin();
- offset != spy_offsets.end();
- offset++)
+ for (uint32_t spy_offset_index = 0;
+ spy_offset_index < TP_VITL_SPY_MAX_SPY_RANGES;
+ spy_offset_index++)
{
- uint32_t chunk_size = (offset->second - offset->first + 1);
+ if (spy_offsets[spy_offset_index] == 0xFFFFFFFF)
+ {
+ break;
+ }
+
+ uint32_t first = ((spy_offsets[spy_offset_index] >> 16) & 0xFFFF);
+ uint32_t second = (spy_offsets[spy_offset_index] & 0xFFFF);
+
+ uint32_t chunk_size = (second - first + 1);
rc_ecmd |= spy_data.insert(ring_data,
spy_offset_curr,
chunk_size,
- offset->first);
+ first);
spy_offset_curr += chunk_size;
}
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.xml b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.xml
index 7f7565438..3bf185a89 100644
--- a/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.xml
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2014 -->
+<!-- Contributors Listed Below - COPYRIGHT 2014,2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -22,7 +22,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: proc_tp_collect_dbg_data.xml,v 1.4 2014/08/03 21:12:47 jmcgill Exp $ -->
+<!-- $Id: proc_tp_collect_dbg_data.xml,v 1.5 2014/10/03 20:25:09 jmcgill Exp $ -->
<!-- Error definitions for proc_tp_collect_dbg_data procedure -->
<hwpErrors>
<!-- *********************************************************************** -->
@@ -38,21 +38,4 @@
<collectTrace>MBOX</collectTrace>
</hwpError>
<!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_TP_COLLECT_DBG_DATA_UNSUPPORTED_CHIP</rc>
- <description>
- Procedure: proc_tp_collect_dbg_data
- </description>
- <ffdc>CT</ffdc>
- <ffdc>EC</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- <collectTrace>FSI</collectTrace>
- <collectTrace>SCOM</collectTrace>
- <collectTrace>SCAN</collectTrace>
- <collectTrace>MBOX</collectTrace>
- </hwpError>
- <!-- *********************************************************************** -->
</hwpErrors>
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data_attributes.xml b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data_attributes.xml
new file mode 100644
index 000000000..5a0689f0d
--- /dev/null
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data_attributes.xml
@@ -0,0 +1,69 @@
+<!-- IBM_PROLOG_BEGIN_TAG -->
+<!-- This is an automatically generated prolog. -->
+<!-- -->
+<!-- $Source: src/usr/hwpf/hwp/slave_sbe/proc_tp_collect_dbg_data/proc_tp_collect_dbg_data_attributes.xml $ -->
+<!-- -->
+<!-- OpenPOWER HostBoot Project -->
+<!-- -->
+<!-- Contributors Listed Below - COPYRIGHT 2015 -->
+<!-- [+] 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 -->
+<!-- $Id: proc_tp_collect_dbg_data_attributes.xml,v 1.1 2014/10/03 20:24:15 jmcgill Exp $ -->
+<!-- proc_tp_collect_dbg_data_attributes.xml -->
+<attributes>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_PROC_PERV_VITL_LENGTH</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>Length of perv_vitl_chain ring in bits
+ creator: platform
+ firmware notes:
+ </description>
+ <valueType>uint32</valueType>
+ <platInit/>
+ <persistRuntime/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_PROC_TP_VITL_SPY_LENGTH</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>Length of tp_vitl FFDC spy in bits
+ creator: platform
+ firmware notes:
+ </description>
+ <valueType>uint32</valueType>
+ <platInit/>
+ <persistRuntime/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_PROC_TP_VITL_SPY_OFFSETS</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>Set of ring offsets which form tp_vitl FFDC spy definition.
+ High-order 16 bits provide starting bit of range.
+ Low-order 16 bits provide ending bit of range.
+ Entries will be processed from index 0 to 23 (value of 0xFFFFFF should be used to signify last entry to process).
+ creator: platform
+ firmware notes:
+ </description>
+ <valueType>uint32</valueType>
+ <array>24</array>
+ <platInit/>
+ <persistRuntime/>
+ </attribute>
+ <!-- ********************************************************************* -->
+</attributes>
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/n1_10_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/n1_10_tp_dbg_data.attributes
new file mode 100644
index 000000000..caddb9c11
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/n1_10_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: n1_10_tp_dbg_data.attributes,v 1.2 2015/05/08 00:31:00 thi Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2773
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 590
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x00D10110
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x01620179
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x018E0194
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x01CF01E9
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x01F201F4
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x02000200
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x02030218
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x021A022D
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x02360335
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x03490373
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x039E03AF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0x0A300A58
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x09C70A06
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/p8_10_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/p8_10_tp_dbg_data.attributes
new file mode 100644
index 000000000..075c2c36a
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/p8_10_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: p8_10_tp_dbg_data.attributes,v 1.1 2014/10/03 19:58:34 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2773
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 590
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x00D10110
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x01620179
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x018E0194
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x01CF01E9
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x01F201F4
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x02000200
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x02030218
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x021A022D
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x02360335
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x03490373
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x039E03AF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0x0A300A58
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x09C70A06
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/p8_20_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/p8_20_tp_dbg_data.attributes
new file mode 100644
index 000000000..8a2bd5727
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/p8_20_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: p8_20_tp_dbg_data.attributes,v 1.1 2014/10/03 19:59:22 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2773
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 590
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x00D10110
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x01620179
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x018E0194
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x01CF01E9
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x01F201F4
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x02000200
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x02030218
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x021A022D
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x02360335
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x03490373
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x039E03AF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0x0A300A58
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x09C70A06
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/s1_10_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_10_tp_dbg_data.attributes
new file mode 100644
index 000000000..98697ffa3
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_10_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: s1_10_tp_dbg_data.attributes,v 1.1 2014/10/03 20:00:14 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2310
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 576
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x04AD04EC
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x053E0570
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x0579057B
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x06690669
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x066C0681
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x0683068F
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x06980797
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x07AB07D5
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x05DF05F0
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x03510379
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x02E80327
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/s1_13_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_13_tp_dbg_data.attributes
new file mode 100644
index 000000000..18d8899c1
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_13_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: s1_13_tp_dbg_data.attributes,v 1.1 2014/10/03 20:00:46 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2310
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 576
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x04AD04EC
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x053E0570
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x0579057B
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x06690669
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x066C0681
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x0683068F
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x06980797
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x07AB07D5
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x05DF05F0
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x03510379
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x02E80327
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/s1_20_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_20_tp_dbg_data.attributes
new file mode 100644
index 000000000..14c1c862b
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_20_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: s1_20_tp_dbg_data.attributes,v 1.1 2014/10/03 20:01:19 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2288
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 590
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x049804D7
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x05290540
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x0555055B
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x059605B0
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x05B905BB
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x05C705C7
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x05CA05DF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x05E105F4
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x05FD06FC
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x0710073A
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x07650776
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0x03510379
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x02E80327
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_attributes/s1_21_tp_dbg_data.attributes b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_21_tp_dbg_data.attributes
new file mode 100644
index 000000000..1d95c38cf
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_attributes/s1_21_tp_dbg_data.attributes
@@ -0,0 +1,28 @@
+# $Id: s1_21_tp_dbg_data.attributes,v 1.1 2014/10/03 20:01:54 jmcgill Exp $
+
+ATTR_PROC_PERV_VITL_LENGTH u32 2288
+ATTR_PROC_TP_VITL_SPY_LENGTH u32 590
+ATTR_PROC_TP_VITL_SPY_OFFSETS[0] u32[24] 0x049804D7
+ATTR_PROC_TP_VITL_SPY_OFFSETS[1] u32[24] 0x05290540
+ATTR_PROC_TP_VITL_SPY_OFFSETS[2] u32[24] 0x0555055B
+ATTR_PROC_TP_VITL_SPY_OFFSETS[3] u32[24] 0x059605B0
+ATTR_PROC_TP_VITL_SPY_OFFSETS[4] u32[24] 0x05B905BB
+ATTR_PROC_TP_VITL_SPY_OFFSETS[5] u32[24] 0x05C705C7
+ATTR_PROC_TP_VITL_SPY_OFFSETS[6] u32[24] 0x05CA05DF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[7] u32[24] 0x05E105F4
+ATTR_PROC_TP_VITL_SPY_OFFSETS[8] u32[24] 0x05FD06FC
+ATTR_PROC_TP_VITL_SPY_OFFSETS[9] u32[24] 0x0710073A
+ATTR_PROC_TP_VITL_SPY_OFFSETS[10] u32[24] 0x07650776
+ATTR_PROC_TP_VITL_SPY_OFFSETS[11] u32[24] 0x03510379
+ATTR_PROC_TP_VITL_SPY_OFFSETS[12] u32[24] 0x02E80327
+ATTR_PROC_TP_VITL_SPY_OFFSETS[13] u32[24] 0xFFFFFFFF
+ATTR_PROC_TP_VITL_SPY_OFFSETS[14] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[15] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[16] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[17] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[18] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[19] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[20] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[21] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[22] u32[24] 0x00000000
+ATTR_PROC_TP_VITL_SPY_OFFSETS[23] u32[24] 0x00000000
diff --git a/src/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.C b/src/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.C
new file mode 100644
index 000000000..dc6aa588b
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.C
@@ -0,0 +1,250 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015 */
+/* [+] 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 */
+// $Id: getTpDbgDataAttr.C,v 1.1 2015/05/07 20:11:12 thi Exp $
+/**
+ * @file getTpDbgDataAttr.C
+ *
+ * @brief Fetch TP Debug data attributes based on chip EC
+ * from static arrays (fapiTpDbgDataAttr.H)
+ *
+ */
+
+#include <stdint.h>
+#include <fapi.H>
+#include <getTpDbgDataAttr.H>
+
+extern "C"
+{
+
+/**
+ * @brief Internal utility function to verify if TP_DBG data is found for
+ * input target's type and EC level.
+ * Output the index number of the data array for the target.
+ *
+ * @param i_fapiTarget cpu target
+ * @param o_index The index where TP_DBG data is held for this target.
+ *
+ * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success,
+ * relevant error code for failure.
+ */
+fapi::ReturnCode verifyTpDbgData(const fapi::Target &i_fapiTarget,
+ uint32_t & o_index)
+{
+ FAPI_INF("verifyTpDbgData: entry" );
+
+ // Define and initialize variables
+ uint8_t l_attrDdLevel = 0;
+ fapi::TargetType l_targetType = fapi::TARGET_TYPE_NONE;
+ fapi::ATTR_NAME_Type l_chipType = 0x00;
+ fapi::ReturnCode rc;
+
+ do
+ {
+ // Verify input target is a processor
+ l_targetType = i_fapiTarget.getType();
+ if (l_targetType != fapi::TARGET_TYPE_PROC_CHIP)
+ {
+ FAPI_ERR("verifyTpDbgData: Invalid target type passed on "
+ "invocation. target type=0x%08X ",
+ static_cast<uint32_t>(l_targetType));
+ // Return error on get attr
+ fapi::TargetType & TARGET_TYPE = l_targetType;
+ FAPI_SET_HWP_ERROR(rc, RC_GET_TP_DBG_DATA_PARAMETER_ERR );
+ break;
+ }
+
+ // Get chip type
+ rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_NAME,
+ &i_fapiTarget,
+ l_chipType);
+ if (rc)
+ {
+ FAPI_ERR("verifyTpDbgData: FAPI_ATTR_GET_PRIVILEGED of "
+ "ATTR_NAME failed w/rc=0x%08X",
+ static_cast<uint32_t>(rc));
+ break;
+ }
+
+ // Get EC level
+ rc = FAPI_ATTR_GET_PRIVILEGED(ATTR_EC,
+ &i_fapiTarget,
+ l_attrDdLevel);
+ // Exit on error
+ if (rc)
+ {
+ FAPI_ERR("verifyTpDbgData: FAPI_ATTR_GET_PRIVILEGED of "
+ "ATTR_EC failed w/rc=0x%08X", static_cast<uint32_t>(rc));
+ break;
+ }
+
+ FAPI_INF("verifyTpDbgData: Chip type=0x%02x EC=0x%02x ",
+ l_chipType, l_attrDdLevel);
+
+ // Murano DD1.2 and DD1.0 are equivalent in terms of engineering data
+ if ((l_chipType == fapi::ENUM_ATTR_NAME_MURANO) &&
+ (l_attrDdLevel == 0x12))
+ {
+ FAPI_INF("verifyTpDbgData: Treating EC1.2 like EC1.0");
+ l_attrDdLevel = 0x10;
+ }
+
+ FAPI_INF("verifyTpDbgData: chiptype=0x%x EC=0x%x", l_chipType, l_attrDdLevel);
+ // Use chip & ec to select array entry and selection attr to select
+ // data array entry
+ o_index = 0;
+ uint32_t ii = 0;
+ for (ii = 0;
+ ii < (sizeof(TP_DBG_DATA_array) / sizeof(TP_DBG_DATA_ATTR));
+ ii++)
+ {
+ if ((TP_DBG_DATA_array[ii].l_ATTR_CHIPTYPE == l_chipType) &&
+ (TP_DBG_DATA_array[ii].l_ATTR_EC == l_attrDdLevel))
+ {
+ o_index = ii;
+ break;
+ }
+ }
+
+ // No match found
+ if (ii == (sizeof(TP_DBG_DATA_array)/sizeof(TP_DBG_DATA_ATTR)))
+ {
+ FAPI_ERR("verifyTpDbgData: No match found for chiptype=0x%x "
+ "EC=0x%x", l_chipType, l_attrDdLevel);
+ // Return error on get attr
+ fapi::ATTR_NAME_Type & CHIP_NAME = l_chipType;
+ uint8_t & CHIP_EC = l_attrDdLevel;
+ FAPI_SET_HWP_ERROR(rc, RC_GET_TP_DBG_DATA_ERR );
+ break;
+ }
+
+ } while (0);
+
+ FAPI_INF("verifyTpDbgData: exit rc=0x%x",
+ static_cast<uint32_t>(rc) );
+ return rc;
+}
+
+
+/**
+ * @brief Get processor TP VITL spy length for the specified target CPU.
+ * See doxygen in .H file
+ */
+fapi::ReturnCode getPervVitlRingLengthAttr(const fapi::Target &i_fapiTarget,
+ uint32_t (&o_ringLength))
+{
+ FAPI_INF("getPervVitlRingLengthAttr: entry" );
+
+ // Initialize return values to 0x00
+ fapi::ReturnCode rc;
+ uint32_t l_dataIndex = 0;
+ o_ringLength = 0;
+
+ // Get attributes, currently there's only one array entry
+ do
+ {
+ rc = verifyTpDbgData(i_fapiTarget, l_dataIndex);
+ if (rc)
+ {
+ FAPI_ERR("getPervVitlRingLengthAttr: verifyTpDbgData() returns error");
+ break;
+ }
+ o_ringLength = TP_DBG_DATA_array [l_dataIndex].l_ATTR_RING_LENGTH;
+ FAPI_INF("getPervVitlRingLengthAttr: index %d, o_ringLength=%d",
+ l_dataIndex, o_ringLength);
+ } while (0);
+
+ FAPI_INF("getPervVitlRingLengthAttr: exit rc=0x%x",
+ static_cast<uint32_t>(rc) );
+ return rc;
+}
+
+
+/**
+ * @brief Get processor PERV VITL ring length for the specified target CPU.
+ * See doxygen in .H file
+ */
+fapi::ReturnCode getTpVitlSpyLengthAttr(const fapi::Target &i_fapiTarget,
+ uint32_t (&o_spyLength))
+{
+ FAPI_INF("getTpVitlSpyLengthAttr: entry" );
+
+ // Initialize return values to 0x00
+ uint32_t l_dataIndex = 0;
+ fapi::ReturnCode rc;
+
+ // Get attributes, currently there's only one array entry
+ do
+ {
+ rc = verifyTpDbgData(i_fapiTarget, l_dataIndex);
+ if (rc)
+ {
+ FAPI_ERR("getTpVitlSpyLengthAttr: verifyTpDbgData() returns error");
+ break;
+ }
+ o_spyLength = TP_DBG_DATA_array [l_dataIndex].l_ATTR_SPY_LENGTH;
+ FAPI_INF("getTpVitlSpyLengthAttr: index %d, o_spyLength=%d",
+ l_dataIndex, o_spyLength);
+ } while (0);
+
+ FAPI_INF("getTpVitlSpyLengthAttr: exit rc=0x%x",
+ static_cast<uint32_t>(rc) );
+ return rc;
+}
+
+
+/**
+ * @brief Get processor TP VITL spy offsets for the specified target CPU.
+ * See doxygen in .H file
+ */
+fapi::ReturnCode getTpVitlSpyOffsetAttr(const fapi::Target &i_fapiTarget,
+ uint32_t (&o_data)[SPY_OFFSET_SIZE])
+{
+ FAPI_INF("getTpVitlSpyOffsetAttr: entry" );
+
+ // Initialize return values to 0x00
+ fapi::ReturnCode rc;
+ uint32_t l_dataIndex = 0;
+ memset(o_data, 0x00, sizeof(o_data));
+
+ // Get attributes, currently there's only one array entry
+ do
+ {
+ rc = verifyTpDbgData(i_fapiTarget, l_dataIndex);
+ if (rc)
+ {
+ FAPI_ERR("getTpVitlSpyOffsetAttr: verifyTpDbgData() returns error");
+ break;
+ }
+ memcpy(o_data, TP_DBG_DATA_array[l_dataIndex].l_ATTR_TP_DBG_DATA,
+ sizeof(o_data));
+ } while (0);
+
+ FAPI_INF("getTpVitlSpyOffsetAttr: exit rc=0x%x",
+ static_cast<uint32_t>(rc) );
+ return rc;
+}
+
+} // extern "C"
+
diff --git a/src/usr/hwpf/hwp/tp_dbg_data_accessors/proc_tp_dbg_data_errors.xml b/src/usr/hwpf/hwp/tp_dbg_data_accessors/proc_tp_dbg_data_errors.xml
new file mode 100644
index 000000000..1efc6218c
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_data_accessors/proc_tp_dbg_data_errors.xml
@@ -0,0 +1,61 @@
+<!-- IBM_PROLOG_BEGIN_TAG -->
+<!-- This is an automatically generated prolog. -->
+<!-- -->
+<!-- $Source: src/usr/hwpf/hwp/tp_dbg_data_accessors/proc_tp_dbg_data_errors.xml $ -->
+<!-- -->
+<!-- OpenPOWER HostBoot Project -->
+<!-- -->
+<!-- Contributors Listed Below - COPYRIGHT 2015 -->
+<!-- [+] 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 -->
+<!-- $Id: proc_tp_dbg_data_errors.xml,v 1.1 2015/05/07 20:11:12 thi Exp $ -->
+<!-- Error definitions for getTpDbgDataAttr procedures -->
+
+<hwpErrors>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_GET_TP_DBG_DATA_ERR</rc>
+ <description>No matching entry was found for requested chip type and EC level.</description>
+ <ffdc>CHIP_NAME</ffdc>
+ <ffdc>CHIP_EC</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_GET_TP_DBG_DATA_PARAMETER_ERR</rc>
+ <description>Invalid target type passed on invocation.</description>
+ <ffdc>TARGET_TYPE</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <hwpError>
+ <rc>RC_GET_TP_DEBUG_DATA_ERR</rc>
+ <description>No matching entry was found for requested chip type and EC level.</description>
+ <ffdc>CHIP_NAME</ffdc>
+ <ffdc>CHIP_EC</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+</hwpErrors>
diff --git a/src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk b/src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk
new file mode 100644
index 000000000..ec4dc60dd
--- /dev/null
+++ b/src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk
@@ -0,0 +1,31 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/hwp/tp_dbg_data_accessors/tp_dbg.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2015
+# [+] 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
+
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/tp_dbg_data_accessors
+
+VPATH += ${HWPPATH}/tp_dbg_data_accessors
+
+OBJS += getTpDbgDataAttr.o
+
OpenPOWER on IntegriCloud