src/occ_405/proc/proc_pstate.c
// Function Specification
//
// Name:  populate_opal_dynamic_data
//
// Description: populate the dynamic data entries in the OPAL table
//
// End Function Specification
Function Specification
Name:  populate_opal_dynamic_data

populate the dynamic data entries in the OPAL table

End Function Specification
Function Specification Name : populate_opal_dynamic_data populate the dynamic data entries in the OPAL table End Function Specification
void populate_opal_dynamic_data()
{
    memset(&G_opal_dynamic_table, 0, sizeof(G_opal_dynamic_table));
    G_opal_dynamic_table.dynamic.occ_state            = CURRENT_STATE();
    if(G_gpu_config_done)
    {
        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(isSafeStateRequested())
    {
        G_opal_dynamic_table.dynamic.proc_throt_status = OCC_RESET;
    }
    else
    {
        G_opal_dynamic_table.dynamic.proc_throt_status = G_amec_opal_proc_throt_reason;
    }
    G_opal_dynamic_table.dynamic.mem_throt_status     = G_amec_opal_mem_throt_reason;
    G_opal_dynamic_table.dynamic.quick_power_drop     = AMEC_INTF_GET_OVERSUBSCRIPTION();
    G_opal_dynamic_table.dynamic.power_shift_ratio    = G_sysConfigData.psr;
    G_opal_dynamic_table.dynamic.power_cap_type       = G_sysConfigData.pcap.source;
    G_opal_dynamic_table.dynamic.min_power_cap        = G_sysConfigData.pcap.hard_min_pcap;
    G_opal_dynamic_table.dynamic.max_power_cap        = G_sysConfigData.pcap.max_pcap;
    G_opal_dynamic_table.dynamic.current_power_cap    = g_amec->pcap.active_node_pcap;
    G_opal_dynamic_table.dynamic.soft_min_power_cap   = G_sysConfigData.pcap.soft_min_pcap;
}
void populate_opal_dynamic_data ( ) { memset ( & G_opal_dynamic_table , 0 , sizeof ( G_opal_dynamic_table ) ) ; G_opal_dynamic_table . dynamic . occ_state = CURRENT_STATE ( ) ; if ( G_gpu_config_done ) { 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 ( isSafeStateRequested ( ) ) { G_opal_dynamic_table . dynamic . proc_throt_status = OCC_RESET ; } else { G_opal_dynamic_table . dynamic . proc_throt_status = G_amec_opal_proc_throt_reason ; } G_opal_dynamic_table . dynamic . mem_throt_status = G_amec_opal_mem_throt_reason ; G_opal_dynamic_table . dynamic . quick_power_drop = AMEC_INTF_GET_OVERSUBSCRIPTION ( ) ; G_opal_dynamic_table . dynamic . power_shift_ratio = G_sysConfigData . psr ; G_opal_dynamic_table . dynamic . power_cap_type = G_sysConfigData . pcap . source ; G_opal_dynamic_table . dynamic . min_power_cap = G_sysConfigData . pcap . hard_min_pcap ; G_opal_dynamic_table . dynamic . max_power_cap = G_sysConfigData . pcap . max_pcap ; G_opal_dynamic_table . dynamic . current_power_cap = g_amec -> pcap . active_node_pcap ; G_opal_dynamic_table . dynamic . soft_min_power_cap = G_sysConfigData . pcap . soft_min_pcap ; }
Function Specification
Name:  populate_opal_dynamic_data
Function Specification Name : populate_opal_dynamic_data
// Dynamic OPAL runtime data // Add GPUs presence if this is a system that has GPUs OCC would monitor // 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 //If safe state is requested then that overrides anything from amec