diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2018-04-16 17:52:29 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-04-19 17:52:33 -0400 |
commit | 2154ad02364923d5b158825729d6e630ec7cc529 (patch) | |
tree | 7f7c5dc9b411ea75086a96828ca0a358553f52c1 /src/include/usr/fapi2 | |
parent | 47d4e4119f6a196dd61c1b93237d3ff4af7f0cd3 (diff) | |
download | blackbird-hostboot-2154ad02364923d5b158825729d6e630ec7cc529.tar.gz blackbird-hostboot-2154ad02364923d5b158825729d6e630ec7cc529.zip |
Create new HWP Invoker macro that returns the RC
Allow the RC of a HWP to be returned along with the associated
error log. This allows logic to be based on the specific RC if
needed.
Change-Id: I90a78ace2cc4263265940764dffd0691dd56e2f5
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57302
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2')
-rw-r--r-- | src/include/usr/fapi2/plat_hwp_invoker.H | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/plat_hwp_invoker.H b/src/include/usr/fapi2/plat_hwp_invoker.H index a0b335a1e..c19812620 100644 --- a/src/include/usr/fapi2/plat_hwp_invoker.H +++ b/src/include/usr/fapi2/plat_hwp_invoker.H @@ -61,7 +61,7 @@ void hwpLock( bool i_lock ); * parameters. This macro simply calls the FAPI HWP executor macro and converts * the returned fapi::Return code to a HostBoot error log * - * ERRHNDL - errlHndl_t + * ERRHNDL - local errlHndl_t * FUNC - HWP function name * _args_... - Any additional arguments that the HWP requires */ @@ -80,6 +80,32 @@ void hwpLock( bool i_lock ); } /** + * @brief HWP Invoker macro that returns the fapi RC + * + * This macro is called by HostBoot PLAT code to invoke a HW Procedure (HWP). + * The caller must create any necessary fapi::Targets and pass them as + * parameters. This macro simply calls the FAPI HWP executor macro and converts + * the returned fapi::Return code to a HostBoot error log + * + * ERRHNDL - local errlHndl_t + * _RC - local fapi2::ReturnCode + * FUNC - HWP function name + * _args_... - Any additional arguments that the HWP requires + */ + +#define FAPI_INVOKE_HWP_RC(ERRHNDL, _RC, FUNC, _args_...) \ + {\ + fapi2::hwpLock(true); \ + FAPI_EXEC_HWP(_RC, FUNC, ##_args_); \ + ERRHNDL = fapi2::rcToErrl(_RC);\ + if( ERRHNDL ) {\ + ERRHNDL->collectTrace(FAPI_IMP_TRACE_NAME,256);\ + ERRHNDL->collectTrace(FAPI_TRACE_NAME,384);\ + }\ + fapi2::hwpLock(false); \ + } + +/** * @brief Pseudo-HWP Invoker macro * * This macro is called by HostBoot PLAT code to invoke a HW Procedure (HWP) |