summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Still <stillgs@us.ibm.com>2017-09-25 17:45:36 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-10-03 00:05:38 -0400
commite26a4e0173c8cf6413f8c6d2a46bdb68095004e7 (patch)
tree937e9dd091793a5dfe02dfa7e4ab0485b9af5def /src
parente20d02c02db91f1452990aa9706b2873f52825de (diff)
downloadtalos-hostboot-e26a4e0173c8cf6413f8c6d2a46bdb68095004e7.tar.gz
talos-hostboot-e26a4e0173c8cf6413f8c6d2a46bdb68095004e7.zip
PM: p9_pm_init, p9_pm_utils clean-up
- Clarify OCC special wake-up clearing - Use unit_pos for traces vs target addresses - Add ATTR_PM_GLOBAL_FIR_TRACE_EN as an override attribute to control tracing - Enable p9_pm_glob_fir_trace unit above attribute control - Use EXTRALIBS to ensure .so is built Change-Id: I1ea4764ca15862e82acb0751fe867d281cf00c12 RTC: 174349 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46715 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46718 Reviewed-by: Hostboot Team <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>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.mk3
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.mk7
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C18
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_init.mk13
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk15
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_utils.C51
-rw-r--r--src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml17
7 files changed, 75 insertions, 49 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.mk
index 4b5bef48f..339fce589 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -23,4 +23,5 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_pm_cme_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_query_cache_access_state
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.mk
index 3dd881018..1a56da0a7 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
@@ -23,5 +23,8 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_pm_firinit
-#libp9_pm_firinit_DEPLIBS += p9_pm_occ_firinit p9_pm_pba_firinit p9_pm_ppm_firinit p9_pm_cme_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_pba_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_ppm_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_cme_firinit
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
index f8c29e45f..44f921347 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
@@ -207,10 +207,10 @@ fapi2::ReturnCode pm_init(
// ************************************************************************
// Switch off OCC initiated special wakeup on EX to allowSTOP functionality
// ************************************************************************
- FAPI_DBG("Clear off the wakeup");
+ FAPI_DBG("Clearing OCC special wake-up to be sure");
FAPI_TRY(clear_occ_special_wakeups(i_target),
"ERROR: Failed to clear off the wakeup");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "EX targets off special wakeup"));
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "EX targets OCC clear special wakeup"));
// ************************************************************************
// Take all EX chiplets out of special wakeup
@@ -242,7 +242,7 @@ fapi_try_exit:
fapi2::ReturnCode clear_occ_special_wakeups(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
{
- FAPI_INF("Entering clear_occ_special_wakeups...");
+ FAPI_DBG(">> clear_occ_special_wakeups...");
fapi2::buffer<uint64_t> l_data64;
auto l_exChiplets = i_target.getChildren<fapi2::TARGET_TYPE_EX>
@@ -253,15 +253,21 @@ fapi2::ReturnCode clear_occ_special_wakeups(
// Iterate through the EX chiplets
for (auto l_ex_chplt : l_exChiplets)
{
- FAPI_DBG("Clear OCC special wakeup on ex chiplet 0x%08X", l_ex_chplt);
+ fapi2::ATTR_CHIP_UNIT_POS_Type l_ex_num;
+ FAPI_TRY(FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
+ l_ex_chplt,
+ l_ex_num));
+
+ FAPI_DBG("Clear OCC special wakeup on ex chiplet 0x%08X", l_ex_num);
FAPI_TRY(fapi2::getScom(i_target, EX_PPM_SPWKUP_OCC, l_data64),
- "ERROR: Failed to read OCC Spl wkup on EX 0x%08X", l_ex_chplt);
+ "ERROR: Failed to read OCC Spl wkup on EX 0x%08X", l_ex_num);
l_data64.clearBit<0>();
FAPI_TRY(fapi2::putScom(i_target, EX_PPM_SPWKUP_OCC, l_data64),
- "ERROR: Failed to clear OCC Spl wkup on EX 0x%08X", l_ex_chplt);
+ "ERROR: Failed to clear OCC Spl wkup on EX 0x%08X", l_ex_num);
}
fapi_try_exit:
+ FAPI_DBG("<< clear_occ_special_wakeups...");
return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.mk
index b45f95d94..141ea4405 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.mk
@@ -23,9 +23,16 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_pm_init
-libp9_pm_init_DEPLIBS += p9_pm_utils p9_pm_corequad_init p9_pm_ocb_init p9_pm_pss_init
-libp9_pm_init_DEPLIBS += p9_pm_pba_init p9_pm_firinit p9_pm_stop_gpe_init p9_pm_pstate_gpe_init
-libp9_pm_init_DEPLIBS += p9_pm_occ_control p9_pm_reset p9_check_proc_config
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_reset
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_corequad_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_ocb_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_pss_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_stop_gpe_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_pstate_gpe_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_check_proc_config
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_control
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/lib)
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/common/pmlib/include/registers)
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
index 847172354..500c9b31c 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
@@ -22,11 +22,18 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
-
PROCEDURE=p9_pm_reset
-libp9_pm_reset_DEPLIBS += p9_pm_utils p9_pm_occ_firinit p9_pm_firinit p9_pm_occ_control
-libp9_pm_reset_DEPLIBS += p9_pm_pstate_gpe_init p9_pm_stop_gpe_init p9_pm_occ_gpe_init
-libp9_pm_reset_DEPLIBS += p9_pm_corequad_init p9_pm_occ_sram_init p9_pm_ocb_init p9_pm_pss_init
+lib$(PROCEDURE)_DEPLIBS+=p9_pm_utils
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_firinit
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_control
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_gpe_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_pstate_gpe_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_stop_gpe_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_corequad_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_occ_sram_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_ocb_init
+lib$(PROCEDURE)_EXTRALIBS+=p9_pm_pss_init
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/lib)
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/common/pmlib/include/registers)
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_utils.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_utils.C
index fc08bb0a0..bd52528c9 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_utils.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_utils.C
@@ -40,6 +40,7 @@
#include <p9_pm.H>
#include <p9_pm_utils.H>
#include <p9_const_common.H>
+#include <p9_perv_scom_addresses.H>
/// Byte-reverse a 16-bit integer if on a little-endian machine
@@ -114,32 +115,26 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const char* i_msg)
{
- FAPI_INF("p9_pm_glob_fir_trace Enter");
-
-#if 0 // The CONST_UINT64_T definition in P9 const_common.H takes 4 arguments -
- // CONST_UINT64_T(name, expr, unit, meth). Need to figure out the values
- // for "unit" and "meth" for the below declarations.
- CONST_UINT64_T( GLOB_XSTOP_FIR_0x01040000, ULL(0x01040000) );
- CONST_UINT64_T( GLOB_RECOV_FIR_0x01040001, ULL(0x01040001) );
- CONST_UINT64_T( TP_LFIR_0x0104000A, ULL(0x0104000A) );
-#endif
+ FAPI_DBG(">> p9_pm_glob_fir_trace");
+
+ // Multicast read addresses
+ const uint64_t READ_GLOB_XSTOP_FIR_MC = RULL(0x570F001C);
+ const uint64_t READ_GLOB_RECOV_FIR_MC = RULL(0x570F001B);
// Note: i_msg is put on on each record to allow for trace "greps"
// so as to see the "big picture" across when
-
uint8_t l_traceEnFlag = false;
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
fapi2::buffer<uint64_t> l_data64;
-#if 0 // Uncomment when attribute ATTR_PM_GLOBAL_FIR_TRACE_EN is ready
+
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PM_GLOBAL_FIR_TRACE_EN,
FAPI_SYSTEM,
l_traceEnFlag),
"FAPI_ATTR_GET for attribute ATTR_PM_GLOBAL_FIR_TRACE_EN");
-#endif
// Continue if trace is enabled.
- if (false == l_traceEnFlag)
+ if (!l_traceEnFlag)
{
goto fapi_try_exit;
}
@@ -148,11 +143,9 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
// Check for xstops and recoverables and put in the trace
// ******************************************************************
{
-#if 0 // Uncomment when the scom address is defined
FAPI_TRY(fapi2::getScom(i_target,
- READ_GLOBAL_XSTOP_FIR_0x570F001B,
+ READ_GLOB_XSTOP_FIR_MC,
l_data64));
-#endif
if(l_data64)
{
@@ -161,11 +154,9 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
}
{
-#if 0 // Uncomment when the scom address is defined
FAPI_TRY(fapi2::getScom(i_target,
- READ_GLOBAL_RECOV_FIR_0x570F001C,
+ READ_GLOB_RECOV_FIR_MC,
l_data64));
-#endif
if(l_data64)
{
@@ -174,11 +165,9 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
}
{
-#if 0 // Uncomment when the scom address is defined
FAPI_TRY(fapi2::getScom(i_target,
- GLOB_XSTOP_FIR_0x01040000,
+ PERV_TP_XFIR,
l_data64));
-#endif
if(l_data64)
{
@@ -187,11 +176,9 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
}
{
-#if 0 // Uncomment when the scom address is defined
FAPI_TRY(fapi2::getScom(i_target,
- GLOB_RECOV_FIR_0x01040001,
+ PERV_TP_RFIR,
l_data64));
-#endif
if(l_data64)
{
@@ -200,11 +187,9 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
}
{
-#if 0 // Uncomment when the scom address is defined
FAPI_TRY(fapi2::getScom(i_target,
- TP_LFIR_0x0104000A,
+ PERV_TP_LOCAL_FIR,
l_data64));
-#endif
if(l_data64)
{
@@ -213,6 +198,7 @@ fapi2::ReturnCode p9_pm_glob_fir_trace(
}
fapi_try_exit:
+ FAPI_DBG("<< p9_pm_glob_fir_trace");
return fapi2::current_err;
}
@@ -220,7 +206,7 @@ fapi2::ReturnCode special_wakeup_all(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const bool i_enable)
{
- FAPI_INF("special_wakeup_all Enter");
+ FAPI_DBG(">> special_wakeup_all");
fapi2::ReturnCode l_rc;
auto l_exChiplets = i_target.getChildren<fapi2::TARGET_TYPE_EX>
@@ -229,11 +215,16 @@ fapi2::ReturnCode special_wakeup_all(
// For each EX target
for (auto l_ex_chplt : l_exChiplets)
{
- FAPI_DBG("Running special wakeup on ex chiplet 0x%08X ", l_ex_chplt);
+ fapi2::ATTR_CHIP_UNIT_POS_Type l_ex_num;
+ FAPI_TRY(FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
+ l_ex_chplt,
+ l_ex_num));
+ FAPI_DBG("Running special wakeup on ex chiplet 0x%08X ", l_ex_num);
FAPI_TRY( fapi2::specialWakeup( l_ex_chplt, i_enable ) );
}
fapi_try_exit:
+ FAPI_DBG("<< special_wakeup_all");
return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml
index ac8bc6c87..a77e93ffc 100644
--- a/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml
@@ -158,8 +158,6 @@
<writeable/>
<overrideOnly/>
</attribute>
-
-
<!-- ********************************************************************* -->
<attribute>
<id>ATTR_SAFE_MODE_VOLTAGE_MV</id>
@@ -167,7 +165,7 @@
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<description>
Safe mode voltage in mv
- This attribute is used within the hwp to update the
+ This attribute is used within the hwp to update the
VDM config register.
Consumer: p9_setup_evid.C
@@ -2180,4 +2178,17 @@
<overrideOnly/>
</attribute>
<!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_PM_GLOBAL_FIR_TRACE_EN</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+ <description>
+ Enable Global FIR tracing through PM Complex Reset/Initialization
+ </description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <initToZero/>
+ <writeable/>
+ <overrideOnly/>
+ </attribute>
+ <!-- ********************************************************************* -->
</attributes>
OpenPOWER on IntegriCloud