summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-07-11 15:27:32 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-16 14:14:14 -0500
commit108e5b64916ae16346e6d8b67b0f75468b251062 (patch)
tree153b9a606de073c8a28e360fd127ebc9b1befe56
parent1535c27d4a7a970f3e14ace7cb980ae06820e9ec (diff)
downloadblackbird-hostboot-108e5b64916ae16346e6d8b67b0f75468b251062.tar.gz
blackbird-hostboot-108e5b64916ae16346e6d8b67b0f75468b251062.zip
HWPF: Minor fapi::Target fix and FAPI tracing tweaks
When fapi::Target::set(...) is called to set a Target Handle, the internal cached ecmd string needs to be deleted because it may no longer be correct for the new handle. Also some other minor tracing tweaks here that were requested by the HW team. There is no RTC story for this minor change. Change-Id: I20c6d99faf31c0d84938fb09af053ae1a698bafd Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1339 Tested-by: Jenkins Server Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/hwpf/fapi/fapiTarget.H54
-rw-r--r--src/include/usr/hwpf/fapi/fapiUtil.H48
-rw-r--r--src/usr/hwpf/fapi/fapiReturnCode.C47
-rw-r--r--src/usr/hwpf/fapi/fapiReturnCodeDataRef.C53
-rw-r--r--src/usr/hwpf/fapi/fapiTarget.C48
5 files changed, 124 insertions, 126 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiTarget.H b/src/include/usr/hwpf/fapi/fapiTarget.H
index c5043cb2b..63da687b9 100644
--- a/src/include/usr/hwpf/fapi/fapiTarget.H
+++ b/src/include/usr/hwpf/fapi/fapiTarget.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwpf/fapi/fapiTarget.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwpf/fapi/fapiTarget.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiTarget.H
*
@@ -220,12 +221,7 @@ public:
*/
const char * toEcmdString() const;
-// TODO
-// When eCMD releases the version of this file that has toString as private then
-// all users will be forced to switch to use the improved toEcmdString. Right
-// now, there is a new HWP that uses toString, therefore temporarily move
-// toString back to public.
-//private:
+private:
/**
* @brief Convert a target to an ecmd-format target string
@@ -242,8 +238,6 @@ public:
*/
void toString(char (&o_ecmdString)[MAX_ECMD_STRING_LEN]) const;
-private:
-
/**
* @brief Compare the handle
*
diff --git a/src/include/usr/hwpf/fapi/fapiUtil.H b/src/include/usr/hwpf/fapi/fapiUtil.H
index 53d99f108..2991913c6 100644
--- a/src/include/usr/hwpf/fapi/fapiUtil.H
+++ b/src/include/usr/hwpf/fapi/fapiUtil.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/hwpf/fapi/fapiUtil.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/hwpf/fapi/fapiUtil.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiUtil.H
*
@@ -176,7 +177,8 @@ fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
* istep dispatcher.
* @param[in] i_info Tag to send when at breakpoint
*/
-void fapiBreakPoint( uint32_t i_info);
+
+void fapiBreakPoint(uint32_t i_info);
}
diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C
index 3a2f0e3ed..8a141f519 100644
--- a/src/usr/hwpf/fapi/fapiReturnCode.C
+++ b/src/usr/hwpf/fapi/fapiReturnCode.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/fapi/fapiReturnCode.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/fapi/fapiReturnCode.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiReturnCode.C
*
@@ -44,6 +45,7 @@
* mjjones 03/16/2012 Add type to FFDC data
* mjjones 03/16/2012 Allow different PLAT errors
* mjjones 05/02/2012 Only trace setEcmdError on err
+ * mjjones 07/11/2012 Remove a trace
*/
#include <fapiReturnCode.H>
@@ -127,7 +129,6 @@ ReturnCode & ReturnCode::operator=(const ReturnCode & i_right)
//******************************************************************************
ReturnCode & ReturnCode::operator=(const uint32_t i_rcValue)
{
- FAPI_ERR("Using deprecated ReturnCode function to assign integer");
iv_rcValue = i_rcValue;
// Forget about any associated data
diff --git a/src/usr/hwpf/fapi/fapiReturnCodeDataRef.C b/src/usr/hwpf/fapi/fapiReturnCodeDataRef.C
index 2cc20c747..ac7df403b 100644
--- a/src/usr/hwpf/fapi/fapiReturnCodeDataRef.C
+++ b/src/usr/hwpf/fapi/fapiReturnCodeDataRef.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/fapi/fapiReturnCodeDataRef.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/fapi/fapiReturnCodeDataRef.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiReturnCodeDataRef.C
*
@@ -35,7 +36,8 @@
* mjjones 06/30/2011 Added #include
* mjjones 07/05/2011 Removed const from data
* mjjones 07/25/2011 Added support for FFDC
- * mjjones 09/22/2100 Added support for Error Info
+ * mjjones 09/22/2011 Added support for Error Info
+ * mjjones 07/11/2012 Removed some tracing
*/
#include <string.h>
@@ -79,8 +81,6 @@ ReturnCodeDataRef::~ReturnCodeDataRef()
//******************************************************************************
void ReturnCodeDataRef::incRefCount()
{
- FAPI_DBG("ReturnCodeDataRef::incRefCount: iv_refCount = %d on entry",
- iv_refCount);
iv_refCount++;
}
@@ -89,9 +89,6 @@ void ReturnCodeDataRef::incRefCount()
//******************************************************************************
bool ReturnCodeDataRef::decRefCountCheckZero()
{
- FAPI_DBG("ReturnCodeDataRef::decRefCountCheckZero: iv_refCount = %d on "
- "entry", iv_refCount);
-
if (iv_refCount == 0)
{
FAPI_ERR("ReturnCodeDataRef. Bug. Dec with zero refcount");
diff --git a/src/usr/hwpf/fapi/fapiTarget.C b/src/usr/hwpf/fapi/fapiTarget.C
index b6305e581..71de0c95b 100644
--- a/src/usr/hwpf/fapi/fapiTarget.C
+++ b/src/usr/hwpf/fapi/fapiTarget.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/fapi/fapiTarget.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/fapi/fapiTarget.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiTarget.C
*
@@ -36,6 +37,7 @@
* mjjones 02/07/2012 Remove MBS_CHIPLET
* Add XBUS_ENDPOINT ABUS_ENDPOINT
* mjjones 02/21/2012 Add high performance toEcmdString
+ * mjjones 07/11/2012 Clear iv_pEcmdString on set
*/
#include <fapiTarget.H>
@@ -134,6 +136,8 @@ void * Target::get() const
void Target::set(void * i_pHandle)
{
iv_pHandle = i_pHandle;
+ delete [] iv_pEcmdString;
+ iv_pEcmdString = NULL;
}
//******************************************************************************
OpenPOWER on IntegriCloud