Skip to content

Commit

Permalink
Set fused core enabled on the thread cntxt reg after resetting XIVE HW
Browse files Browse the repository at this point in the history
In DD2 we are using the HW to reset the XIVE unit. We found that we
need to set the fused mode enabled bit in the INT thread context
register after the XIVE unit is restarted so this commit adds that
to the XIVE unit reset path.

Change-Id: I2c962fd67b60fc70ad431704ea83ca56eb5cb23f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42998
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
crgeddes committed Jul 14, 2017
1 parent bf8d008 commit 1e7e41d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/usr/intr/intrrp.C
Expand Up @@ -544,6 +544,39 @@ errlHndl_t IntrRp::resetIntUnit(intr_hdlr_t* i_proc)
TRACFCOMP(g_trac_intr, "Error resetting XIVE INT unit");
break;
}

//Additional settings for fused mode
//Needed because the HW XIVE reset clears too much HW state
if (is_fused_mode())
{
//Do a Read-Modify-Write on INT Thread Context Register
//setting the FUSED_CORE_EN bit as the 'modify' part
uint64_t l_int_tctxt_reg = 0x0;
l_err = deviceRead(procTarget,
&l_int_tctxt_reg,
size,
DEVICE_SCOM_ADDRESS(PU_INT_TCTXT_CFG));

if (l_err)
{
TRACFCOMP(g_trac_intr, "Error reading the INT_TCTXT_CFG(%lx) scom register",
PU_INT_TCTXT_CFG);
break;
}

l_int_tctxt_reg |= INT_TCTXT_CFG_FUSE_CORE_EN;

l_err = deviceWrite(procTarget,
&l_int_tctxt_reg,
size,
DEVICE_SCOM_ADDRESS(PU_INT_TCTXT_CFG));
if (l_err)
{
TRACFCOMP(g_trac_intr, "Error writing %lx the INT_TCTXT_CFG(%lx) scom register",
l_int_tctxt_reg, PU_INT_TCTXT_CFG );
break;
}
}
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions src/usr/intr/intrrp.H
Expand Up @@ -213,6 +213,8 @@ namespace INTR
PSI_BRIDGE_INTP_STATUS_CTL_RESET = 0x4000000000000000ULL,
PSI_BRIDGE_INTP_STATUS_CTL_DISABLE_PSI = 0x1000000000000000ULL,

INT_TCTXT_CFG_FUSE_CORE_EN = 0x0800000000000000,

XIVE_RESET_INT_CQ_RST_CTL_SCOM_ADDR = 0x05013023,
XIVE_RESET_POWERBUS_QUIESCE_ENABLE = 0x4000000000000000,
XIVE_RESET_POWERBUS_QUIESCE_TIMEOUT = 1000000, //1 millisecond
Expand Down

0 comments on commit 1e7e41d

Please sign in to comment.