summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2016-08-25 14:04:06 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-02-10 21:47:59 -0500
commitd3f9062210984c54fe50f9d55ad3aa7abfd3c82c (patch)
treeb59a3da890d8ba889130a485e6dae618cec3dd7a /src/import
parente8e8287ce9d90a4858646b14d9cb67a82340b8ea (diff)
downloadblackbird-hostboot-d3f9062210984c54fe50f9d55ad3aa7abfd3c82c.tar.gz
blackbird-hostboot-d3f9062210984c54fe50f9d55ad3aa7abfd3c82c.zip
cache/core/l2_stopclocks updates
patchset 1: skip l2_stopclocks if ex_select is 0 patchset 2: check power state before execute hwp patchset 3: fix syntax typos from patch 2 update patchset 4: add chiplet accessibility check patchset 5: add possible counter to CME PCBMUX patchset 6: add skipping message on check patchset 7: change polling timout method patchset 8: add a missing comma patchset 9: fix ffdc patchset 10:roll back cme pcbmux counter until check to ensure cme accessibility patchset 11:rebased patchset 12:initial checkin of ppe state handling patchset 13:checkin new clk_ctrl_state procedure patchset 14:add attribute xml for new procedure patchset 15:fix calling the p9_common_clk_ctrl_state patchset 16:Matt rebase patchset 17:Warning instead of fail with error on check delete common C file, include only header Change-Id: Ia4dd029b5bbe80e4d16595c645f5592ba9a002aa Original-Change-Id: I14c9480ac0931ac7f8b456f193148ceb3b939947 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28808 Dev-Ready: YUE DU <daviddu@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: Matt K. Light <mklight@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36112 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/cache/p9_hcd_l2_stopclocks.C74
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_hcd_cache_stopclocks_errors.xml46
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_hcd_core_stopclocks_errors.xml54
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_hcd_l2_stopclocks_errors.xml46
4 files changed, 60 insertions, 160 deletions
diff --git a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_l2_stopclocks.C b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_l2_stopclocks.C
index 2c625af25..95628127f 100644
--- a/src/import/chips/p9/procedures/hwp/cache/p9_hcd_l2_stopclocks.C
+++ b/src/import/chips/p9/procedures/hwp/cache/p9_hcd_l2_stopclocks.C
@@ -42,6 +42,7 @@
#include <p9_misc_scom_addresses.H>
#include <p9_quad_scom_addresses.H>
#include <p9_hcd_common.H>
+#include <p9_common_clk_ctrl_state.H>
#include "p9_hcd_l2_stopclocks.H"
//------------------------------------------------------------------------------
@@ -50,8 +51,10 @@
enum P9_HCD_L2_STOPCLOCKS_CONSTANTS
{
- L2_CLK_SYNC_TIMEOUT_IN_MS = 1,
- L2_CLK_STOP_TIMEOUT_IN_MS = 1
+ CACHE_L2_CLK_SYNC_POLLING_HW_NS_DELAY = 10000,
+ CACHE_L2_CLK_SYNC_POLLING_SIM_CYCLE_DELAY = 320000,
+ CACHE_L2_CLK_STOP_POLLING_HW_NS_DELAY = 10000,
+ CACHE_L2_CLK_STOP_POLLING_SIM_CYCLE_DELAY = 320000
};
//------------------------------------------------------------------------------
@@ -64,8 +67,10 @@ p9_hcd_l2_stopclocks(
const p9hcd::P9_HCD_EX_CTRL_CONSTANTS i_select_ex)
{
FAPI_INF(">>p9_hcd_l2_stopclocks: ex[%d]", i_select_ex);
+ fapi2::ReturnCode l_rc;
fapi2::buffer<uint64_t> l_data64;
- uint32_t l_timeout;
+ fapi2::buffer<uint64_t> l_temp64;
+ uint32_t l_loops1ms;
uint64_t l_region_clock = 0;
uint64_t l_l2sync_clock = 0;
uint64_t l_l2mask_pscom = 0;
@@ -75,7 +80,7 @@ p9_hcd_l2_stopclocks(
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_perv,
l_attr_chip_unit_pos));
-// l_attr_chip_unit_pos = l_attr_chip_unit_pos - p9hcd::PERV_TO_QUAD_POS_OFFSET;
+// l_attr_chip_unit_pos = l_attr_chip_unit_pos - p9hcd::PERV_TO_QUAD_POS_OFFSET;
l_attr_chip_unit_pos = l_attr_chip_unit_pos - 0x10;
if (i_select_ex & p9hcd::EVEN_EX)
@@ -96,8 +101,35 @@ p9_hcd_l2_stopclocks(
// Prepare to stop L2 clocks
// -------------------------
- FAPI_DBG("Assert L2 pscom masks via RING_FENCE_MASK_LATCH_REG[2/3,10/11]");
- FAPI_TRY(putScom(i_target, EQ_RING_FENCE_MASK_LATCH_REG, l_l2mask_pscom));
+ FAPI_DBG("Check PM_RESET_STATE_INDICATOR via GPMMR[15]");
+ FAPI_TRY(getScom(i_target, EQ_PPM_GPMMR_SCOM, l_data64));
+
+ if (!l_data64.getBit<15>())
+ {
+ FAPI_DBG("Gracefully turn off power management, if fail, continue anyways");
+ /// @todo suspend_pm()
+ }
+
+ FAPI_DBG("Check cache clock controller status");
+ l_rc = p9_common_clk_ctrl_state<fapi2::TARGET_TYPE_EQ>(i_target);
+
+ if (l_rc)
+ {
+ FAPI_INF("Clock controller of this cache chiplet is inaccessible, return");
+ goto fapi_try_exit;
+ }
+
+ FAPI_DBG("Check PERV clock status for access to CME via CLOCK_STAT[4]");
+ FAPI_TRY(getScom(i_target, EQ_CLOCK_STAT_SL, l_data64));
+
+ FAPI_DBG("Check PERV fence status for access to CME via CPLT_CTRL1[4]");
+ FAPI_TRY(getScom(i_target, EQ_CPLT_CTRL1, l_temp64));
+
+ if (l_data64.getBit<4>() == 0 && l_temp64.getBit<4>() == 0)
+ {
+ FAPI_DBG("Assert L2 pscom masks via RING_FENCE_MASK_LATCH_REG[2/3,10/11]");
+ FAPI_TRY(putScom(i_target, EQ_RING_FENCE_MASK_LATCH_REG, l_l2mask_pscom));
+ }
// -------------------------------
// Stop L2 clocks
@@ -113,28 +145,26 @@ p9_hcd_l2_stopclocks(
FAPI_TRY(putScom(i_target, EQ_CLK_REGION, l_data64));
FAPI_DBG("Poll for L2 clocks stopped via CPLT_STAT0[8]");
- l_timeout = (p9hcd::CYCLES_PER_MS / p9hcd::INSTS_PER_POLL_LOOP) *
- L2_CLK_STOP_TIMEOUT_IN_MS;
+ l_loops1ms = 1E6 / CACHE_L2_CLK_STOP_POLLING_HW_NS_DELAY;
do
{
+ fapi2::delay(CACHE_L2_CLK_STOP_POLLING_HW_NS_DELAY,
+ CACHE_L2_CLK_STOP_POLLING_SIM_CYCLE_DELAY);
+
FAPI_TRY(getScom(i_target, EQ_CPLT_STAT0, l_data64));
}
- while((l_data64.getBit<8>() != 1) && ((--l_timeout) != 0));
+ while((l_data64.getBit<8>() != 1) && ((--l_loops1ms) != 0));
- FAPI_ASSERT((l_timeout != 0),
- fapi2::PMPROC_L2CLKSTOP_TIMEOUT()
- .set_EQ_TARGET(i_target)
- .set_EQCPLTSTAT(l_data64),
+ FAPI_ASSERT((l_loops1ms != 0),
+ fapi2::PMPROC_L2CLKSTOP_TIMEOUT().set_EQCPLTSTAT(l_data64),
"L2 Clock Stop Timeout");
FAPI_DBG("Check L2 clocks stopped");
FAPI_TRY(getScom(i_target, EQ_CLOCK_STAT_SL, l_data64));
FAPI_ASSERT((((~l_data64) & l_region_clock) == 0),
- fapi2::PMPROC_L2CLKSTOP_FAILED()
- .set_EQ_TARGET(i_target)
- .set_EQCLKSTAT(l_data64),
+ fapi2::PMPROC_L2CLKSTOP_FAILED().set_EQCLKSTAT(l_data64),
"L2 Clock Stop Failed");
FAPI_DBG("L2 clocks stopped now");
@@ -146,16 +176,18 @@ p9_hcd_l2_stopclocks(
FAPI_TRY(putScom(i_target, EQ_QPPM_EXCGCR_CLEAR, l_l2sync_clock));
FAPI_DBG("Poll for L2 clock sync dones to drop via QPPM_QACSR[36,37]");
- l_timeout = (p9hcd::CYCLES_PER_MS / p9hcd::INSTS_PER_POLL_LOOP) *
- L2_CLK_SYNC_TIMEOUT_IN_MS;
+ l_loops1ms = 1E6 / CACHE_L2_CLK_STOP_POLLING_HW_NS_DELAY;
do
{
+ fapi2::delay(CACHE_L2_CLK_STOP_POLLING_HW_NS_DELAY,
+ CACHE_L2_CLK_STOP_POLLING_SIM_CYCLE_DELAY);
+
FAPI_TRY(getScom(i_target, EQ_QPPM_QACSR, l_data64));
}
- while(((l_data64 & l_l2sync_clock)) && ((--l_timeout) != 0));
+ while(((l_data64 & l_l2sync_clock)) && ((--l_loops1ms) != 0));
- FAPI_ASSERT((l_timeout != 0),
+ FAPI_ASSERT((l_loops1ms != 0),
fapi2::PMPROC_CACHECLKSYNCDROP_TIMEOUT().set_EQPPMQACSR(l_data64),
"L2 Clock Sync Drop Timeout");
FAPI_DBG("L2 clock sync dones dropped");
@@ -167,7 +199,6 @@ p9_hcd_l2_stopclocks(
FAPI_DBG("Assert regional fences via CPLT_CTRL1[8/9]");
FAPI_TRY(putScom(i_target, EQ_CPLT_CTRL1_OR, l_region_clock));
-
// -------------------------------
// Update QSSR
// -------------------------------
@@ -176,7 +207,6 @@ p9_hcd_l2_stopclocks(
FAPI_TRY(putScom(l_chip, PU_OCB_OCI_QSSR_OR,
((uint64_t)i_select_ex << SHIFT64((l_attr_chip_unit_pos << 1) + 1))));
-
fapi_try_exit:
FAPI_INF("<<p9_hcd_l2_stopclocks");
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_cache_stopclocks_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_cache_stopclocks_errors.xml
index 743058560..7dd58c2f7 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_cache_stopclocks_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_cache_stopclocks_errors.xml
@@ -38,30 +38,7 @@
<description>
cache clock stop failed.
</description>
- <ffdc>EQ_TARGET</ffdc>
<ffdc>EQCLKSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
<hwpError>
@@ -69,30 +46,7 @@
<description>
cache clock stop timed out.
</description>
- <ffdc>EQ_TARGET</ffdc>
<ffdc>EQCPLTSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_core_stopclocks_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_core_stopclocks_errors.xml
index 4f17d0a42..865f8c14a 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_core_stopclocks_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_core_stopclocks_errors.xml
@@ -26,6 +26,14 @@
<hwpErrors>
<!-- ********************************************************************* -->
<hwpError>
+ <rc>RC_PMPROC_COREPCBMUX_TIMEOUT</rc>
+ <description>
+ polling for pcb mux grant timed out.
+ </description>
+ <ffdc>CMESISR</ffdc>
+ </hwpError>
+ <!-- ********************************************************************* -->
+ <hwpError>
<rc>RC_PMPROC_CORECLKSYNCDROP_TIMEOUT</rc>
<description>
core clock sync done drop timed out.
@@ -38,30 +46,7 @@
<description>
core clock stop failed.
</description>
- <ffdc>CORE_TARGET</ffdc>
<ffdc>CORECLKSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
<hwpError>
@@ -69,30 +54,7 @@
<description>
core clock stop timed out.
</description>
- <ffdc>CORE_TARGET</ffdc>
<ffdc>CORECPLTSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_CORE</childType>
- <childNumber>CORE_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_l2_stopclocks_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_l2_stopclocks_errors.xml
index f142eb0c8..25a9fcdcd 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_hcd_l2_stopclocks_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_hcd_l2_stopclocks_errors.xml
@@ -38,30 +38,7 @@
<description>
L2 clock stop failed.
</description>
- <ffdc>EQ_TARGET</ffdc>
<ffdc>EQCLKSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
<hwpError>
@@ -69,30 +46,7 @@
<description>
L2 clock stop timed out.
</description>
- <ffdc>EQ_TARGET</ffdc>
<ffdc>EQCPLTSTAT</ffdc>
- <callout>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </deconfigure>
- <gard>
- <childTargets>
- <parent>PROC_CHIP_IN_ERROR</parent>
- <childType>TARGET_TYPE_EQ</childType>
- <childNumber>EQ_NUMBER_IN_ERROR</childNumber>
- </childTargets>
- </gard>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
OpenPOWER on IntegriCloud