summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2018-06-21 08:16:37 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-07-03 17:13:07 -0400
commit1759af757bd8f9a13386c4fb4624bd93394af67b (patch)
tree630cbf001cf10a15a9c2f939c3c2ec71f2f44808 /src/usr/errl
parente5dfc3ab0ec51ee63205c7064b7b4a4c4b8ba46f (diff)
downloadtalos-hostboot-1759af757bd8f9a13386c4fb4624bd93394af67b.tar.gz
talos-hostboot-1759af757bd8f9a13386c4fb4624bd93394af67b.zip
Add error callouts and other improvements for Node Communications
This code adds bus, hw, code, etc callouts to the appropriate errors. It also cleans up other TODOs, refactors some functions, and applies somes fixes found in testing. Change-Id: I462cdb2c4e313c277a3e0542f740e82ede3313f3 RTC:184518 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61813 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C73
-rw-r--r--src/usr/errl/plugins/errludcallout.H1
2 files changed, 71 insertions, 3 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 0642a301b..f9b0ec870 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -51,6 +51,7 @@
#include <hwas/common/deconfigGard.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/utilFilter.H>
+#include <targeting/common/commontargeting.H>
#include <config.h>
#include <initservice/initserviceif.H>
#include <attributeenums.H>
@@ -377,8 +378,9 @@ void ErrlEntry::addPartCallout(const TARGETING::Target *i_target,
const HWAS::DeconfigEnum i_deconfigState,
const HWAS::GARD_ErrorType i_gardErrorType)
{
- TRACFCOMP(g_trac_errl, ENTER_MRK"addPartCallout(%p, %d, 0x%x)",
- i_target, i_partType, i_priority);
+ TRACFCOMP(g_trac_errl, ENTER_MRK"addPartCallout(%p, %d, 0x%x, %d, 0x%x)",
+ i_target, i_partType, i_priority,
+ i_deconfigState, i_gardErrorType);
const void* pData = nullptr;
uint32_t size = 0;
@@ -437,6 +439,73 @@ void ErrlEntry::addBusCallout(const TARGETING::Target *i_target_endp1,
}
} // addBusCallout
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+void ErrlEntry::addBusCallout(const TARGETING::EntityPath & i_target_endp1,
+ const TARGETING::EntityPath & i_target_endp2,
+ const HWAS::busTypeEnum i_busType,
+ const HWAS::callOutPriority i_priority)
+{
+ char * l_target_endp1_path_str = nullptr;
+ char * l_target_endp2_path_str = nullptr;
+
+ do
+ {
+
+ // Need targeting module loaded before calculating the size of the
+ // EntityPaths. If not loaded, don't make error callout, which
+ // shouldn't be an issue as without targeting only 1 target is
+ // available in the system: TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
+ if(Util::isTargetingLoaded() && TARGETING::targetService().isInitialized())
+ {
+
+ l_target_endp1_path_str = i_target_endp1.toString();
+ l_target_endp2_path_str = i_target_endp2.toString();
+
+ TRACFCOMP(g_trac_errl, ENTER_MRK"addBusCallout(%s, %s, %d, 0x%x)",
+ l_target_endp1_path_str, l_target_endp2_path_str,
+ i_busType, i_priority);
+
+ auto size1 = sizeof(i_target_endp1) -
+ (TARGETING::EntityPath::MAX_PATH_ELEMENTS - i_target_endp1.size()) *
+ sizeof(TARGETING::EntityPath::PathElement);
+
+ auto size2 = sizeof(i_target_endp2) -
+ (TARGETING::EntityPath::MAX_PATH_ELEMENTS - i_target_endp2.size()) *
+ sizeof(TARGETING::EntityPath::PathElement);
+
+ ErrlUserDetailsCallout(&i_target_endp1,
+ size1,
+ &i_target_endp2,
+ size2,
+ i_busType,
+ i_priority).addToLog(this);
+
+ }
+ else
+ {
+ TRACFCOMP(g_trac_errl, ERR_MRK"addBusCallout(ep1, ep2, %d, 0x%x): "
+ "Can't process because targeting isn't loaded",
+ i_busType, i_priority);
+ }
+
+ } while (0);
+
+ if (l_target_endp1_path_str != nullptr)
+ {
+ free(l_target_endp1_path_str);
+ l_target_endp1_path_str = nullptr;
+ }
+
+ if (l_target_endp2_path_str != nullptr)
+ {
+ free(l_target_endp2_path_str);
+ l_target_endp2_path_str = nullptr;
+ }
+
+ return;
+
+} // addBusCallout (with EntityPath inputs)
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
diff --git a/src/usr/errl/plugins/errludcallout.H b/src/usr/errl/plugins/errludcallout.H
index aaae9299f..147407ccd 100644
--- a/src/usr/errl/plugins/errludcallout.H
+++ b/src/usr/errl/plugins/errludcallout.H
@@ -148,7 +148,6 @@ case HWAS::_type: i_parser.PrintString( "Part Type", #_type); break;
case_PART_TYPE(MEM_REF_CLOCK)
case_PART_TYPE(PROC_REF_CLOCK)
case_PART_TYPE(PCI_REF_CLOCK)
- case_PART_TYPE(SMP_CABLE)
default:
i_parser.PrintNumber( "Part Type", "UNKNOWN: 0x%X",
OpenPOWER on IntegriCloud