summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2018-05-04 15:17:49 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2018-05-09 14:25:03 -0400
commitfc897cac878b92013e3c51266649404bdc58829d (patch)
tree8d1de593c6180ec61facc2971ef47b267398ceb8 /src
parent3e8bdd955f335a9a11c34605a09bf29bbebcdec4 (diff)
downloadtalos-occ-fc897cac878b92013e3c51266649404bdc58829d.tar.gz
talos-occ-fc897cac878b92013e3c51266649404bdc58829d.zip
Add GPU presence to OPAL shared memory interface
Change-Id: Ie90011d2f7f361125ca73a89a3425b951a329e55 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58375 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/occ_405/proc/proc_pstate.c23
-rwxr-xr-xsrc/occ_405/proc/proc_pstate.h8
2 files changed, 29 insertions, 2 deletions
diff --git a/src/occ_405/proc/proc_pstate.c b/src/occ_405/proc/proc_pstate.c
index 5f0cad7..484518f 100755
--- a/src/occ_405/proc/proc_pstate.c
+++ b/src/occ_405/proc/proc_pstate.c
@@ -52,6 +52,11 @@ extern OCCPstateParmBlock G_oppb;
//Trace flags
extern uint16_t G_allow_trace_flags;
+// Indicates if we have determined GPU presence
+extern bool G_gpu_config_done;
+// GPU Present bit mask
+extern uint32_t G_first_proc_gpu_config;
+
//Holds Fmax for ease of proc_freq2pstate calculation = max(fturbo,futurbo)
uint16_t G_proc_fmax_mhz;
@@ -226,6 +231,15 @@ void populate_opal_dynamic_data()
// Dynamic OPAL runtime data
G_opal_dynamic_table.dynamic.occ_state = CURRENT_STATE();
+ // Add GPUs presence if this is a system that has GPUs OCC would monitor
+ if(G_gpu_config_done)
+ {
+ // set minor version to indicate OCC determined GPU presence, this is so
+ // OPAL can tell the difference between no GPUs present and fw that didn't support
+ G_opal_dynamic_table.dynamic.dynamic_minor_version = DYNAMIC_MINOR_V_GPU_PRESENCE;
+ G_opal_dynamic_table.dynamic.gpus_present = G_first_proc_gpu_config;
+ }
+
//If safe state is requested then that overrides anything from amec
if(isSafeStateRequested())
{
@@ -600,6 +614,15 @@ void check_for_opal_updates(void)
G_opal_dynamic_table.dynamic.power_shift_ratio, G_sysConfigData.psr,
G_opal_dynamic_table.dynamic.power_cap_type, G_sysConfigData.pcap.source);
}
+
+ // check if GPU presence was determined
+ if( (G_opal_dynamic_table.dynamic.dynamic_minor_version != DYNAMIC_MINOR_V_GPU_PRESENCE) &&
+ (G_gpu_config_done) )
+ {
+ dynamic_data_change = true;
+ TRAC_INFO("check_for_opal_updates: GPU presence determined = 0x%04X",
+ G_first_proc_gpu_config);
+ }
} // else check for changes
// If there was a change copy to main memory and notify host when BCE finishes
diff --git a/src/occ_405/proc/proc_pstate.h b/src/occ_405/proc/proc_pstate.h
index 0126d1d..4e47aa1 100755
--- a/src/occ_405/proc/proc_pstate.h
+++ b/src/occ_405/proc/proc_pstate.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -85,7 +85,10 @@ typedef struct __attribute__ ((packed))
typedef struct __attribute__ ((packed))
{
uint8_t occ_state;
- uint8_t reserved[4];
+ uint8_t dynamic_major_version;
+ uint8_t dynamic_minor_version;
+ uint8_t gpus_present;
+ uint8_t reserved[1];
uint8_t proc_throt_status;
uint8_t mem_throt_status;
uint8_t quick_power_drop;
@@ -105,6 +108,7 @@ typedef struct __attribute__ ((packed))
} opal_dynamic_table_t __attribute__ ((aligned (128)));
#define PSTATE_ENTRIES 256 // number of generated PSTATES entries in OPAL table
+#define DYNAMIC_MINOR_V_GPU_PRESENCE 1 // OPAL Dynamic minor version for GPU support
// This size must be a multiple of 128
typedef struct __attribute__ ((packed))
OpenPOWER on IntegriCloud