diff options
-rwxr-xr-x | src/occ_405/amec/amec_data.c | 3 | ||||
-rw-r--r-- | src/occ_405/amec/amec_init.c | 2 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp.c | 3 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds.c | 11 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds.h | 1 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c | 13 | ||||
-rwxr-xr-x | src/occ_405/occ_sys_config.c | 1 | ||||
-rwxr-xr-x | src/occ_405/occ_sys_config.h | 5 |
8 files changed, 30 insertions, 9 deletions
diff --git a/src/occ_405/amec/amec_data.c b/src/occ_405/amec/amec_data.c index 61af8fe..a658f63 100755 --- a/src/occ_405/amec/amec_data.c +++ b/src/occ_405/amec/amec_data.c @@ -464,7 +464,8 @@ void amec_data_write_pcap(void) // update data mask notifying we got pcap information extern data_cnfg_t * G_data_cnfg; G_data_cnfg->data_mask |= DATA_MASK_PCAP_PRESENT; - TRAC_IMP("amec_data_write: PCAP Config data: pcap[%d]: data_mask[%x]", g_amec->pcap.norm_node_pcap, G_data_cnfg->data_mask); + TRAC_IMP("amec_data_write: PCAP Config data: pcap[%d]: data_mask[%x]", + g_amec->pcap.norm_node_pcap, G_data_cnfg->data_mask); } } diff --git a/src/occ_405/amec/amec_init.c b/src/occ_405/amec/amec_init.c index 138f7ff..4179e70 100644 --- a/src/occ_405/amec/amec_init.c +++ b/src/occ_405/amec/amec_init.c @@ -70,8 +70,6 @@ amec_sys_t * g_amec = &g_amec_sys; // GPE Request Structure that is used to measure the worst case GPE timings GpeRequest G_gpe_nop_request[NUM_GPE_ENGINES]; -// @TODO - TEMP: not ready yet -//extern PoreEntryPoint GPE_pore_nop; extern void amec_slv_update_gpe_sensors(uint8_t i_gpe_engine); extern void amec_slv_update_gpe_sensors(uint8_t i_gpe_engine); diff --git a/src/occ_405/cmdh/cmdh_fsp.c b/src/occ_405/cmdh/cmdh_fsp.c index 6e3e0c0..81f5e20 100755 --- a/src/occ_405/cmdh/cmdh_fsp.c +++ b/src/occ_405/cmdh/cmdh_fsp.c @@ -900,12 +900,13 @@ errlHndl_t cmdh_processTmgtRequest (const cmdh_fsp_cmd_t * i_cmd_ptr, case CMDH_GET_SNAPSHOT_BUFFER: l_err = cmdh_get_snapshot_buffer(i_cmd_ptr,i_rsp_ptr); break; +*/ case CMDH_SET_USER_PCAP: l_err = cmdh_set_user_pcap(i_cmd_ptr, i_rsp_ptr); break; //case CMDH_GET_CPU_TEMPS: -*/ + default: CMDH_TRAC_INFO("Invalid or unsupported command 0x%02x",l_cmd_type); diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c index 791fe6d..aff6c3d 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c @@ -425,7 +425,7 @@ ERRL_RC cmdh_poll_v20(cmdh_fsp_rsp_t * o_rsp_ptr) { memset((void*) &l_sensorHeader, 0, (size_t)sizeof(cmdh_poll_sensor_db_t)); memcpy ((void *) &(l_sensorHeader.eyecatcher[0]), SENSOR_CAPS, 4); - l_sensorHeader.format = 0x01; + l_sensorHeader.format = 0x02; l_sensorHeader.length = sizeof(cmdh_poll_pcaps_sensor_t); @@ -436,16 +436,19 @@ ERRL_RC cmdh_poll_v20(cmdh_fsp_rsp_t * o_rsp_ptr) l_pcapData.max = G_sysConfigData.pcap.max_pcap; l_pcapData.min = G_sysConfigData.pcap.hard_min_pcap; l_pcapData.user = G_sysConfigData.pcap.current_pcap; + l_pcapData.source = G_sysConfigData.pcap.source; l_sensorHeader.count = 1; // Copy header to response buffer. - memcpy ((void *) &(o_rsp_ptr->data[l_rsp_index]), (void *)&l_sensorHeader, sizeof(l_sensorHeader)); + memcpy ((void *) &(o_rsp_ptr->data[l_rsp_index]), + (void *)&l_sensorHeader, sizeof(l_sensorHeader)); // Increment index into response buffer. l_rsp_index += sizeof(l_sensorHeader); uint8_t l_sensordataSz = l_sensorHeader.count * l_sensorHeader.length; // Copy sensor data into response buffer. - memcpy ((void *) &(o_rsp_ptr->data[l_rsp_index]), (void *)&(l_pcapData), l_sensordataSz); + memcpy ((void *) &(o_rsp_ptr->data[l_rsp_index]), + (void *)&(l_pcapData), l_sensordataSz); // Increment index into response buffer. l_rsp_index += l_sensordataSz; @@ -1541,6 +1544,8 @@ errlHndl_t cmdh_set_user_pcap(const cmdh_fsp_cmd_t * i_cmd_ptr, //Indicate there is new PCAP data available G_master_pcap_data.pcap_data_count++; + + G_master_pcap_data.source = OUT_OF_BAND; // BMC/(H)TMGT } TRAC_INFO("User selected power limit = %d", diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.h b/src/occ_405/cmdh/cmdh_fsp_cmds.h index 8961238..d5448ad 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds.h +++ b/src/occ_405/cmdh/cmdh_fsp_cmds.h @@ -207,6 +207,7 @@ typedef struct __attribute__ ((packed)) cmdh_poll_caps_sensor uint16_t max; // Maximum power cap in 1W units. uint16_t min; // Minimum power cap in 1W units. uint16_t user; // Power cap set by user in 1W units. + uint8_t source; // User Power Limit Source } cmdh_poll_pcaps_sensor_t; //--------------------------------------------------------- diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c index 98cc513..33cefed 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c @@ -1168,8 +1168,17 @@ errlHndl_t data_store_power_cap(const cmdh_fsp_cmd_t * i_cmd_ptr, { if(l_cmd_ptr->version == DATA_SYS_VERSION_20) { - // Copy power cap data into G_master_pcap_data - memcpy(&G_master_pcap_data, &l_cmd_ptr->pcap_config, sizeof(cmdh_pcap_config_data_t)); + // Copy power cap limits data into G_master_pcap_data + cmdh_pcap_config_t * l_cmd2_ptr = (cmdh_pcap_config_t *)i_cmd_ptr; + G_master_pcap_data.soft_min_pcap = l_cmd2_ptr->pcap_config.soft_min_pcap; + G_master_pcap_data.hard_min_pcap = l_cmd2_ptr->pcap_config.hard_min_pcap; + G_master_pcap_data.max_pcap = l_cmd2_ptr->pcap_config.sys_max_pcap; + G_master_pcap_data.oversub_pcap = l_cmd2_ptr->pcap_config.qpd_pcap; + G_master_pcap_data.system_pcap = l_cmd2_ptr->pcap_config.sys_max_pcap; + G_master_pcap_data.unthrottle = 0; + + // NOTE: The customer power cap will be set via a separate command + // from BMC/(H)TMGT or OPAL. } // The last byte in G_master_pcap_data is a counter that needs to be incremented. diff --git a/src/occ_405/occ_sys_config.c b/src/occ_405/occ_sys_config.c index d6dac89..10312d6 100755 --- a/src/occ_405/occ_sys_config.c +++ b/src/occ_405/occ_sys_config.c @@ -161,6 +161,7 @@ occSysConfigData_t G_sysConfigData = .oversub_pcap = 0, .system_pcap = 0, .unthrottle = 0, + .source = 0, }, diff --git a/src/occ_405/occ_sys_config.h b/src/occ_405/occ_sys_config.h index 2fd7535..c065786 100755 --- a/src/occ_405/occ_sys_config.h +++ b/src/occ_405/occ_sys_config.h @@ -230,8 +230,13 @@ typedef struct uint16_t system_pcap; // Fixed node power cap required by the system in 1W units uint8_t unthrottle; // Only used on ITEs -- is indicated from CMM uint8_t pcap_data_count; // Used by OCC only. Initialized to 0 and incremented by 1 with every new packet. + uint8_t source; // source of PCAP value currently in use } pcap_config_data_t; +// source of PCAP value +#define OUT_OF_BAND 1 // source is BMC or (H)TMGT +#define IN_BAND 2 // source is OPAL + // Memory Centaur Throttle settings typedef struct { |