From 9a9908d66e710520601ae358fd42639329316a5f Mon Sep 17 00:00:00 2001 From: Kacper Stojek Date: Fri, 15 Jul 2022 07:06:09 +0200 Subject: [PATCH] soc/power9/: change logs in dump_cal_errors() Change-Id: Idea5bd1ff8785da99f808e18b4dfa2765fe88788 Signed-off-by: Kacper Stojek Signed-off-by: Sergii Dmytruk --- src/soc/ibm/power9/ccs.c | 73 ++++++++++++++++---------------- src/soc/ibm/power9/istep_13_11.c | 40 +++++++++-------- 2 files changed, 55 insertions(+), 58 deletions(-) diff --git a/src/soc/ibm/power9/ccs.c b/src/soc/ibm/power9/ccs.c index 36612c70267..be7603db5ca 100644 --- a/src/soc/ibm/power9/ccs.c +++ b/src/soc/ibm/power9/ccs.c @@ -104,55 +104,54 @@ static void dump_cal_errors(uint8_t chip, chiplet_id_t id, int mca_i) /* Stop CCS so it won't mess up with the values */ write_scom_for_chiplet(chip, id, CCS_CNTLQ, PPC_BIT(CCS_CNTLQ_CCS_STOP)); -#if CONFIG(DEBUG_RAM_SETUP) int dp; for (dp = 0; dp < 5; dp++) { - printk(BIOS_ERR, "DP %d\n", dp); - printk(BIOS_ERR, "\t%#16.16llx - RD_VREF_CAL_ERROR\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_RD_VREF_CAL_ERROR_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - DQ_BIT_DISABLE_RP0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_DQ_BIT_DISABLE_RP0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - DQS_BIT_DISABLE_RP0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_DQS_BIT_DISABLE_RP0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_ERROR0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_WR_ERROR0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_STATUS0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_RD_STATUS0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_LVL_STATUS2\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS2_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_LVL_STATUS0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_VREF_ERROR0\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_VREF_ERROR1\n", - dp_mca_read(id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR1_P0_0)); + printk(RAM_SPEW, "DP %d\n", dp); + printk(RAM_SPEW, "\t%#16.16llx - RD_VREF_CAL_ERROR\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_VREF_CAL_ERROR_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - DQ_BIT_DISABLE_RP0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_DQ_BIT_DISABLE_RP0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - DQS_BIT_DISABLE_RP0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_DQS_BIT_DISABLE_RP0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - WR_ERROR0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_ERROR0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - RD_STATUS0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_STATUS0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - RD_LVL_STATUS2\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS2_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - RD_LVL_STATUS0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - WR_VREF_ERROR0\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR0_P0_0)); + printk(RAM_SPEW, "\t%#16.16llx - WR_VREF_ERROR1\n", + dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR1_P0_0)); } - printk(BIOS_ERR, "%#16.16llx - APB_ERROR_STATUS0\n", - mca_read(id, mca_i, DDRPHY_APB_ERROR_STATUS0_P0)); + printk(RAM_SPEW, "%#16.16llx - APB_ERROR_STATUS0\n", + mca_read(chip, id, mca_i, DDRPHY_APB_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - RC_ERROR_STATUS0\n", - mca_read(id, mca_i, DDRPHY_RC_ERROR_STATUS0_P0)); + printk(RAM_SPEW, "%#16.16llx - RC_ERROR_STATUS0\n", + mca_read(chip, id, mca_i, DDRPHY_RC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - SEQ_ERROR_STATUS0\n", - mca_read(id, mca_i, DDRPHY_SEQ_ERROR_STATUS0_P0)); + printk(RAM_SPEW, "%#16.16llx - SEQ_ERROR_STATUS0\n", + mca_read(chip, id, mca_i, DDRPHY_SEQ_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - WC_ERROR_STATUS0\n", - mca_read(id, mca_i, DDRPHY_WC_ERROR_STATUS0_P0)); + printk(RAM_SPEW, "%#16.16llx - WC_ERROR_STATUS0\n", + mca_read(chip, id, mca_i, DDRPHY_WC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - PC_ERROR_STATUS0\n", - mca_read(id, mca_i, DDRPHY_PC_ERROR_STATUS0_P0)); + printk(RAM_SPEW, "%#16.16llx - PC_ERROR_STATUS0\n", + mca_read(chip, id, mca_i, DDRPHY_PC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - PC_INIT_CAL_ERROR\n", - mca_read(id, mca_i, DDRPHY_PC_INIT_CAL_ERROR_P0)); + printk(RAM_SPEW, "%#16.16llx - PC_INIT_CAL_ERROR\n", + mca_read(chip, id, mca_i, DDRPHY_PC_INIT_CAL_ERROR_P0)); - printk(BIOS_ERR, "%#16.16llx - PC_INIT_CAL_STATUS\n", - mca_read(id, mca_i, DDRPHY_PC_INIT_CAL_STATUS_P0)); + printk(RAM_SPEW, "%#16.16llx - PC_INIT_CAL_STATUS\n", + mca_read(chip, id, mca_i, DDRPHY_PC_INIT_CAL_STATUS_P0)); + + printk(RAM_SPEW, "%#16.16llx - IOM_PHY0_DDRPHY_FIR_REG\n", + mca_read(chip, id, mca_i, IOM_PHY0_DDRPHY_FIR_REG)); - printk(BIOS_ERR, "%#16.16llx - IOM_PHY0_DDRPHY_FIR_REG\n", - mca_read(id, mca_i, IOM_PHY0_DDRPHY_FIR_REG)); -#endif die("CCS execution timeout\n"); } diff --git a/src/soc/ibm/power9/istep_13_11.c b/src/soc/ibm/power9/istep_13_11.c index f2cbb752dae..b6e134f86d8 100644 --- a/src/soc/ibm/power9/istep_13_11.c +++ b/src/soc/ibm/power9/istep_13_11.c @@ -130,7 +130,6 @@ static void clear_initial_cal_errors(uint8_t chip, int mcs_i, int mca_i) static void dump_cal_errors(uint8_t chip, int mcs_i, int mca_i) { -#if CONFIG(DEBUG_RAM_SETUP) chiplet_id_t id = mcs_ids[mcs_i]; int dp; @@ -141,55 +140,54 @@ static void dump_cal_errors(uint8_t chip, int mcs_i, int mca_i) * Serial over LAN and may not print few last characters. */ for (dp = 0; dp < 5; dp++) { - printk(BIOS_ERR, "DP %d\n", dp); - printk(BIOS_ERR, "\t%#16.16llx - RD_VREF_CAL_ERROR\n", + printk(RAM_SPEW, "DP %d\n", dp); + printk(RAM_SPEW, "\t%#16.16llx - RD_VREF_CAL_ERROR\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_VREF_CAL_ERROR_P0_0)); - printk(RAM_DEBUG, "\t%#16.16llx - DQ_BIT_DISABLE_RP0\n", + printk(RAM_SPEW, "\t%#16.16llx - DQ_BIT_DISABLE_RP0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_DQ_BIT_DISABLE_RP0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - DQS_BIT_DISABLE_RP0\n", + printk(RAM_SPEW, "\t%#16.16llx - DQS_BIT_DISABLE_RP0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_DQS_BIT_DISABLE_RP0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_ERROR0\n", + printk(RAM_SPEW, "\t%#16.16llx - WR_ERROR0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_ERROR0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_STATUS0\n", + printk(RAM_SPEW, "\t%#16.16llx - RD_STATUS0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_STATUS0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_LVL_STATUS2\n", + printk(RAM_SPEW, "\t%#16.16llx - RD_LVL_STATUS2\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS2_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - RD_LVL_STATUS0\n", + printk(RAM_SPEW, "\t%#16.16llx - RD_LVL_STATUS0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_RD_LVL_STATUS0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_VREF_ERROR0\n", + printk(RAM_SPEW, "\t%#16.16llx - WR_VREF_ERROR0\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR0_P0_0)); - printk(BIOS_ERR, "\t%#16.16llx - WR_VREF_ERROR1\n", + printk(RAM_SPEW, "\t%#16.16llx - WR_VREF_ERROR1\n", dp_mca_read(chip, id, dp, mca_i, DDRPHY_DP16_WR_VREF_ERROR1_P0_0)); } - printk(BIOS_ERR, "%#16.16llx - APB_ERROR_STATUS0\n", + printk(RAM_SPEW, "%#16.16llx - APB_ERROR_STATUS0\n", mca_read(chip, id, mca_i, DDRPHY_APB_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - RC_ERROR_STATUS0\n", + printk(RAM_SPEW, "%#16.16llx - RC_ERROR_STATUS0\n", mca_read(chip, id, mca_i, DDRPHY_RC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - SEQ_ERROR_STATUS0\n", + printk(RAM_SPEW, "%#16.16llx - SEQ_ERROR_STATUS0\n", mca_read(chip, id, mca_i, DDRPHY_SEQ_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - WC_ERROR_STATUS0\n", + printk(RAM_SPEW, "%#16.16llx - WC_ERROR_STATUS0\n", mca_read(chip, id, mca_i, DDRPHY_WC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - PC_ERROR_STATUS0\n", + printk(RAM_SPEW, "%#16.16llx - PC_ERROR_STATUS0\n", mca_read(chip, id, mca_i, DDRPHY_PC_ERROR_STATUS0_P0)); - printk(BIOS_ERR, "%#16.16llx - PC_INIT_CAL_ERROR\n", + printk(RAM_SPEW, "%#16.16llx - PC_INIT_CAL_ERROR\n", mca_read(chip, id, mca_i, DDRPHY_PC_INIT_CAL_ERROR_P0)); /* 0x8000 on success for first rank, 0x4000 for second */ - printk(BIOS_ERR, "%#16.16llx - PC_INIT_CAL_STATUS\n", + printk(RAM_SPEW, "%#16.16llx - PC_INIT_CAL_STATUS\n", mca_read(chip, id, mca_i, DDRPHY_PC_INIT_CAL_STATUS_P0)); - printk(BIOS_ERR, "%#16.16llx - IOM_PHY0_DDRPHY_FIR_REG\n", + printk(RAM_SPEW, "%#16.16llx - IOM_PHY0_DDRPHY_FIR_REG\n", mca_read(chip, id, mca_i, IOM_PHY0_DDRPHY_FIR_REG)); - printk(BIOS_ERR, "%#16.16llx - MBACALFIRQ\n", + printk(RAM_SPEW, "%#16.16llx - MBACALFIRQ\n", mca_read(chip, id, mca_i, MBACALFIR)); -#endif } /* Based on ATTR_MSS_MRW_RESET_DELAY_BEFORE_CAL, by default do it. */