summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2014-03-10 20:05:03 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-20 15:29:01 -0500
commit7d87c86e14ad803bb295bc4e3e97e42cce20fd08 (patch)
treefc8be61bdf6d445b16f3991c5b67a54ef9dbb97c /src/include
parent6c6ededed27870f024c4e46fecfcdd2b477d30ee (diff)
downloadtalos-hostboot-7d87c86e14ad803bb295bc4e3e97e42cce20fd08.tar.gz
talos-hostboot-7d87c86e14ad803bb295bc4e3e97e42cce20fd08.zip
Ability for FAPI to request FW traces added to error log
Trace buffer IDs are requested through <collectTrace>TRACE_ID</collectTrace> on the FAPI RC. Trace buffer IDs are 'generic' to provide flexibility for the platform to map to specific traces. The colllected trace is limited to a maximum size via a constant. FSP common FAPI files and platform specific code will be updated after initial host boot review. Change-Id: Iabb2ce584cfd76225f84a0617562dbd6d504c70f RTC: 98649 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9464 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/hwpf/fapi/fapiErrorInfo.H63
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCode.H18
2 files changed, 79 insertions, 2 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
index b7818058b..cded70629 100644
--- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H
+++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiErrorInfo.H,v 1.12 2014/02/26 14:50:39 mjjones Exp $
+// $Id: fapiErrorInfo.H,v 1.13 2014/03/12 00:47:58 whs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.H,v $
/**
@@ -48,6 +48,7 @@
* rjknight 09/19/2013 Allow callout/deconfigure
* /gard of DIMM(s) related
* to MBA
+ * whs 03/11/2014 Add FW traces to error logs
*/
#ifndef FAPIERRORINFO_H_
@@ -124,6 +125,23 @@ enum CalloutPriority
}
/**
+ * @enum Enumeration of firmware traces
+ *
+ * This enumeration defines the possible firmware traces to collect
+ */
+namespace CollectTraces
+{
+const uint32_t TRACE_SIZE = 256; // limit collected trace size
+enum CollectTrace
+{
+ FSI = 1,
+ SCOM = 2,
+ SCAN = 3,
+ MBOX = 4,
+};
+}
+
+/**
* @class ErrorInfoFfdc
*
* This class contains a copy of some FFDC data
@@ -473,6 +491,42 @@ struct ErrorInfoChildrenCDG
};
/**
+ * @struct ErrorInfoCollectTrace
+ *
+ * This struct contains trace ID to add to the error log
+ */
+struct ErrorInfoCollectTrace
+{
+ /**
+ * @brief Constructor.
+ *
+ * @param[in] i_trace
+ */
+ ErrorInfoCollectTrace(CollectTraces::CollectTrace i_traceId);
+
+#ifdef FAPI_CUSTOM_MALLOC
+ /**
+ * @brief Overload new operator to use platform-specific allocator
+ *
+ * @param[in] i_sz Size of memory to allocate in bytes
+ *
+ * @return Pointer to allocated memory
+ */
+ static void * operator new(size_t i_sz);
+
+ /**
+ * @brief Overload delete operator to use platform-specific deallocator
+ *
+ * @param[in] i_ptr Pointer to memory previously allocated with new
+ */
+ static void operator delete(void * i_ptr);
+#endif
+
+ // trace
+ CollectTraces::CollectTrace iv_eiTraceId;
+};
+
+/**
* @struct ErrorInfo
*
* This struct defines the error information associated with a fapi::ReturnCode
@@ -540,6 +594,13 @@ struct ErrorInfo
ErrorInfoChildrenCDGItr_t;
typedef std::vector<ErrorInfoChildrenCDG *>::const_iterator
ErrorInfoChildrenCDGCItr_t;
+
+ // Vector of traces to collect
+ std::vector<ErrorInfoCollectTrace *> iv_traces;
+ typedef std::vector<ErrorInfoCollectTrace *>::iterator
+ ErrorInfoCollectTraceItr_t;
+ typedef std::vector<ErrorInfoCollectTrace *>::const_iterator
+ ErrorInfoCollectTraceCItr_t;
};
}
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H
index 37fe73465..dcb396dc9 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCode.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiReturnCode.H,v 1.19 2013/11/11 19:33:31 mjjones Exp $
+// $Id: fapiReturnCode.H,v 1.20 2014/03/12 00:48:25 whs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.H,v $
/**
@@ -57,6 +57,7 @@
* rjknight 09/10/2013 Support DIMM callout from
* 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
*/
#ifndef FAPIRETURNCODE_H_
@@ -280,6 +281,7 @@ public:
EI_TYPE_BUS_CALLOUT = 4,
EI_TYPE_CDG = 5, // Target Callout/Deconfig/GARD
EI_TYPE_CHILDREN_CDG = 6, // Children Callout/Deconfig/GARD
+ EI_TYPE_COLLECT_TRACE = 7,
};
/**
@@ -336,6 +338,11 @@ public:
uint8_t iv_calloutPriority;
};
+ struct ErrorInfoEntryCollectTrace
+ {
+ uint32_t iv_eieTraceId;
+ };
+
struct ErrorInfoEntry
{
uint8_t iv_type; // Value from ErrorInfoType
@@ -347,6 +354,7 @@ public:
ErrorInfoEntryBusCallout bus_callout;
ErrorInfoEntryTargetCDG target_cdg;
ErrorInfoEntryChildrenCDG children_cdg;
+ ErrorInfoEntryCollectTrace collect_trace;
};
};
@@ -510,6 +518,14 @@ private:
const CalloutPriorities::CalloutPriority i_priority,
const uint8_t i_childPort, const uint8_t i_childNum);
+ /**
+ * @brief Add traces to collect to the ErrorInfo
+ *
+ * @param[in] i_trace
+ */
+ void addEICollectTrace(
+ const CollectTraces::CollectTrace i_traceId);
+
// The rcValue
uint32_t iv_rcValue;
OpenPOWER on IntegriCloud