Dean Sanner | 2840b1d | 2017-06-29 12:36:43 -0500 | [diff] [blame] | 1 | From 72976d2d7f3a303830a41cf282260be09260bcfc Mon Sep 17 00:00:00 2001 |
| 2 | From: Greg Still <stillgs@us.ibm.com> |
| 3 | Date: Tue, 27 Jun 2017 09:26:41 -0500 |
| 4 | Subject: [PATCH v1 1002/1002] PM: set PGPE and SGPE Timer Select |
| 5 | |
| 6 | - Writes fixed values for FIT and watchdog timers on both engines |
| 7 | - Needed for DD2 as DD1 was done with initfile settings |
| 8 | - Will work for either DD level |
| 9 | |
| 10 | Change-Id: I8fa0a5a20091016e4210b7c81b0297bded7ade62 |
| 11 | Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42496 |
| 12 | Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com> |
| 13 | Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> |
| 14 | Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> |
| 15 | Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> |
| 16 | Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> |
| 17 | |
| 18 | Conflicts: |
| 19 | src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C |
| 20 | --- |
| 21 | src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C | 10 ++++++++++ |
| 22 | src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C | 8 ++++++++ |
| 23 | 2 files changed, 18 insertions(+) |
| 24 | |
| 25 | diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C |
| 26 | index bdf8f74..1ca2772 100644 |
| 27 | --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C |
| 28 | +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pstate_gpe_init.C |
| 29 | @@ -113,6 +113,16 @@ fapi2::ReturnCode pstate_gpe_init( |
| 30 | |
| 31 | FAPI_TRY(putScom(i_target, PU_OCB_OCI_OCCS2_SCOM, l_occ_scratch2)); |
| 32 | |
| 33 | + // Setup the PGPE Timer Selects |
| 34 | + // These hardcoded values are assumed by the PGPE Hcode for setting up |
| 35 | + // the FIT and Watchdog values a based on the nest frequency that is |
| 36 | + // passed to it via the PGPE header. |
| 37 | + l_data64.flush<0>() |
| 38 | + .insertFromRight<0, 4>(0x1) // Watchdog |
| 39 | + .insertFromRight<4, 4>(0xA); // FIT |
| 40 | + FAPI_TRY(fapi2::putScom(i_target, PU_GPE2_GPETSEL_SCOM, l_data64)); |
| 41 | + |
| 42 | + |
| 43 | // Program XCR to ACTIVATE PGPE |
| 44 | // @todo RTC 146665 Operations to PPEs should use a p9ppe namespace |
| 45 | FAPI_INF(" Starting the PGPE..."); |
| 46 | diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C |
| 47 | index 5e05fcb..0829556 100644 |
| 48 | --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C |
| 49 | +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C |
| 50 | @@ -282,6 +282,14 @@ fapi2::ReturnCode p9_pm_stop_gpe_init( |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | + // Setup the SGPE Timer Selects |
| 55 | + // These hardcoded values are assumed by the SGPE Hcode for setting up |
| 56 | + // the FIT and Watchdog values. |
| 57 | + l_data64.flush<0>() |
| 58 | + .insertFromRight<0, 4>(0x1) // Watchdog |
| 59 | + .insertFromRight<4, 4>(0xA); // FIT |
| 60 | + FAPI_TRY(fapi2::putScom(i_target, PU_GPE3_GPETSEL_SCOM, l_data64)); |
| 61 | + |
| 62 | // Boot the STOP GPE |
| 63 | FAPI_TRY(stop_gpe_init(i_target), "ERROR: failed to initialize Stop GPE"); |
| 64 | |
| 65 | -- |
| 66 | 1.8.2.2 |
| 67 | |