Skip to content

Commit

Permalink
soc/power9/: change logs in dump_cal_errors()
Browse files Browse the repository at this point in the history
Change-Id: Idea5bd1ff8785da99f808e18b4dfa2765fe88788
Signed-off-by: Kacper Stojek <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
  • Loading branch information
Stojak139808 authored and SergiiDmytruk committed Mar 24, 2023
1 parent 1bfd043 commit 98da850
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 58 deletions.
73 changes: 36 additions & 37 deletions src/soc/ibm/power9/ccs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
40 changes: 19 additions & 21 deletions src/soc/ibm/power9/istep_13_11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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. */
Expand Down

0 comments on commit 98da850

Please sign in to comment.