Skip to content

Commit

Permalink
PM: set PGPE and SGPE Timer Select
Browse files Browse the repository at this point in the history
- Writes fixed values for FIT and watchdog timers on both engines
- Needed for DD2 as DD1 was done with initfile settings
- Will work for either DD level

Change-Id: I8fa0a5a20091016e4210b7c81b0297bded7ade62
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42496
Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42500
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
stillgs authored and crgeddes committed Jul 7, 2017
1 parent 222af0c commit 87812eb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ fapi2::ReturnCode pstate_gpe_init(
FAPI_TRY(putScom(i_target, PU_OCB_OCI_OCCFLG_SCOM2, BIT(p9hcd::PGPE_PSTATE_PROTOCOL_AUTO_ACTIVATE)));
}

// Setup the PGPE Timer Selects
// These hardcoded values are assumed by the PGPE Hcode for setting up
// the FIT and Watchdog values a based on the nest frequency that is
// passed to it via the PGPE header.
l_data64.flush<0>()
.insertFromRight<0, 4>(0x1) // Watchdog
.insertFromRight<4, 4>(0xA); // FIT
FAPI_TRY(fapi2::putScom(i_target, PU_GPE2_GPETSEL_SCOM, l_data64));

// Program XCR to ACTIVATE PGPE
// @todo RTC 146665 Operations to PPEs should use a p9ppe namespace
FAPI_INF(" Starting the PGPE...");
Expand Down
8 changes: 8 additions & 0 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ fapi2::ReturnCode p9_pm_stop_gpe_init(
}
}

// Setup the SGPE Timer Selects
// These hardcoded values are assumed by the SGPE Hcode for setting up
// the FIT and Watchdog values.
l_data64.flush<0>()
.insertFromRight<0, 4>(0x1) // Watchdog
.insertFromRight<4, 4>(0xA); // FIT
FAPI_TRY(fapi2::putScom(i_target, PU_GPE3_GPETSEL_SCOM, l_data64));

// Boot the STOP GPE
FAPI_TRY(stop_gpe_init(i_target), "ERROR: failed to initialize Stop GPE");

Expand Down

0 comments on commit 87812eb

Please sign in to comment.