Skip to content

Commit

Permalink
Clear out OCC Flag register during pm_reset
Browse files Browse the repository at this point in the history
Following a powman_suspend we were seeing issues where the OCC was
resetting itself up in runtime because the pgpe still had the flags
set to put itself in suspend. So when PHYP started the GPEs PGPE went
into suspend and caused the OCC to reset into Safe mode. Clearing
this register will avoid the pgpe going into suspend.

Change-Id: Id0c64007ccfbbb8441f28fef543f6d232c06ffc1
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43399
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43404
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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
crgeddes committed Jul 21, 2017
1 parent 574becf commit c964a86
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
Expand Up @@ -109,11 +109,14 @@ fapi2::ReturnCode p9_pm_reset(
FAPI_TRY(l_rc, "ERROR: Failed to mask OCC FIRs.");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs"));

// Clear the OCC's PIB I2C engine locks.
// All other OCC owned flag bits are retained.
l_data64.setBit<17>().setBit<19>().setBit<21>();
FAPI_TRY(fapi2::putScom(i_target, PU_OCB_OCI_OCCFLG_SCOM1, l_data64),
"ERROR: Failed to write to OCC FLAG");
// Clear the OCC Flag and Scratch2 registers
// which contain runtime settings and modes for PM GPEs (Pstate and Stop functions)
l_data64.flush<0>();
FAPI_TRY(fapi2::putScom(i_target, PU_OCB_OCI_OCCFLG_SCOM, l_data64),
"ERROR: Failed to write to OCC Flag Register");

FAPI_TRY(fapi2::putScom(i_target, PU_OCB_OCI_OCCS2_SCOM, l_data64),
"ERROR: Failed to write to OCC Scratch2 Register");

// ************************************************************************
// Halt the OCC PPC405 and reset it safely
Expand Down

0 comments on commit c964a86

Please sign in to comment.