Skip to content

Commit

Permalink
UV Support: Updated HWP to set runtime wakeup mode.
Browse files Browse the repository at this point in the history
Commit is an actual implementation of HWP which initializes
runtime wakeup mode of an SMF enabled core.

Change-Id: Id7ba7cace4178805131683e33bc660eede6ff935
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64184
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65455
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: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
premsjha authored and crgeddes committed Aug 29, 2018
1 parent d897f3d commit d808f52
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@
/// *HWP Consumed by: Hostboot
//

#if 0
#include <p9_setup_runtime_wakeup_mode.H>
#include <p9_quad_scom_addresses.H>

enum
{
RUN_TIME_WAKEUP_MODE_BIT_POS = 59,
RUN_TIME_WAKEUP_MODE_BIT_POS = 3,
HV_COMPATIBILITY_MODE_BIT_POS = 4,
};


fapi2::ReturnCode p9_setup_runtime_wakeup_mode(
const fapi2::Target < fapi2::TARGET_TYPE_PROC_CHIP>& i_procTarget )
{
Expand All @@ -58,6 +57,8 @@ fapi2::ReturnCode p9_setup_runtime_wakeup_mode(
l_smfEnabled),
"Error from FAPI_ATTR_GET for attribute ATTR_SMF_ENABLED ");

FAPI_DBG("SMF Status : %s", l_smfEnabled ? "Enabled" : "Disabled" );

for( auto core : l_coreList )
{
FAPI_TRY(fapi2::getScom(i_procTarget, C_CPPM_CPMMR, l_wakeupMode),
Expand All @@ -67,14 +68,15 @@ fapi2::ReturnCode p9_setup_runtime_wakeup_mode(

if( l_smfEnabled )
{
FAPI_DBG("SMF Enabled");
//Wakeup in Ultravisor mode
l_wakeupMode.clearBit( RUN_TIME_WAKEUP_MODE_BIT_POS );
l_wakeupMode.clearBit( HV_COMPATIBILITY_MODE_BIT_POS );
}
else
{
//Wakeup in Hypervisor mode
l_wakeupMode.setBit( RUN_TIME_WAKEUP_MODE_BIT_POS );
l_wakeupMode.setBit( HV_COMPATIBILITY_MODE_BIT_POS );
}

FAPI_TRY(fapi2::putScom(core, C_CPPM_CPMMR, l_wakeupMode),
Expand All @@ -88,5 +90,3 @@ fapi_try_exit:
FAPI_INF("< p9_setup_runtime_wakeup_mode" );
return fapi2::current_err;
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
/* */
/* IBM_PROLOG_END_TAG */

#if 0
#ifndef __RUN_TIME_WAKEUP_MODE_
#define __RUN_TIME_WAKEUP_MODE_

Expand Down Expand Up @@ -55,5 +54,3 @@ extern "C"
} //extern "C"

#endif //__RUN_TIME_WAKEUP_MODE_

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
#PROCEDURE = p9_setup_runtime_wakeup_mode
#$(call BUILD_PROCEDURE)
PROCEDURE = p9_setup_runtime_wakeup_mode
$(call BUILD_PROCEDURE)

0 comments on commit d808f52

Please sign in to comment.