diff options
author | Andres Lugo-Reyes <aalugore@us.ibm.com> | 2017-09-26 17:15:56 -0500 |
---|---|---|
committer | Andres A. Lugo-Reyes <aalugore@us.ibm.com> | 2017-10-16 15:58:00 -0400 |
commit | fa085f9b68802ec92a250eccca6ddb4152e7b61f (patch) | |
tree | efd9b222275b483ceef45e26a8f0ea8c81e6c81c /src/occ_405/pgpe | |
parent | 051cc0a10cb61b410252098d13fb7dd8727a8e52 (diff) | |
download | talos-occ-fa085f9b68802ec92a250eccca6ddb4152e7b61f.tar.gz talos-occ-fa085f9b68802ec92a250eccca6ddb4152e7b61f.zip |
Prevent PGPE IPC communication if all cores are deconfigured
Change-Id: I7cea001833615dc3bcb6a282c20f205f1e7d9d87
CQ:SW401110
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46831
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Diffstat (limited to 'src/occ_405/pgpe')
-rw-r--r-- | src/occ_405/pgpe/pgpe_interface.c | 38 | ||||
-rw-r--r-- | src/occ_405/pgpe/pgpe_interface.h | 10 |
2 files changed, 45 insertions, 3 deletions
diff --git a/src/occ_405/pgpe/pgpe_interface.c b/src/occ_405/pgpe/pgpe_interface.c index 5674641..fad5bd6 100644 --- a/src/occ_405/pgpe/pgpe_interface.c +++ b/src/occ_405/pgpe/pgpe_interface.c @@ -45,6 +45,7 @@ extern pstateStatus G_proc_pstate_status; extern PMCR_OWNER G_proc_pmcr_owner; extern uint16_t G_proc_fmax_mhz; +extern uint32_t G_present_cores; extern bool G_simics_environment; @@ -649,7 +650,7 @@ int pgpe_clip_update(void) } // Schedule PGPE clip update IPC task - schedule_rc = gpe_request_schedule(&G_clip_update_req); + schedule_rc = pgpe_request_schedule(&G_clip_update_req); } else { @@ -817,8 +818,9 @@ int pgpe_start_suspend(uint8_t action, PMCR_OWNER owner) { TRAC_IMP("pgpe_start_suspend: scheduling disable of pstates (owner=0x%02X)", owner); } + // Schedule PGPE start_suspend task - schedule_rc = gpe_request_schedule(&G_start_suspend_req); + schedule_rc = pgpe_request_schedule(&G_start_suspend_req); } // couldn't schedule the IPC task? @@ -932,7 +934,7 @@ int pgpe_pmcr_set(void) if (!G_simics_environment) { // Schedule PGPE PMCR update IPC task - schedule_rc = gpe_request_schedule(&G_pmcr_set_req); + schedule_rc = pgpe_request_schedule(&G_pmcr_set_req); } // Confirm Successfull completion of PGPE PMCR update task @@ -1074,3 +1076,33 @@ int set_nominal_pstate(void) return l_rc; } + +// Function Specification +// +// Name: pgpe_request_schedule +// +// Description: Wrapper function that takes care of any overhead associated +// with scheduling a GpeRequest to the PGPE +// +// End Function Specification +int pgpe_request_schedule(GpeRequest* request) +{ + int rc = 0; + static uint8_t L_traceCount = 10; + // Before sending any IPC task to the PGPE, make sure there are cores + // configured + if( G_present_cores != 0 ) + { + rc = gpe_request_schedule(request); + } + else + { + if( L_traceCount ) + { + // If we skip the IPC task, just send successful return code + TRAC_INFO("No Configured Cores. Skipping PGPE-bound IPC tasks"); + L_traceCount--; + } + } + return rc; +} diff --git a/src/occ_405/pgpe/pgpe_interface.h b/src/occ_405/pgpe/pgpe_interface.h index 16a3aef..2bfeeaa 100644 --- a/src/occ_405/pgpe/pgpe_interface.h +++ b/src/occ_405/pgpe/pgpe_interface.h @@ -29,24 +29,34 @@ #include "errl.h" #include "state.h" #include "pstate_pgpe_occ_api.h" +#include "occhw_async.h" void init_pgpe_ipcs(void); errlHndl_t pgpe_init_clips(void); + errlHndl_t pgpe_init_pmcr(void); + errlHndl_t pgpe_init_start_suspend(void); + errlHndl_t pgpe_init_wof_control(void); + errlHndl_t pgpe_init_wof_vfrt(void); int pgpe_set_clip_ranges(Pstate i_pstate); + int pgpe_set_clip_blocking(Pstate i_pstate); + int pgpe_clip_update(void); int pgpe_pmcr_set(void); int pgpe_start_suspend(uint8_t action, PMCR_OWNER owner); + void pgpe_start_suspend_callback(void); +int pgpe_request_schedule(GpeRequest* request); + int set_nominal_pstate(void); #endif /* #ifndef _PGPE_INTERFACE_H_ */ |