From 2784ba6efbbd61160ed1d666f8889d30dfe41ec6 Mon Sep 17 00:00:00 2001 From: Thi Tran Date: Fri, 21 Jul 2017 15:17:54 -0500 Subject: L3 Update - p9_ram_core HWPs Change-Id: I8ac3796714ed1e8a02017cd6321bebcf2270ad54 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43454 Reviewed-by: Joseph J. McGill Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Yang Fan Liu Reviewed-by: James N. Klazynski Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43456 Reviewed-by: Hostboot Team Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- .../chips/p9/procedures/hwp/perv/p9_ram_core.C | 144 +++++++++++---------- .../chips/p9/procedures/hwp/perv/p9_ram_core.H | 35 +++-- .../chips/p9/procedures/hwp/perv/p9_ram_getreg.C | 9 +- .../chips/p9/procedures/hwp/perv/p9_ram_getreg.H | 17 +-- .../chips/p9/procedures/hwp/perv/p9_ram_getspr.C | 8 +- .../chips/p9/procedures/hwp/perv/p9_ram_getspr.H | 13 +- .../chips/p9/procedures/hwp/perv/p9_ram_opcode.C | 8 +- .../chips/p9/procedures/hwp/perv/p9_ram_opcode.H | 11 +- .../chips/p9/procedures/hwp/perv/p9_ram_putreg.C | 8 +- .../chips/p9/procedures/hwp/perv/p9_ram_putreg.H | 17 +-- .../chips/p9/procedures/hwp/perv/p9_ram_putspr.C | 8 +- .../chips/p9/procedures/hwp/perv/p9_ram_putspr.H | 15 ++- .../chips/p9/procedures/hwp/perv/p9_spr_name_map.C | 4 +- .../chips/p9/procedures/hwp/perv/p9_spr_name_map.H | 4 +- 14 files changed, 164 insertions(+), 137 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp') diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.C index bca6b98a9..61a2eeddc 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.C @@ -22,24 +22,26 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -//----------------------------------------------------------------------------------- + +///---------------------------------------------------------------------------- /// /// @file p9_ram_core.C /// @brief Class that implements the base ramming capability /// -//----------------------------------------------------------------------------------- -// *HWP HWP Owner : Liu Yang Fan -// *HWP HWP Backup Owner : Gou Peng Fei -// *HWP FW Owner : Thi Tran -// *HWP Team : Perv -// *HWP Level : 2 -// *HWP Consumed by : SBE +///---------------------------------------------------------------------------- +/// *HWP HWP Owner : Liu Yang Fan +/// *HWP HWP Backup Owner : Gou Peng Fei +/// *HWP FW Owner : Thi Tran +/// *HWP Team : Perv +/// *HWP Level : 3 +/// *HWP Consumed by : SBE + //----------------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------------- #include -#include "p9_quad_scom_addresses.H" -#include "p9_quad_scom_addresses_fld.H" +#include +#include // identifiers for special registers const uint32_t RAM_REG_NIA = 2000; @@ -95,8 +97,6 @@ const uint32_t OPCODE_MTOCRF_FROM_GPR0 = 0x7C100120; const uint32_t OPCODE_MTFSF_FROM_FPR0 = 0xFE00058E; const uint32_t OPCODE_MFVSCR_TO_VR0 = 0x10000604; const uint32_t OPCODE_MTVSCR_FROM_VR0 = 0x10000644; - -// TODO: make sure these special PPC are final version in PC workbook table 9-2 const uint32_t OPCODE_MFNIA_RT = 0x001ac804; const uint32_t OPCODE_MTNIA_LR = 0x4c1e00a4; const uint32_t OPCODE_GPR_MOVE = 0x00000010; @@ -108,25 +108,12 @@ const uint32_t OPCODE_CR_MOVE = 0x00000410; // poll count for check ram status const uint32_t RAM_CORE_STAT_POLL_CNT = 10; -// Scom register field -// TODO: replace the const with FLD macro define when it's ready -const uint32_t C_RAM_MODEREG_ENABLE = 0; -const uint32_t C_RAS_STATUS_CORE_MAINT = 0; -const uint32_t C_THREAD_INFO_VTID0_ACTIVE = 0; -const uint32_t C_RAM_CTRL_VTID = 0; -const uint32_t C_RAM_CTRL_VTID_LEN = 2; -const uint32_t C_RAM_CTRL_PREDECODE = 2; -const uint32_t C_RAM_CTRL_PREDECODE_LEN = 4; -const uint32_t C_RAM_CTRL_INSTRUCTION = 8; -const uint32_t C_RAM_CTRL_INSTRUCTION_LEN = 32; -const uint32_t C_RAM_STATUS_ACCESS_DURING_RECOVERY = 0; -const uint32_t C_RAM_STATUS_COMPLETION = 1; -const uint32_t C_RAM_STATUS_EXCEPTION = 2; - //----------------------------------------------------------------------------------- // Function definitions +// Note: All function doxygen can be found in class definition in header file. //----------------------------------------------------------------------------------- -RamCore::RamCore(const fapi2::Target& i_target, const uint8_t i_thread) +RamCore::RamCore(const fapi2::Target& i_target, + const uint8_t i_thread) { iv_target = i_target; iv_thread = i_thread; @@ -160,38 +147,44 @@ fapi2::ReturnCode RamCore::ram_setup() // set RAM_MODEREG Scom to enable RAM mode FAPI_TRY(fapi2::getScom(iv_target, C_RAM_MODEREG, l_data)); - l_data.setBit(); + l_data.setBit(); FAPI_TRY(fapi2::putScom(iv_target, C_RAM_MODEREG, l_data)); // read RAS_STATUS Scom to check the thread is stopped for ramming l_data.flush<0>(); FAPI_TRY(fapi2::getScom(iv_target, C_RAS_STATUS, l_data)); FAPI_DBG("RAS_STATUS:%#lx", l_data()); - FAPI_TRY(l_data.extractToRight(l_thread_stop, C_RAS_STATUS_CORE_MAINT + 8 * iv_thread, 2)); - + FAPI_TRY(l_data.extractToRight(l_thread_stop, + C_RAS_STATUS_T0_CORE_MAINT + 8 * iv_thread, 2)); FAPI_ASSERT(l_thread_stop == 3, fapi2::P9_RAM_THREAD_NOT_STOP_ERR() + .set_CORE_TARGET(iv_target) .set_THREAD(iv_thread), - "Thread to perform ram is not stopped"); + "Thread to perform ram is not stopped. " + "C_RAS_STATUS reg 0x%.16llX", l_data); // read THREAD_INFO Scom to check the thread is active for ramming l_data.flush<0>(); FAPI_TRY(fapi2::getScom(iv_target, C_THREAD_INFO, l_data)); FAPI_DBG("THREAD_INFO:%#lx", l_data()); - FAPI_TRY(l_data.extractToRight(l_thread_active, C_THREAD_INFO_VTID0_ACTIVE + iv_thread, 1)); + FAPI_TRY(l_data.extractToRight(l_thread_active, + C_THREAD_INFO_VTID0_V + iv_thread, 1)); if (!l_thread_active) { FAPI_TRY(l_data.setBit(C_THREAD_INFO_RAM_THREAD_ACTIVE + iv_thread)); FAPI_TRY(fapi2::putScom(iv_target, C_THREAD_INFO, l_data)); FAPI_TRY(fapi2::getScom(iv_target, C_THREAD_INFO, l_data)); - FAPI_TRY(l_data.extractToRight(l_thread_active, C_THREAD_INFO_VTID0_ACTIVE + iv_thread, 1)); + FAPI_TRY(l_data.extractToRight(l_thread_active, + C_THREAD_INFO_VTID0_V + iv_thread, 1)); } FAPI_ASSERT(l_thread_active, fapi2::P9_RAM_THREAD_INACTIVE_ERR() + .set_CORE_TARGET(iv_target) .set_THREAD(iv_thread), - "Thread to perform ram is inactive"); + "Thread to perform ram is inactive. " + "C_THREAD_INFO reg 0x%.16llX", l_data); iv_ram_enable = true; @@ -206,6 +199,7 @@ fapi2::ReturnCode RamCore::ram_setup() FAPI_TRY(fapi2::getScom(iv_target, C_SPR_MODE, l_data)); l_data.insertFromRight(0xFF); FAPI_TRY(fapi2::putScom(iv_target, C_SPR_MODE, l_data)); + l_data.flush<0>(); FAPI_TRY(fapi2::getScom(iv_target, C_SCOMC, l_data)); l_data.insertFromRight(0); @@ -249,13 +243,15 @@ fapi2::ReturnCode RamCore::ram_cleanup() fapi2::buffer l_data = 0; FAPI_ASSERT(iv_ram_setup, - fapi2::P9_RAM_NOT_SETUP_ERR(), + fapi2::P9_RAM_NOT_SETUP_ERR() + .set_CORE_TARGET(iv_target), "Attempting to cleanup ram without setup before"); // setup SPRC to use SCRO as SPRD FAPI_TRY(fapi2::getScom(iv_target, C_SPR_MODE, l_data)); l_data.insertFromRight(0xFF); FAPI_TRY(fapi2::putScom(iv_target, C_SPR_MODE, l_data)); + l_data.flush<0>(); FAPI_TRY(fapi2::getScom(iv_target, C_SCOMC, l_data)); l_data.insertFromRight(0); @@ -291,7 +287,7 @@ fapi2::ReturnCode RamCore::ram_cleanup() // set RAM_MODEREG Scom to clear RAM mode l_data.flush<0>(); FAPI_TRY(fapi2::getScom(iv_target, C_RAM_MODEREG, l_data)); - l_data.clearBit(); + l_data.clearBit(); FAPI_TRY(fapi2::putScom(iv_target, C_RAM_MODEREG, l_data)); iv_ram_enable = false; @@ -306,7 +302,8 @@ fapi_try_exit: } //----------------------------------------------------------------------------------- -fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, const bool i_allow_mult) +fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, + const bool i_allow_mult) { FAPI_DBG("Start ram opcode"); fapi2::buffer l_data = 0; @@ -324,14 +321,15 @@ fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, const bool i_allo } FAPI_ASSERT(iv_ram_enable, - fapi2::P9_RAM_NOT_SETUP_ERR(), + fapi2::P9_RAM_NOT_SETUP_ERR() + .set_CORE_TARGET(iv_target), "Attempting to ram opcode without enable RAM mode before"); // write RAM_CTRL Scom for ramming the opcode - l_data.insertFromRight(iv_thread); + l_data.insertFromRight(iv_thread); l_predecode = gen_predecode(i_opcode); - l_data.insertFromRight(l_predecode); - l_data.insertFromRight(i_opcode); + l_data.insertFromRight(l_predecode); + l_data.insertFromRight(i_opcode); FAPI_TRY(fapi2::putScom(iv_target, C_RAM_CTRL, l_data)); // poll RAM_STATUS_REG Scom for the completion @@ -342,19 +340,24 @@ fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, const bool i_allo FAPI_TRY(fapi2::getScom(iv_target, C_RAM_STATUS, l_data)); // attempting to ram during recovery - FAPI_ASSERT(!l_data.getBit(), - fapi2::P9_RAM_STATUS_IN_RECOVERY_ERR(), - "Attempting to ram during recovery"); + FAPI_ASSERT(!l_data.getBit(), + fapi2::P9_RAM_STATUS_IN_RECOVERY_ERR() + .set_CORE_TARGET(iv_target), + "Attempting to ram during recovery. " + "C_RAM_STATUS reg 0x%.16llX", l_data); // exception or interrupt - FAPI_ASSERT(!l_data.getBit(), - fapi2::P9_RAM_STATUS_EXCEPTION_ERR(), - "Exception or interrupt happened during ramming"); + FAPI_ASSERT(!l_data.getBit(), + fapi2::P9_RAM_STATUS_EXCEPTION_ERR() + .set_CORE_TARGET(iv_target), + "Exception or interrupt happened during ramming. " + "C_RAM_STATUS reg 0x%.16llX", l_data); // load/store opcode need to check LSU empty and PPC complete if (l_is_load_store) { - if(l_data.getBit() && l_data.getBit()) + if ( l_data.getBit() && + l_data.getBit() ) { FAPI_DBG("ram_opcode:: RAM is done"); break; @@ -362,7 +365,7 @@ fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, const bool i_allo } else { - if(l_data.getBit()) + if ( l_data.getBit() ) { FAPI_DBG("ram_opcode:: RAM is done"); break; @@ -372,8 +375,10 @@ fapi2::ReturnCode RamCore::ram_opcode(const uint32_t i_opcode, const bool i_allo --l_poll_count; FAPI_ASSERT(l_poll_count > 0, - fapi2::P9_RAM_STATUS_POLL_THRESHOLD_ERR(), - "Timeout for ram to complete, poll count expired"); + fapi2::P9_RAM_STATUS_POLL_THRESHOLD_ERR() + .set_CORE_TARGET(iv_target), + "Timeout for ram to complete, poll count expired. " + "C_RAM_STATUS reg 0x%.16llX", l_data); } // ram_cleanup @@ -396,7 +401,6 @@ fapi_try_exit: //----------------------------------------------------------------------------------- uint8_t RamCore::gen_predecode(const uint32_t i_opcode) { - //TODO: make sure they are final version in PC workbook table 9-1 and 9-2 uint8_t l_predecode = 0; uint32_t l_opcode_pattern0 = i_opcode & 0xFC0007FE; uint32_t l_opcode_pattern1 = i_opcode & 0xFC1FFFFE; @@ -438,7 +442,6 @@ uint8_t RamCore::gen_predecode(const uint32_t i_opcode) //----------------------------------------------------------------------------------- bool RamCore::is_load_store(const uint32_t i_opcode) { - //TODO: make sure they are final version in PC workbook table 9-1 bool l_load_store = false; uint32_t l_opcode_pattern0 = i_opcode & 0xFC0007FE; uint32_t l_opcode_pattern1 = i_opcode & 0xFC000000; @@ -462,8 +465,10 @@ bool RamCore::is_load_store(const uint32_t i_opcode) } //----------------------------------------------------------------------------------- -fapi2::ReturnCode RamCore::get_reg(const Enum_RegType i_type, const uint32_t i_reg_num, - fapi2::buffer* o_buffer, const bool i_allow_mult) +fapi2::ReturnCode RamCore::get_reg(const Enum_RegType i_type, + const uint32_t i_reg_num, + fapi2::buffer* o_buffer, + const bool i_allow_mult) { FAPI_DBG("Start get register"); uint32_t l_opcode = 0; @@ -484,8 +489,14 @@ fapi2::ReturnCode RamCore::get_reg(const Enum_RegType i_type, const uint32_t i_r } FAPI_ASSERT(iv_ram_setup, - fapi2::P9_RAM_NOT_SETUP_ERR(), - "Attempting to get register without setup before"); + fapi2::P9_RAM_NOT_SETUP_ERR() + .set_CORE_TARGET(iv_target) + .set_REG_TYPE(i_type) + .set_REG_NUM(i_reg_num) + .set_ALLOW_MULT(i_allow_mult), + "Attempting to cleanup ram without setup before. " + "Reg type: %u, Reg num: %u, Allow Mult: %u", + i_type, i_reg_num, i_allow_mult); //backup GPR0 if it is written if(iv_write_gpr0) @@ -714,7 +725,7 @@ fapi2::ReturnCode RamCore::get_reg(const Enum_RegType i_type, const uint32_t i_r FAPI_ASSERT(false, fapi2::P9_RAM_INVALID_REG_TYPE_ACCESS_ERR() .set_REGTYPE(i_type), - "Type of reg is not supported"); + "Type of reg (0x%.8X) is not supported", i_type); } //restore GPR0 if necessary @@ -747,8 +758,10 @@ fapi_try_exit: } //----------------------------------------------------------------------------------- -fapi2::ReturnCode RamCore::put_reg(const Enum_RegType i_type, const uint32_t i_reg_num, - const fapi2::buffer* i_buffer, const bool i_allow_mult) +fapi2::ReturnCode RamCore::put_reg(const Enum_RegType i_type, + const uint32_t i_reg_num, + const fapi2::buffer* i_buffer, + const bool i_allow_mult) { FAPI_DBG("Start put register"); uint32_t l_opcode = 0; @@ -770,8 +783,9 @@ fapi2::ReturnCode RamCore::put_reg(const Enum_RegType i_type, const uint32_t i_r } FAPI_ASSERT(iv_ram_setup, - fapi2::P9_RAM_NOT_SETUP_ERR(), - "Attempting to put register without setup before"); + fapi2::P9_RAM_NOT_SETUP_ERR() + .set_CORE_TARGET(iv_target), + "Attempting to cleanup ram without setup before"); //backup GPR0 if it is written if(iv_write_gpr0) @@ -1030,7 +1044,7 @@ fapi2::ReturnCode RamCore::put_reg(const Enum_RegType i_type, const uint32_t i_r FAPI_ASSERT(false, fapi2::P9_RAM_INVALID_REG_TYPE_ACCESS_ERR() .set_REGTYPE(i_type), - "Type of reg is not supported"); + "Type of reg (0x%.8X) is not supported", i_type); } //restore GPR0 if necessary @@ -1073,5 +1087,3 @@ fapi_try_exit: FAPI_DBG("Exiting put register"); return first_err; } - - diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.H index 027a118a8..04cea68b7 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_core.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : SBE //----------------------------------------------------------------------------------- @@ -56,7 +56,6 @@ enum Enum_RegType REG_VSR }; - class RamCore { public: @@ -67,7 +66,8 @@ class RamCore /// @param[in] i_target => core target /// @param[in] i_thread => thread number // - RamCore(const fapi2::Target& i_target, const uint8_t i_thread); + RamCore(const fapi2::Target& i_target, + const uint8_t i_thread); //----------------------------------------------------------------------------------- /// @brief Destructor of the class that implements the base ramming capability @@ -75,7 +75,8 @@ class RamCore ~RamCore(); //----------------------------------------------------------------------------------- -/// @brief Enable RAM mode and backup the registers(SCR0/GPR0/GPR1) that will be destroyed later during ramming +/// @brief Enable RAM mode and backup the registers(SCR0/GPR0/GPR1) that +/// will be destroyed later during ramming /// @return FAPI2_RC_SUCCESS if success, else error code. // fapi2::ReturnCode ram_setup(); @@ -84,11 +85,13 @@ class RamCore /// @brief Perform the ram and check ram is done /// @param[in] i_opcode => opcode to ram /// @param[in] i_allow_mult => indicate whether to setup and cleanup -/// true: only perform ram, not to call ram_setup and ram_cleanup +/// true: only perform ram, do not call ram_setup +/// and ram_cleanup /// false: call ram_setup and ram_cleanup /// @return FAPI2_RC_SUCCESS if success, else error code. // - fapi2::ReturnCode ram_opcode(const uint32_t i_opcode, const bool i_allow_mult = false); + fapi2::ReturnCode ram_opcode(const uint32_t i_opcode, + const bool i_allow_mult = false); //----------------------------------------------------------------------------------- /// @brief Clear RAM mode and restore the backup registers @@ -102,11 +105,14 @@ class RamCore /// @param[in] i_reg_num => register nubmer /// @param[out] o_buffer => register value /// @param[in] i_allow_mult => indicate whether to setup and cleanup -/// true: only perform ram, not to call ram_setup and ram_cleanup +/// true: only perform ram, do not call ram_setup +/// and ram_cleanup /// false: call ram_setup and ram_cleanup /// @return FAPI2_RC_SUCCESS if success, else error code. // - fapi2::ReturnCode get_reg(const Enum_RegType i_type, const uint32_t i_reg_num, fapi2::buffer* o_buffer, + fapi2::ReturnCode get_reg(const Enum_RegType i_type, + const uint32_t i_reg_num, + fapi2::buffer* o_buffer, const bool i_allow_mult = false); //----------------------------------------------------------------------------------- @@ -115,11 +121,14 @@ class RamCore /// @param[in] i_reg_num => register nubmer /// @param[in] i_buffer => register value /// @param[in] i_allow_mult => indicate whether to setup and cleanup -/// true: only perform ram, not to call ram_setup and ram_cleanup +/// true: only perform ram, do not call ram_setup +/// and ram_cleanup /// false: call ram_setup and ram_cleanup /// @return FAPI2_RC_SUCCESS if success, else error code. // - fapi2::ReturnCode put_reg(const Enum_RegType i_type, const uint32_t i_reg_num, const fapi2::buffer* i_buffer, + fapi2::ReturnCode put_reg(const Enum_RegType i_type, + const uint32_t i_reg_num, + const fapi2::buffer* i_buffer, const bool i_allow_mult = false); //----------------------------------------------------------------------------------- @@ -130,7 +139,7 @@ class RamCore uint8_t gen_predecode(const uint32_t i_opcode); //----------------------------------------------------------------------------------- -/// @brief Check the opcode is load/store or not +/// @brief Check if the opcode is load/store or not /// @param[in] i_opcode => opcode to ram /// @return TRUE if it is load/store // @@ -144,7 +153,7 @@ class RamCore bool iv_ram_setup; // ram mode is enabled and register backup is done bool iv_ram_err; // error happened during ram bool iv_write_gpr0; // putGPR0 operation is executed - bool iv_write_gpr1; // putGPR1 operatoin is executed + bool iv_write_gpr1; // putGPR1 operation is executed fapi2::buffer iv_backup_buf0; // register backup data fapi2::buffer iv_backup_buf1; // register backup data fapi2::buffer iv_backup_buf2; // register backup data diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.C index e1b5bc5cf..ba74caefb 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -45,20 +45,21 @@ //----------------------------------------------------------------------------------- // Function definitions //----------------------------------------------------------------------------------- +// See doxygen in header file fapi2::ReturnCode p9_ram_getreg(const fapi2::Target& i_target, const uint8_t i_thread, const Enum_RegType i_type, const uint32_t i_reg_num, fapi2::buffer* o_buffer) { - FAPI_INF("Start"); + FAPI_DBG("Start"); // instantiate the basic RamCore class RamCore ram(i_target, i_thread); // call RamCore get_reg method FAPI_TRY(ram.get_reg(i_type, i_reg_num, o_buffer)); fapi_try_exit: - FAPI_INF("End"); + FAPI_DBG("End"); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.H index 2227d0ede..7919cf787 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getreg.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -46,11 +46,12 @@ #include //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode (*p9_ram_getreg_FP_t) (const fapi2::Target& i_target, - const uint8_t i_thread, - const Enum_RegType i_type, - const uint32_t i_reg_num, - fapi2::buffer* o_buffer); +typedef fapi2::ReturnCode (*p9_ram_getreg_FP_t) ( + const fapi2::Target& i_target, + const uint8_t i_thread, + const Enum_RegType i_type, + const uint32_t i_reg_num, + fapi2::buffer* o_buffer); extern "C" { @@ -63,7 +64,7 @@ extern "C" { /// @param[in] i_type => register access type (REG_GPR/REG_FPR/REG_VSR) /// @param[in] i_reg_num => register number /// @param[out] o_buffer => register value -/// @return FAPI_RC_SUCCESS if the setup completes successfully +/// @return FAPI_RC_SUCCESS if the operation completes successfully // fapi2::ReturnCode p9_ram_getreg(const fapi2::Target& i_target, const uint8_t i_thread, diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.C index 2065ca562..0dada7e05 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -50,7 +50,7 @@ fapi2::ReturnCode p9_ram_getspr(const fapi2::Target& i_ const std::string i_name, fapi2::buffer* o_buffer) { - FAPI_INF("Start"); + FAPI_DBG("Start"); uint32_t spr_num = 0; bool l_check_flag = false; @@ -74,7 +74,7 @@ fapi2::ReturnCode p9_ram_getspr(const fapi2::Target& i_ FAPI_TRY(ram.get_reg(REG_SPR, spr_num, o_buffer)); fapi_try_exit: - FAPI_INF("End"); + FAPI_DBG("End"); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.H index 414ba47f6..306fe6a3a 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_getspr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -47,10 +47,11 @@ #include //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode (*p9_ram_getspr_FP_t) (const fapi2::Target& i_target, - const uint8_t i_thread, - const std::string i_name, - fapi2::buffer* o_buffer); +typedef fapi2::ReturnCode (*p9_ram_getspr_FP_t) +(const fapi2::Target& i_target, + const uint8_t i_thread, + const std::string i_name, + fapi2::buffer* o_buffer); extern "C" { diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.C index c13d084c8..1de57cb7f 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -49,14 +49,14 @@ fapi2::ReturnCode p9_ram_opcode(const fapi2::Target& i_ const uint8_t i_thread, const uint32_t i_opcode) { - FAPI_INF("Start"); + FAPI_DBG("Start"); // instantiate the basic RamCore class RamCore ram(i_target, i_thread); // call RamCore ram_opcode method FAPI_TRY(ram.ram_opcode(i_opcode)); fapi_try_exit: - FAPI_INF("End"); + FAPI_DBG("End"); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.H index 1f26e1ccd..8980326a0 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_opcode.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -46,9 +46,10 @@ #include //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode (*p9_ram_opcode_FP_t) (const fapi2::Target& i_target, - const uint8_t i_thread, - const uint32_t i_opcode); +typedef fapi2::ReturnCode (*p9_ram_opcode_FP_t) +(const fapi2::Target& i_target, + const uint8_t i_thread, + const uint32_t i_opcode); extern "C" { diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.C index 0f91c6543..2047ae6ab 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -51,14 +51,14 @@ fapi2::ReturnCode p9_ram_putreg(const fapi2::Target& i_ const uint32_t i_reg_num, const fapi2::buffer* i_buffer) { - FAPI_INF("Start"); + FAPI_DBG("Start"); // instantiate the basic RamCore class RamCore ram(i_target, i_thread); // call RamCore put_reg method FAPI_TRY(ram.put_reg(i_type, i_reg_num, i_buffer)); fapi_try_exit: - FAPI_INF("End"); + FAPI_DBG("End"); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.H index 71ff26b4d..f7f4d971e 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putreg.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -46,11 +46,12 @@ #include //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode (*p9_ram_putreg_FP_t) (const fapi2::Target& i_target, - const uint8_t i_thread, - const Enum_RegType i_type, - const uint32_t i_reg_num, - const fapi2::buffer* i_buffer); +typedef fapi2::ReturnCode (*p9_ram_putreg_FP_t) +(const fapi2::Target& i_target, + const uint8_t i_thread, + const Enum_RegType i_type, + const uint32_t i_reg_num, + const fapi2::buffer* i_buffer); extern "C" { @@ -63,7 +64,7 @@ extern "C" { /// @param[in] i_type => register access type (REG_GPR/REG_FPR/REG_VSR) /// @param[in] i_reg_num => register number /// @param[in] i_buffer => register value -/// @return FAPI_RC_SUCCESS if the setup completes successfully +/// @return FAPI_RC_SUCCESS if the operation completes successfully // fapi2::ReturnCode p9_ram_putreg(const fapi2::Target& i_target, const uint8_t i_thread, diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.C b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.C index c6defb8a9..b4baa9701 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -50,7 +50,7 @@ fapi2::ReturnCode p9_ram_putspr(const fapi2::Target& i_ const std::string i_name, const fapi2::buffer* i_buffer) { - FAPI_INF("Start"); + FAPI_DBG("Start"); uint32_t spr_num = 0; bool l_check_flag = false; @@ -74,7 +74,7 @@ fapi2::ReturnCode p9_ram_putspr(const fapi2::Target& i_ FAPI_TRY(ram.put_reg(REG_SPR, spr_num, i_buffer)); fapi_try_exit: - FAPI_INF("End"); + FAPI_DBG("End"); return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.H b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.H index 9d51e2aa9..153946054 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_ram_putspr.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -47,10 +47,11 @@ #include //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode (*p9_ram_putspr_FP_t) (const fapi2::Target& i_target, - const uint8_t i_thread, - const std::string i_name, - const fapi2::buffer* i_buffer); +typedef fapi2::ReturnCode (*p9_ram_putspr_FP_t) +(const fapi2::Target& i_target, + const uint8_t i_thread, + const std::string i_name, + const fapi2::buffer* i_buffer); extern "C" { @@ -62,7 +63,7 @@ extern "C" { /// @param[in] i_thread => thread number /// @param[in] i_name => register name /// @param[in] i_buffer => register value -/// @return FAPI_RC_SUCCESS if the setup completes successfully +/// @return FAPI_RC_SUCCESS if the operation completes successfully // fapi2::ReturnCode p9_ram_putspr(const fapi2::Target& i_target, const uint8_t i_thread, diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.C b/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.C index 02c75185f..dc58bf0a9 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.H b/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.H index 83102477a..7a5793bdf 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_spr_name_map.H @@ -32,7 +32,7 @@ // *HWP HWP Backup Owner : Gou Peng Fei // *HWP FW Owner : Thi Tran // *HWP Team : Perv -// *HWP Level : 2 +// *HWP Level : 3 // *HWP Consumed by : None (Cronus test only) //----------------------------------------------------------------------------------- @@ -250,7 +250,7 @@ extern "C" { //----------------------------------------------------------------------------------- // Function prototype //----------------------------------------------------------------------------------- -/// @brief Initial the map between SPR name and SPR number +/// @brief Initialize the map between SPR name and SPR number /// @return TRUE if the mapping completes successfully // bool p9_spr_name_map_init(); -- cgit v1.2.1