From 1e66d91947125473e6c3db9a47c480b0fe5290f3 Mon Sep 17 00:00:00 2001 From: Prasad Bg Ranganath Date: Tue, 21 Mar 2017 00:44:25 -0500 Subject: SBE:GETRING: Code optimization for getring chiop performance Change-Id: I1fd32f833f197d94a98e971e23c815775ec628a2 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38189 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: AMIT J. TENDOLKAR --- src/hwpf/include/plat/plat_hw_access.H | 14 +------------ src/hwpf/src/plat/plat_hw_access.C | 36 ---------------------------------- 2 files changed, 1 insertion(+), 49 deletions(-) (limited to 'src/hwpf') diff --git a/src/hwpf/include/plat/plat_hw_access.H b/src/hwpf/include/plat/plat_hw_access.H index 23637c10..55c84f98 100644 --- a/src/hwpf/include/plat/plat_hw_access.H +++ b/src/hwpf/include/plat/plat_hw_access.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -116,18 +116,6 @@ namespace fapi2 fapi2::ReturnCode getRing_setup(const uint32_t i_ringAddress, const fapi2::RingMode i_ringMode); - // This function read the 64 bit data from the hardware - // @param[in] i_ringAddress - absolute ring address - // @param [out]: 64 bit data - // @param [in] i_bitShiftValue - Bit shift value that needs to rotate - // @note- If the ring length is divisble by 64, then bitshift will always be - // 64, else need to store the ring_length mod 64 and send that value in the - // last iteration. - // @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. - fapi2::ReturnCode getRing_granule_data(const uint32_t i_ringAddress, - uint64_t *o_data, - const uint32_t i_bitShiftValue); - // This function verify the check word data is matching or not and will // clean up the scan region data // @param[in] i_ringAddress - absolute ring address diff --git a/src/hwpf/src/plat/plat_hw_access.C b/src/hwpf/src/plat/plat_hw_access.C index ffab1c60..8508eda1 100644 --- a/src/hwpf/src/plat/plat_hw_access.C +++ b/src/hwpf/src/plat/plat_hw_access.C @@ -103,42 +103,6 @@ ReturnCode getRing_setup(const uint32_t i_ringAddress, return l_rc; } -ReturnCode getRing_granule_data(const uint32_t i_ringAddress, - uint64_t *o_data, - const uint32_t i_bitShiftValue) -{ - fapi2::ReturnCode l_rc = FAPI2_RC_SUCCESS; - uint32_t l_chipletId = i_ringAddress & 0xFF000000; - - fapi2::Target l_proc; - - uint32_t l_scomAddress = 0x00038000; - l_scomAddress |= l_chipletId; - - do - { - fapi2::buffer l_ringData; - l_rc = fapi2::getScom(l_proc, l_scomAddress, l_ringData); - if(l_rc != fapi2::FAPI2_RC_SUCCESS) - { - break; - } - *o_data = l_ringData; - - l_scomAddress = 0x00038000 | i_bitShiftValue; - l_scomAddress |= l_chipletId; - - l_rc = fapi2::getScom(l_proc, l_scomAddress, l_ringData); - if(l_rc != fapi2::FAPI2_RC_SUCCESS) - { - break; - } - } while(0); - - return l_rc; -} - - ReturnCode getRing_verifyAndcleanup(const uint32_t i_ringAddress, const RingMode i_ringMode) { -- cgit v1.2.1