diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2016-12-02 08:00:47 -0600 |
---|---|---|
committer | spashabk-in <shakeebbk@in.ibm.com> | 2016-12-20 05:18:52 -0600 |
commit | 29b7d0553f27aa1007527dc8c19a78ce034f094f (patch) | |
tree | f650c6f7dc53826e2523ca7c0a5c679276fa766f /src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C | |
parent | 7f238f63fc3dd671db7a83bf1892680eb678d15b (diff) | |
download | talos-sbe-29b7d0553f27aa1007527dc8c19a78ce034f094f.tar.gz talos-sbe-29b7d0553f27aa1007527dc8c19a78ce034f094f.zip |
Modify initCompiler to use FAPI_TRY in generated procedures
-Update code generation to wrap getScom/putScom getSpy/putSpy
calls in FAPI_TRY macro to save space and be consistient with
the existing hwp procedure style.
Change-Id: I37975ec424b2b369cec200ddef8a05e650954c38
RTC:165557
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33557
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33561
Reviewed-by: Hostboot Team <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/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C | 58 |
1 files changed, 9 insertions, 49 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C index bd27ff8f..716db93f 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C @@ -35,68 +35,28 @@ constexpr auto literal_0xA858009775100008 = 0xA858009775100008; fapi2::ReturnCode p9_core_scom(const fapi2::Target<fapi2::TARGET_TYPE_CORE>& TGT0) { - fapi2::ReturnCode l_rc = 0; - - do { fapi2::buffer<uint64_t> l_scom_buffer; { - l_rc = fapi2::getScom( TGT0, 0x20010a43ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x20010a43ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x20010a43ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0x4301D70000AB7696, 0, 64, 0 ); - l_rc = fapi2::putScom(TGT0, 0x20010a43ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x20010a43ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x20010a43ull, l_scom_buffer)); } { - l_rc = fapi2::getScom( TGT0, 0x20010a46ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x20010a46ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x20010a46ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0x0000000000000000, 0, 64, 0 ); - l_rc = fapi2::putScom(TGT0, 0x20010a46ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x20010a46ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x20010a46ull, l_scom_buffer)); } { - l_rc = fapi2::getScom( TGT0, 0x20010a47ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x20010a47ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x20010a47ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0xA858009775100008, 0, 64, 0 ); - l_rc = fapi2::putScom(TGT0, 0x20010a47ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x20010a47ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x20010a47ull, l_scom_buffer)); } - } - while(0); - - return l_rc; + }; +fapi_try_exit: + return fapi2::current_err; } |