summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-02-19 14:05:55 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-21 10:52:12 -0600
commit86817c8c9cece2024c595c9781aac69a3ddf9e57 (patch)
tree119e813e2e6f91ceb58f3b7910187f9827a115c4 /src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C
parentf4d566d7f5e11db454b4ff4487425dd991095ed9 (diff)
downloadtalos-hostboot-86817c8c9cece2024c595c9781aac69a3ddf9e57.tar.gz
talos-hostboot-86817c8c9cece2024c595c9781aac69a3ddf9e57.zip
INITPROC: Hostboot SW247747 PCBS FSM & Global Xstop/Recoverable Tracing
Change-Id: I3dc94c6c6064c112c08857f816bb234e3dc34535 CQ:SW247747 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9002 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C')
-rw-r--r--src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C63
1 files changed, 51 insertions, 12 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C
index da8b70dd2..25e2291df 100644
--- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C
+++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_utils.C
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pm_utils.C,v 1.2 2014/02/09 02:01:59 stillgs Exp $
+// $Id: p8_pm_utils.C,v 1.3 2014/02/17 02:53:07 stillgs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_utils.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -64,9 +64,10 @@ fapi::ReturnCode
p8_pm_glob_fir_trace(const fapi::Target& i_target,
const char * i_msg)
{
- fapi::ReturnCode rc;
- ecmdDataBufferBase data(64);
- uint64_t address;
+ fapi::ReturnCode rc;
+ ecmdDataBufferBase data(64);
+ uint64_t address;
+ uint8_t trace_en_flag = false;
CONST_UINT64_T( GLOB_XSTOP_FIR_0x01040000 , ULL(0x01040000) );
CONST_UINT64_T( GLOB_RECOV_FIR_0x01040001 , ULL(0x01040001) );
@@ -78,6 +79,19 @@ p8_pm_glob_fir_trace(const fapi::Target& i_target,
// Note: i_msg is put on on each record to allow for trace "greps"
// so as to see the "big picture" across when
+ rc = FAPI_ATTR_GET(ATTR_PM_GLOBAL_FIR_TRACE_EN, NULL, trace_en_flag);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_GLOBAL_FIR_TRACE_EN with rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+
+ // If trace is not enabled, leave.
+ if (!trace_en_flag)
+ {
+ break;
+ }
+
// ******************************************************************
// Check for xstops and recoverables and put in the trace
// ******************************************************************
@@ -144,16 +158,30 @@ p8_pm_pcbs_fsm_trace_chip(const fapi::Target& i_target,
{
fapi::ReturnCode rc;
ecmdDataBufferBase data(64);
-
+ uint8_t trace_en_flag = false;
+
std::vector<fapi::Target> l_exChiplets;
uint8_t l_ex_number = 0;
do
{
- rc = fapiGetChildChiplets(i_target,
- fapi::TARGET_TYPE_EX_CHIPLET,
- l_exChiplets,
- TARGET_STATE_FUNCTIONAL);
+ rc = FAPI_ATTR_GET(ATTR_PM_PCBS_FSM_TRACE_EN, NULL, trace_en_flag);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_PCBS_FSM_TRACE_EN with rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+
+ // If trace is not enabled, leave.
+ if (!trace_en_flag)
+ {
+ break;
+ }
+
+ rc = fapiGetChildChiplets(i_target,
+ fapi::TARGET_TYPE_EX_CHIPLET,
+ l_exChiplets,
+ TARGET_STATE_FUNCTIONAL);
if (rc)
{
FAPI_ERR("fapiGetChildChiplets with rc = 0x%x", (uint32_t)rc);
@@ -201,10 +229,24 @@ p8_pm_pcbs_fsm_trace ( const fapi::Target& i_target,
fapi::ReturnCode rc;
ecmdDataBufferBase data(64);
uint64_t address;
+ uint8_t trace_en_flag = false;
uint64_t ex_offset;
do
{
+ rc = FAPI_ATTR_GET(ATTR_PM_PCBS_FSM_TRACE_EN, NULL, trace_en_flag);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_PCBS_FSM_TRACE_EN with rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+
+ // If trace is not enabled, leave.
+ if (!trace_en_flag)
+ {
+ break;
+ }
+
ex_offset = i_ex_number * 0x01000000;
// Note: i_msg is put on on each record to allow for trace "greps"
@@ -254,9 +296,6 @@ p8_pm_pcbs_fsm_trace ( const fapi::Target& i_target,
return rc;
}
-
-
-
} //end extern
#endif // _P8_PM_UTILS_H_
OpenPOWER on IntegriCloud