summaryrefslogtreecommitdiffstats
path: root/src/hwpf
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2017-06-08 12:26:50 -0400
committerSachin Gupta <sgupta2m@in.ibm.com>2017-06-19 16:40:26 -0400
commit583e31521556377376bd39c17b1545cff9a0bf8f (patch)
treeac93a7976d80cf54452685d024f378a169137d92 /src/hwpf
parent5fb240cb7b38ca43338026683b347764e17b8988 (diff)
downloadtalos-sbe-583e31521556377376bd39c17b1545cff9a0bf8f.tar.gz
talos-sbe-583e31521556377376bd39c17b1545cff9a0bf8f.zip
plat: Add PLAT_FAPI_ASSERT_NOEXIT
Change-Id: I4f18fa8494eee19fb11e0d5150e0e03878e8ca46 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41543 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/hwpf')
-rw-r--r--src/hwpf/plat_error_scope.H23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hwpf/plat_error_scope.H b/src/hwpf/plat_error_scope.H
index 8a548c44..b745d36c 100644
--- a/src/hwpf/plat_error_scope.H
+++ b/src/hwpf/plat_error_scope.H
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -68,6 +69,28 @@
goto fapi_try_exit; \
}
+///
+/// @brief Create an error log based on __conditional__,
+/// the FFDC gathering function is called and the
+/// trace is output as a FAPI error trace. An error log
+/// is created and returned to the caller via the platform
+/// log pointer of the fapi2::current_err return code object
+/// The caller is responsible for handling the error object.
+///
+/// @param[in] __conditional__ the condition to assert
+/// @param[in] __ffdc__ the FFDC gathering function
+/// @param[in] ... varargs, as input to FAPI_ERR
+///
+/// @note: Plat error, if supported, is stored in RC object. Failing
+/// the __conditional__ test does not cause a branch to fapi_try_exit
+///
+///
+#define PLAT_FAPI_ASSERT_NOEXIT( __conditional__, __ffdc__, ... ) \
+ if (! (__conditional__)) \
+ { \
+ (__ffdc__).execute(); \
+ FAPI_ERR(__VA_ARGS__); \
+ }
///
/// @brief Temporary macro for error label until all are removed.
OpenPOWER on IntegriCloud