summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSangeetha T S <sangeet2@in.ibm.com>2015-01-19 23:54:54 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-03-26 08:04:30 -0500
commit95978cf38ded9201e9b86c3502647b8a90483845 (patch)
treee35922ab32bb2b91d3a24fdb34d006f27fdaeadc /src
parent0d7ec79752556d06069b37de26cd5aa8ea38e1de (diff)
downloadtalos-hostboot-95978cf38ded9201e9b86c3502647b8a90483845.tar.gz
talos-hostboot-95978cf38ded9201e9b86c3502647b8a90483845.zip
SW292120: FAPI Files required for RTC 117913
Change-Id: I383d24be201e3a42188278bb667dc074d71e7612 CQ:SW292120 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15232 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com> Reviewed-by: Sangeetha T S <sangeet2@in.ibm.com> Tested-by: Sangeetha T S <sangeet2@in.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15248 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/include/usr/hwpf/fapi/fapiErrorInfo.H17
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCode.H14
-rw-r--r--src/usr/hwpf/fapi/fapiErrorInfo.C13
-rw-r--r--src/usr/hwpf/fapi/fapiReturnCode.C39
-rwxr-xr-xsrc/usr/hwpf/test/fapiRcTest.C4
5 files changed, 71 insertions, 16 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
index 7b2b8c800..c92484372 100755
--- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H
+++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiErrorInfo.H,v 1.17 2015-02-02 18:31:53 dcrowell Exp $
+// $Id: fapiErrorInfo.H,v 1.18 2015/03/19 15:46:14 pragupta Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.H,v $
/**
@@ -51,6 +51,7 @@
* /gard of DIMM(s) related
* to MBA
* whs 03/11/2014 Add FW traces to error logs
+ * sangeet2 01/16/2015 Modify ErrorInfoHwCallout
*/
#ifndef FAPIERRORINFO_H_
@@ -63,6 +64,12 @@
namespace fapi
{
+// The type that will hold the position of clock
+typedef int8_t targetPos_t;
+
+// Used incase a valid clock position is not specified
+const targetPos_t INVALID_CLOCK_POS = (-1);
+
/**
* @enum HwCallout
*
@@ -239,11 +246,14 @@ struct ErrorInfoHwCallout
* @param[in] i_hw Hardware to callout
* @param[in] i_calloutPriority Priority of callout
* @param[in] i_refTarget Reference to reference target
+ * @param[in] i_position Incase of a clock callout;
+ * the position of the clock to be called out
*/
ErrorInfoHwCallout(
const HwCallouts::HwCallout i_hw,
const CalloutPriorities::CalloutPriority i_calloutPriority,
- const Target & i_refTarget);
+ const Target & i_refTarget,
+ const targetPos_t i_position = INVALID_CLOCK_POS);
#ifdef FAPI_CUSTOM_MALLOC
/**
@@ -272,6 +282,9 @@ struct ErrorInfoHwCallout
// The reference target (needed for some HW callouts to identify what to
// callout). The target handle is NULL if there is no reference target.
Target iv_refTarget;
+
+ // Incase of a clock callout; the position of the clock to be called out
+ targetPos_t iv_position;
};
/**
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H
index d8a8251b1..83c3b045d 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCode.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,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. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiReturnCode.H,v 1.20 2014/03/12 00:48:25 whs Exp $
+// $Id: fapiReturnCode.H,v 1.21 2015/01/16 11:30:02 sangeet2 Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.H,v $
/**
@@ -58,6 +60,7 @@
* MBA port and dimm number
* mjjones 11/08/2013 Do not define struct in union
* whs 03/11/2014 Add FW traces to error logs
+ * sangeet2 01/16/2015 Modify ErrorInfoEntryHwCallout
*/
#ifndef FAPIRETURNCODE_H_
@@ -302,6 +305,8 @@ public:
uint8_t iv_hw;
uint8_t iv_calloutPriority;
uint8_t iv_refObjIndex;
+ //For a HW callout (clock) the position of the clock
+ uint8_t iv_objPosIndex;
};
struct ErrorInfoEntryProcCallout
@@ -442,11 +447,14 @@ private:
* @param[in] i_hw The hardware to callout
* @param[in] i_priority The priority of the callout
* @param[in] i_refTarget Reference to reference Target
+ * @param[in] i_position Incase of a clock callout;
+ * position of the clock target
*/
void addEIHwCallout(
const HwCallouts::HwCallout i_hw,
const CalloutPriorities::CalloutPriority i_priority,
- const Target & i_refTarget);
+ const Target & i_refTarget,
+ const targetPos_t i_position = INVALID_CLOCK_POS);
/**
* @brief Add a procedure callout to the ErrorInfo
diff --git a/src/usr/hwpf/fapi/fapiErrorInfo.C b/src/usr/hwpf/fapi/fapiErrorInfo.C
index cc6393a15..d674d2907 100644
--- a/src/usr/hwpf/fapi/fapiErrorInfo.C
+++ b/src/usr/hwpf/fapi/fapiErrorInfo.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,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. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiErrorInfo.C,v 1.12 2014/03/12 00:48:05 whs Exp $
+// $Id: fapiErrorInfo.C,v 1.13 2015/01/16 11:27:43 sangeet2 Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.C,v $
/**
@@ -48,6 +50,7 @@
* rjknight 09/24/2013 Support dimm callouts
* based on mba parent target
* whs 03/11/2014 Add FW traces to error logs
+ * sangeet2 01/16/2015 Modify ErrorInfoHwCallout
*/
#include <fapiErrorInfo.H>
@@ -121,8 +124,10 @@ void ErrorInfoFfdc::operator delete(void * i_ptr)
ErrorInfoHwCallout::ErrorInfoHwCallout(
const HwCallouts::HwCallout i_hw,
const CalloutPriorities::CalloutPriority i_calloutPriority,
- const Target & i_refTarget)
-: iv_hw(i_hw), iv_calloutPriority(i_calloutPriority), iv_refTarget(i_refTarget)
+ const Target & i_refTarget,
+ const targetPos_t i_position)
+: iv_hw(i_hw), iv_calloutPriority(i_calloutPriority), iv_refTarget(i_refTarget),
+ iv_position(i_position)
{
}
diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C
index 27d23e9be..a969e785e 100644
--- a/src/usr/hwpf/fapi/fapiReturnCode.C
+++ b/src/usr/hwpf/fapi/fapiReturnCode.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiReturnCode.C,v 1.21 2014/10/27 15:38:22 baiocchi Exp $
+// $Id: fapiReturnCode.C,v 1.22 2015/01/16 11:31:38 sangeet2 Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.C,v $
/**
@@ -60,6 +60,8 @@
* mjjones 08/26/2013 Support HW Callouts
* whs 03/11/2014 Add FW traces to error logs
* whs 07/23/2014 Reduce traces
+ * sangeet2 01/16/2015 Support "position" attribute
+ * for osc callout
*/
#include <fapiReturnCode.H>
@@ -293,6 +295,9 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
static_cast<CalloutPriorities::CalloutPriority>(
i_pEntries[i].hw_callout.iv_calloutPriority);
+ // A l_posIndex of 0xff indicates that it is not a clock callout
+ uint8_t l_posIndex = i_pEntries[i].hw_callout.iv_objPosIndex;
+
// A refIndex of 0xff indicates that there is no reference target
uint8_t l_refIndex = i_pEntries[i].hw_callout.iv_refObjIndex;
@@ -303,7 +308,18 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
FAPI_DBG("addErrorInfo: Adding hw callout with ref, hw:"
" %d, pri: %d",
l_hw, l_pri);
- addEIHwCallout(l_hw, l_pri, *l_pRefTarget);
+
+ if (l_posIndex != 0xff)
+ {
+ const targetPos_t * l_posObj =
+ static_cast<const targetPos_t *>(i_pObjects[l_posIndex]);
+
+ addEIHwCallout(l_hw, l_pri, *l_pRefTarget, *l_posObj);
+ }
+ else
+ {
+ addEIHwCallout(l_hw, l_pri, *l_pRefTarget);
+ }
}
else
{
@@ -311,7 +327,17 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
FAPI_DBG("addErrorInfo: Adding hw callout with no ref, hw:"
" %d, pri: %d",
l_hw, l_pri);
- addEIHwCallout(l_hw, l_pri, l_emptyTarget);
+
+ if (l_posIndex != 0xff)
+ {
+ const targetPos_t * l_posObj =
+ static_cast<const targetPos_t *>(i_pObjects[l_posIndex]);
+ addEIHwCallout(l_hw, l_pri, l_emptyTarget, *l_posObj);
+ }
+ else
+ {
+ addEIHwCallout(l_hw, l_pri, l_emptyTarget);
+ }
}
}
else if (l_type == EI_TYPE_PROCEDURE_CALLOUT)
@@ -513,11 +539,12 @@ void ReturnCode::forgetData()
void ReturnCode::addEIHwCallout(
const HwCallouts::HwCallout i_hw,
const CalloutPriorities::CalloutPriority i_priority,
- const Target & i_refTarget)
+ const Target & i_refTarget,
+ const targetPos_t i_position)
{
// Create an ErrorInfoHwCallout object and add it to the Error Information
ErrorInfoHwCallout * l_pCallout = new ErrorInfoHwCallout(
- i_hw, i_priority, i_refTarget);
+ i_hw, i_priority, i_refTarget, i_position);
getCreateReturnCodeDataRef().getCreateErrorInfo().
iv_hwCallouts.push_back(l_pCallout);
}
diff --git a/src/usr/hwpf/test/fapiRcTest.C b/src/usr/hwpf/test/fapiRcTest.C
index d5c291400..f82de7c10 100755
--- a/src/usr/hwpf/test/fapiRcTest.C
+++ b/src/usr/hwpf/test/fapiRcTest.C
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiRcTest.C,v 1.15 2015-02-02 19:14:33 dcrowell Exp $
+// $Id: fapiRcTest.C,v 1.16 2015/03/18 19:41:51 pragupta Exp $
/**
* @file fapiTargetTest.C
*
@@ -660,10 +660,12 @@ uint32_t rcTest12()
l_entries[5].hw_callout.iv_hw = fapi::HwCallouts::MEM_REF_CLOCK;
l_entries[5].hw_callout.iv_calloutPriority = fapi::CalloutPriorities::LOW;
l_entries[5].hw_callout.iv_refObjIndex = 0xff;
+ l_entries[5].hw_callout.iv_objPosIndex = 0;
l_entries[6].iv_type = fapi::ReturnCode::EI_TYPE_HW_CALLOUT;
l_entries[6].hw_callout.iv_hw = fapi::HwCallouts::FLASH_CONTROLLER_PART;
l_entries[6].hw_callout.iv_calloutPriority = fapi::CalloutPriorities::LOW;
l_entries[6].hw_callout.iv_refObjIndex = 0xff;
+ l_entries[6].hw_callout.iv_objPosIndex = 0;
l_rc.addErrorInfo(l_objects, l_entries, 7);
OpenPOWER on IntegriCloud