diff options
| author | Richard J. Knight <rjknight@us.ibm.com> | 2016-05-04 13:02:10 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-24 17:08:38 -0400 |
| commit | d4c8729be8bab0e04df092acfdd6ad4891789e26 (patch) | |
| tree | 861fdb14e0c68093e7064f226a260dd412ac3f17 /src/include/usr/fapi2/plat_error_scope.H | |
| parent | a09e85f08fb7debf335dcfa3c14b838e791ffd29 (diff) | |
| download | talos-hostboot-d4c8729be8bab0e04df092acfdd6ad4891789e26.tar.gz talos-hostboot-d4c8729be8bab0e04df092acfdd6ad4891789e26.zip | |
Unable to add ffdc to RC after FAPI_ASSERT
-Modified call to FAPI_ASSERT_NOEXIT to commit the error
created due to the conditional failure.
Change-Id: I52be795f2ebe9f7db4e0bf4390c5d213fa05e6f7
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24092
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2/plat_error_scope.H')
| -rw-r--r-- | src/include/usr/fapi2/plat_error_scope.H | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/include/usr/fapi2/plat_error_scope.H b/src/include/usr/fapi2/plat_error_scope.H index fea65c98a..6d80477c2 100644 --- a/src/include/usr/fapi2/plat_error_scope.H +++ b/src/include/usr/fapi2/plat_error_scope.H @@ -46,14 +46,19 @@ /// /// @brief Assert a conditional is true. -/// If it is not, the FFDC gathering function is called and the -/// trace is output as a FAPI error trace. A platform error is -/// created and commited. +/// If it is not, the FFDC gathering function is called and +/// the text in varargs is sent to the hostboot trace +/// as a FAPI_ERR trace. +/// fapi2::current_err will be set to a failing return code +/// as determined by the __ffdc__ class passed in. +/// +/// Note: see the generated file hwp_ffdc_classes.H for +/// details on the __ffdc__ functions +/// /// @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 is stored in RC object /// #define PLAT_FAPI_ASSERT( __conditional__, __ffdc__, ... ) \ if (! (__conditional__)) \ @@ -65,22 +70,25 @@ /// /// @brief Assert a conditional is true. -/// If it is not, the FFDC gathering function is called and the -/// trace is output as a FAPI error trace. A platform error is -/// created but will not be committed. +/// If it is not, the FFDC gathering function is called, A +/// platform error is created and committed. +/// fapi2::current_err will be set to fapi2::FAPI2_RC_SUCCESS +/// and the text in varargs is sent to the hostboot trace as a +/// FAPI_ERR trace. +/// /// @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. In -/// addition, this assert does not cause a branch to the -/// fapi_try_exit lable. +/// @note: This assert does not cause a branch to the +/// fapi_try_exit label. /// #define PLAT_FAPI_ASSERT_NOEXIT( __conditional__, __ffdc__, ... ) \ if (! (__conditional__)) \ { \ __ffdc__.execute( \ - fapi2::FAPI2_ERRL_SEV_UNDEFINED, false); \ + fapi2::FAPI2_ERRL_SEV_UNDEFINED, true); \ + fapi2::current_err = fapi2::FAPI2_RC_SUCCESS; \ FAPI_ERR(__VA_ARGS__); \ } \ |

