From e447be8c2f21e3e7202779c546587afeb9e3e8ae Mon Sep 17 00:00:00 2001 From: mbroyles Date: Tue, 9 Jul 2019 12:16:13 -0500 Subject: [PATCH] Delete debug sensors to save SRAM Change-Id: Id1f23066951f09988a7f7dfdd868d7d9a166975e Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80156 Tested-by: FSP CI Jenkins Reviewed-by: Christopher J. Cain Reviewed-by: William A. Bryan Reviewed-by: Martha Broyles --- src/occ_405/amec/amec_amester.c | 59 +-------------- src/occ_405/amec/amec_dps.c | 5 +- src/occ_405/amec/amec_freq.c | 11 +-- src/occ_405/amec/amec_init.c | 12 --- src/occ_405/amec/amec_pcap.c | 4 +- src/occ_405/amec/amec_sensors_power.c | 19 ----- src/occ_405/amec/amec_sys.h | 49 ------------- src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c | 17 +---- src/occ_405/occbuildname.c | 2 +- src/occ_405/sensor/sensor_enum.h | 37 ---------- src/occ_405/sensor/sensor_info.c | 56 -------------- src/occ_405/sensor/sensor_table.c | 89 ----------------------- 12 files changed, 9 insertions(+), 351 deletions(-) diff --git a/src/occ_405/amec/amec_amester.c b/src/occ_405/amec/amec_amester.c index 21e52653..4406d385 100755 --- a/src/occ_405/amec/amec_amester.c +++ b/src/occ_405/amec/amec_amester.c @@ -276,7 +276,7 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt break; } - if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) && + if( (MEM_TYPE_CUMULUS != G_sysConfigData.mem_type) && ( ((i_sensor >= MRDM0) && (i_sensor <= MRDM7)) || ((i_sensor >= MWRM0) && @@ -319,7 +319,7 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt *((uint32_t *)dest) = l_sensorInfo.sensor.freq; dest+= 4; - if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) && + if( (MEM_TYPE_CUMULUS != G_sysConfigData.mem_type) && ( ((i_sensor >= MRDM0) && (i_sensor <= MRDM7)) || ((i_sensor >= MWRM0) && @@ -708,7 +708,6 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg, uint8_t l_rc,temp1,temp2; uint16_t i,j,cc,idx,temp16; uint32_t temp32a; - uint32_t *temp32; /*------------------------------------------------------------------------*/ /* Code */ /*------------------------------------------------------------------------*/ @@ -718,38 +717,6 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg, case 0x07: // Write individual AME parameters switch (i_msg->au8CmdData_ptr[1]) { - - case 20: // parameter 20: Set Probe Parameters - { - if (i_msg->au8CmdData_ptr[2]> (NUM_AMEC_FW_PROBES-1)) - { - o_resp[0]=i_msg->au8CmdData_ptr[2]; - *io_resp_length=1; - l_rc=COMPCODE_PARAM_OUT_OF_RANGE; - break; - } - if (i_msg->au8CmdData_ptr[3] < 1) - { - o_resp[0]=i_msg->au8CmdData_ptr[2]; - *io_resp_length=1; - l_rc=COMPCODE_PARAM_OUT_OF_RANGE; - break; - } - - temp32a=((uint32_t)i_msg->au8CmdData_ptr[4]<<24)+((uint32_t)i_msg->au8CmdData_ptr[5]<<16); - temp32a=temp32a+((uint32_t)i_msg->au8CmdData_ptr[6]<<8)+((uint32_t)i_msg->au8CmdData_ptr[7]); - temp32=(uint32_t*)temp32a; - - g_amec->ptr_probe250us[i_msg->au8CmdData_ptr[2]]=temp32; - g_amec->size_probe250us[i_msg->au8CmdData_ptr[2]]=i_msg->au8CmdData_ptr[3]; - g_amec->index_probe250us[i_msg->au8CmdData_ptr[2]]=0; // Reset index - - o_resp[0]=i_msg->au8CmdData_ptr[2]; // Return probe # - *io_resp_length=1; - l_rc = COMPCODE_NORMAL; - break; - }; - case 29: // parameter 29: Control vector recording modes and stream rates. { g_amec->stream_vector_rate=255; // First step is to set an invalid rate so no recording done at all @@ -787,28 +754,6 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg, l_rc = COMPCODE_NORMAL; break; - case 20: // parameter 20: Read Probe Parameters - { - if (i_msg->au8CmdData_ptr[2]> (NUM_AMEC_FW_PROBES-1)) - { - o_resp[0]=i_msg->au8CmdData_ptr[2]; - *io_resp_length=1; - l_rc=COMPCODE_PARAM_OUT_OF_RANGE; - break; - } - o_resp[1]=g_amec->size_probe250us[i_msg->au8CmdData_ptr[2]]; // Return size of object read by probe in bytes - temp32=g_amec->ptr_probe250us[i_msg->au8CmdData_ptr[2]]; // Get copy of 32 bit probe ptr - temp32a=(uint32_t)temp32; - o_resp[5]=(uint8_t)temp32a; - o_resp[4]=(uint8_t)((uint32_t)temp32a>>8); - o_resp[3]=(uint8_t)((uint32_t)temp32a>>16); - o_resp[2]=(uint8_t)((uint32_t)temp32a>>24); - o_resp[0]=i_msg->au8CmdData_ptr[2]; // Return probe # - *io_resp_length=6; - l_rc=COMPCODE_NORMAL; - break; - }; - case 29: // parameter 29: Stream recording control parameters o_resp[0]=(uint8_t)(g_amec->stream_vector_mode); o_resp[1]=(uint8_t)(g_amec->stream_vector_rate); diff --git a/src/occ_405/amec/amec_dps.c b/src/occ_405/amec/amec_dps.c index 40a623f7..9d4caee5 100755 --- a/src/occ_405/amec/amec_dps.c +++ b/src/occ_405/amec/amec_dps.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -376,8 +376,7 @@ void amec_dps_main(void) // Find the first valid core and send its frequency if (CORE_PRESENT(l_idx) && !CORE_OFFLINE(l_idx)) { - G_dcom_slv_outbox_tx.factual = - AMECSENSOR_ARRAY_PTR(FREQREQC0,l_idx)->sample; + G_dcom_slv_outbox_tx.factual = g_amec->proc[0].core[l_idx].f_request; break; } } diff --git a/src/occ_405/amec/amec_freq.c b/src/occ_405/amec/amec_freq.c index 136f1b0b..baef813b 100755 --- a/src/occ_405/amec/amec_freq.c +++ b/src/occ_405/amec/amec_freq.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -525,10 +525,6 @@ void amec_slv_proc_voting_box(void) G_non_dps_power_limited = FALSE; } - // Update the sensor telling us what the requested frequency is - sensor_update( AMECSENSOR_ARRAY_PTR(FREQREQC0,k), - (uint16_t) g_amec->proc[0].core[k].f_request); - #if DEBUG_PROC_VOTING_BOX /// This trace that can be used to debug the voting /// box and control loops. It will trace the reason why a @@ -960,10 +956,7 @@ void amec_slv_check_perf(void) TRAC_ERR("SnrBulkPwr %d > Sys Pcap %d ",l_snrBulkPwr, G_sysConfigData.pcap.system_pcap ); - TRAC_ERR("SnrFanPwr %d, SnrIOPwr %d, SnrStoragePwr %d, SnrGpuPrw %d ", - AMECSENSOR_PTR(PWRFAN)->sample, - AMECSENSOR_PTR(PWRIO)->sample, - AMECSENSOR_PTR(PWRSTORE)->sample, + TRAC_ERR("SnrGpuPrw %d ", AMECSENSOR_PTR(PWRGPU)->sample ); TRAC_ERR("SnrProcPwr 0 %d, SnrProcPwr 1 %d, SnrProcPwr 2 %d, SnrProcPwr 3 %d", diff --git a/src/occ_405/amec/amec_init.c b/src/occ_405/amec/amec_init.c index 8d16fb0b..3d3faa6b 100644 --- a/src/occ_405/amec/amec_init.c +++ b/src/occ_405/amec/amec_init.c @@ -299,18 +299,6 @@ void amec_init_gamec_struct(void) g_amec->stream_vector_delay=0; // Delay in msec before recording can begin g_amec->stream_vector_rate=0xff; // Invalid setting: requires IPMI command to select initial rate - for(l_idx=0; l_idxptr_probe250us[l_idx] = &g_amec->sys.pwrsys.sample; - g_amec->size_probe250us[l_idx] = 2; // Size of object pointed to by probe is 2 bytes - g_amec->index_probe250us[l_idx] = 0; // Initialize all offsets to 0 (used only if size > 2) - } - - g_amec->ptr_probe250us[1] = &g_amec->sys.pwrsys.sample; - g_amec->ptr_probe250us[2] = &g_amec->r_cnt; - g_amec->ptr_probe250us[2] = g_amec->ptr_probe250us[2]+2; // Point to low 16 bits of r_cnt - g_amec->ptr_probe250us[3] = &g_amec->r_cnt; - // Initialize the current_mem_pwr_ctl to indicate that memory power control is not supported // update memory control registers only if new ips/default memory power control is different g_amec->sys.current_mem_pwr_ctl = MEM_PWR_CTL_NO_SUPPORT; diff --git a/src/occ_405/amec/amec_pcap.c b/src/occ_405/amec/amec_pcap.c index 1ae24780..f4b69f6a 100755 --- a/src/occ_405/amec/amec_pcap.c +++ b/src/occ_405/amec/amec_pcap.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -540,8 +540,6 @@ void amec_ppb_fmax_calc(void) //Set the slaves local copy of ppb_fmax to that received from Master OCC. g_amec->proc[0].pwr_votes.ppb_fmax = G_dcom_slv_inbox_doorbell_rx.ppb_fmax; - // For debug - sensor_update( AMECSENSOR_PTR(PROBE250US0), g_amec->proc[0].pwr_votes.ppb_fmax); //CALCULATION done by MASTER OCC only. if(OCC_MASTER == G_occ_role) diff --git a/src/occ_405/amec/amec_sensors_power.c b/src/occ_405/amec/amec_sensors_power.c index 5c0ec54a..6b6fe9f7 100755 --- a/src/occ_405/amec/amec_sensors_power.c +++ b/src/occ_405/amec/amec_sensors_power.c @@ -328,19 +328,6 @@ bool amec_update_apss_sensors(void) // Convert Other Raw Misc Power from APSS into sensors // ---------------------------------------------------- - // Fans: Add up all Fan channels - temp32 = ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.fans[0]); - temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.fans[1]); - temp32 = ROUND_POWER(temp32 * l_bulk_voltage); - sensor_update( AMECSENSOR_PTR(PWRFAN), (uint16_t)temp32); - - // I/O: Add up all I/O channels - temp32 = ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.io[0]); - temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.io[1]); - temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.io[2]); - temp32 = ROUND_POWER(temp32 * l_bulk_voltage); - sensor_update( AMECSENSOR_PTR(PWRIO), (uint16_t)temp32); - // Memory: Add up all channels for the same processor. temp32 = ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.memory[l_proc][0]); temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.memory[l_proc][1]); @@ -364,12 +351,6 @@ bool amec_update_apss_sensors(void) g_amec->mem_snr_pwr[l_idx] = ROUND_POWER(l_temp * l_bulk_voltage); } - // Storage/Media - temp32 = ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.storage_media[0]); - temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.storage_media[1]); - temp32 = ROUND_POWER(temp32 * l_bulk_voltage); - sensor_update( AMECSENSOR_PTR(PWRSTORE), (uint16_t)temp32); - // Save total GPU adapter for this proc if (l_proc < MAX_GPU_DOMAINS) { diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h index 0509daf8..16924b6d 100755 --- a/src/occ_405/amec/amec_sys.h +++ b/src/occ_405/amec/amec_sys.h @@ -54,9 +54,6 @@ //************************************************************************* // Defines/Enums //************************************************************************* -// This is an arbitrary number of FW probes for use internally. -#define NUM_AMEC_FW_PROBES 8 - // Number of States in the AMEC State Machine (= AMEC_SMH_STATES_PER_LVL) #define NUM_AMEC_SMH_STATES AMEC_SMH_STATES_PER_LVL @@ -79,7 +76,6 @@ typedef struct sensor_t amessdur[NUM_AMEC_SMH_STATES]; sensor_t gpetickdur[NUM_GPE_ENGINES]; sensor_t prcdupdatedur; - sensor_t probe250us[NUM_AMEC_FW_PROBES]; sensor_t voltvddsense; sensor_t voltvdnsense; @@ -89,36 +85,6 @@ typedef struct } amec_fw_t; -//------------------------------------------------------------- -// Fan Sub-structure -//------------------------------------------------------------- -typedef struct -{ - // Sensors - sensor_t pwr250usfan; - -} amec_fans_t; - -//------------------------------------------------------------- -// IO Sub-structure -//------------------------------------------------------------- -typedef struct -{ - // Sensors - sensor_t pwr250usio; - -} amec_io_t; - -//------------------------------------------------------------- -// Storage Sub-structure -//------------------------------------------------------------- -typedef struct -{ - // Sensors - sensor_t pwr250usstore; - -} amec_store_t; - //------------------------------------------------------------- // Proc Sub-structure //------------------------------------------------------------- @@ -264,7 +230,6 @@ typedef struct //----------------------------------- // Sensors //----------------------------------- - sensor_t freq250us; sensor_t freqa; sensor_t ips4ms; sensor_t mcpifd4ms; @@ -633,14 +598,6 @@ typedef struct // Physical Structure // //--------------------------------------------------------- - // IO Data - amec_io_t io; - - // Storage Data - amec_store_t storage; - - // Fan Data - amec_fans_t fan; // Overall System Data amec_systemwide_t sys; @@ -705,7 +662,6 @@ typedef struct // 32 bit counter of 250usec ticks uint32_t r_cnt; - void * ptr_probe250us[NUM_AMEC_FW_PROBES]; // array holding ptrs to data that is read by probe250us sensors // 32-bit ptr to streaming buffer which contains 16 bit elements uint16_t *ptr_stream_buffer; // 32-bit index for next write into streaming buffer @@ -736,13 +692,8 @@ typedef struct uint16_t cent_l4_ipl_state[MAX_NUM_CENTAURS]; // input from OCC master to signal a desire to power down the L4s (!=0) uint8_t l4_powerdown_requestm; - // indicates which of the L4 Centaurs is being monitored by probe. - uint16_t probe_l4_centaur; // holds the sum of all the memory power sensors (32msec) uint16_t total_memory_power; - uint16_t probetemp[NUM_AMEC_FW_PROBES]; // array holding temporary probe data - uint8_t size_probe250us[NUM_AMEC_FW_PROBES]; // size of object pointed at by each probe (1 byte, 2 bytes, or 4 bytes) - uint8_t index_probe250us[NUM_AMEC_FW_PROBES]; // index offset to read object pointed to by each probe (only valid for size > 2) } amec_sys_t; diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c index ce91e648..d81b91fa 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c @@ -881,26 +881,11 @@ void apss_store_ipmi_sensor_id(const uint16_t i_channel, const apss_cfg_adc_v20_ case ADC_IO_A: case ADC_IO_B: case ADC_IO_C: - if (i_adc->ipmisensorId != 0) - { - AMECSENSOR_PTR(PWRIO)->ipmi_sid = i_adc->ipmisensorId; - } - break; - case ADC_FANS_A: case ADC_FANS_B: - if (i_adc->ipmisensorId != 0) - { - AMECSENSOR_PTR(PWRFAN)->ipmi_sid = i_adc->ipmisensorId; - } - break; - case ADC_STORAGE_A: case ADC_STORAGE_B: - if (i_adc->ipmisensorId != 0) - { - AMECSENSOR_PTR(PWRSTORE)->ipmi_sid = i_adc->ipmisensorId; - } + //None break; case ADC_12V_SENSE: diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c index fb091386..28ea467f 100755 --- a/src/occ_405/occbuildname.c +++ b/src/occ_405/occbuildname.c @@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = #else -volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /**/ "op_occ_190624a\0" /**/ ; +volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /**/ "op_occ_190710a\0" /**/ ; #endif diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h index 481e9120..51238d59 100755 --- a/src/occ_405/sensor/sensor_enum.h +++ b/src/occ_405/sensor/sensor_enum.h @@ -60,15 +60,6 @@ enum e_gsid AMESSdur6, // Combined duration of the AMEC Master & Slave 6 AMESSdur7, // Combined duration of the AMEC Master & Slave 7 - PROBE250US0, // Internal Sensor for debug via AMESTER - PROBE250US1, // Internal Sensor for debug via AMESTER - PROBE250US2, // Internal Sensor for debug via AMESTER - PROBE250US3, // Internal Sensor for debug via AMESTER - PROBE250US4, // Internal Sensor for debug via AMESTER - PROBE250US5, // Internal Sensor for debug via AMESTER - PROBE250US6, // Internal Sensor for debug via AMESTER - PROBE250US7, // Internal Sensor for debug via AMESTER - GPEtickdur0, // Duration on the GPE0 Engine GPEtickdur1, // Duration on the GPE1 Engine RTLtickdur, // Duration on the RTL tick interrupt @@ -77,9 +68,6 @@ enum e_gsid // System Sensors // ------------------------------------------------------ PWRSYS, // System DC Power (from APSS) - PWRFAN, // Fan Power (from APSS) - PWRIO, // IO Subsystem Power (from APSS) - PWRSTORE, // Storage Subsys Power (from APSS) PWRGPU, // GPU Subsystem Power (from APSS) e.g. Nvidia GPU PWRAPSSCH0, // These PWRAPSSCH sensors are used to report the power PWRAPSSCH1, // provided by each of the 16 APSS channels. @@ -150,31 +138,6 @@ enum e_gsid // Core Sensors // ------------------------------------------------------ - FREQREQC0, // requested frequency - FREQREQC1, - FREQREQC2, - FREQREQC3, - FREQREQC4, - FREQREQC5, - FREQREQC6, - FREQREQC7, - FREQREQC8, - FREQREQC9, - FREQREQC10, - FREQREQC11, - FREQREQC12, - FREQREQC13, - FREQREQC14, - FREQREQC15, - FREQREQC16, - FREQREQC17, - FREQREQC18, - FREQREQC19, - FREQREQC20, - FREQREQC21, - FREQREQC22, - FREQREQC23, - FREQAC0, // actual frequency FREQAC1, FREQAC2, diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c index d0f4ea11..5cc4bb70 100755 --- a/src/occ_405/sensor/sensor_info.c +++ b/src/occ_405/sensor/sensor_info.c @@ -67,16 +67,10 @@ // representation of the sensor name #define SENSOR_W_NUM(sensor_name, num) sensor_name##num -#define SENSOR_W_CENTAUR_NUM_HELPER(sensor_name, memc,centL,cent,ppL,pp) sensor_name##memc##centL##cent##ppL##pp -#define SENSOR_W_CENTAUR_NUM(sensor_name, memc,cent,pp) SENSOR_W_CENTAUR_NUM_HELPER(sensor_name,memc,C,cent,P,pp) - // These will stringify the enum so to create the sensor name. This will help // save keystrokes, as well as reduce typos & copy paste errors. #define SENSOR_STRING(sensor_name) #sensor_name -#define CENTAUR_SENSOR_STRING_HELPER(sensor_name, memc,centL,cent,ppL,pp) SENSOR_STRING(sensor_name##memc##centL##cent##ppL##pp) -#define CENTAUR_SENSOR_STRING(sensor_name,memc,cent,pp) CENTAUR_SENSOR_STRING_HELPER(sensor_name, memc,C,cent,P,pp) - // This will create a set of 6 sensor entries into the sensor list table. // (one for each quad...) The base name of the sensor enum must be passed // and this macro will take care of the paste & stringify operations. @@ -207,44 +201,6 @@ .sensor = { units, type, location, number, frequency, scaleFactor },} -// This will create a set of 16 sensor entries into the sensor list table. -// (one for each centaur...) The base name of the sensor enum must be passed -// and this macro will take care of the paste & stringify operations. -#define SEN_CENTR_ENTRY_SET(sensor_name, units, type, location, number, frequency, scaleFactor) \ - [SENSOR_W_CENTAUR_NUM(sensor_name,0,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,0,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,0,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,0,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,1,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,1,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,1,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,1,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,2,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,2,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,2,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,2,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,3,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,3,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,3,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,3,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,4,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,4,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,4,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,4,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,5,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,5,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,5,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,5,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,6,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,6,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,6,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,6,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,7,0,0)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,7,0,0), \ - .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_CENTAUR_NUM(sensor_name,7,0,1)] = {.name = CENTAUR_SENSOR_STRING(sensor_name,7,0,1), \ - .sensor = { units, type, location, number, frequency, scaleFactor },} - - // This table takes care of the ordering of the sensors (by GSID) and all parameters needed for AMEC or AMESTER. The order // that is in the table below doesn't matter because we use designated initializers. // If anything more than the barebones sensor_t is need, an applet will need to be called in order to gather that data. @@ -266,23 +222,12 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( AMESSdur5, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( AMESSdur6, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( AMESSdur7, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US0, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US1, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US2, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US3, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US4, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US5, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US6, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PROBE250US7, "n/a\0", AMEC_SENSOR_TYPE_GENERIC, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( GPEtickdur0, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( GPEtickdur1, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( RTLtickdur, "us\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_OCC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), /* ==SystemSensors== NameString Units Type Location Number Freq ScaleFactor */ SENSOR_INFO_T_ENTRY( PWRSYS, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PWRFAN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PWRIO, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( PWRSTORE, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWRGPU, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_GPU, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWRAPSSCH0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWRAPSSCH1, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_SYS, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), @@ -335,7 +280,6 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( TEMPVDD, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_4TH_TICK_HZ, AMEFP( 1, 0) ), /* ==CoreSensors== NameString Units Type Location Number Freq ScaleFactor */ - SENS_CORE_ENTRY_SET( FREQREQC, "MHz\0", AMEC_SENSOR_TYPE_FREQ, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ), SENS_CORE_ENTRY_SET( FREQAC, "MHz\0", AMEC_SENSOR_TYPE_FREQ, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ), SENS_CORE_ENTRY_SET( IPSC, "MIP\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ), SENS_CORE_ENTRY_SET( NOTBZEC, "cyc\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ), diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c index 64f40b06..d928e3a0 100755 --- a/src/occ_405/sensor/sensor_table.c +++ b/src/occ_405/sensor/sensor_table.c @@ -38,11 +38,6 @@ extern amec_sys_t g_amec_sys; // Will paste number onto enum 'sensor base name' #define SENSOR_W_NUM(sensor,num) sensor##num -// These will paste a number onto a sensor name base to create the full enum -// representation of the sensor name -#define SENSOR_W_CENTAUR_NUM_HELPER(sensor_name, memc,centL,cent,ppL,pp) sensor_name##memc##centL##cent##ppL##pp -#define SENSOR_W_CENTAUR_NUM(sensor_name, memc,cent,pp) SENSOR_W_CENTAUR_NUM_HELPER(sensor_name,memc,C,cent,P,pp) - // Will define a set of "core sensor pointers" by passing in base sensor name // and ptr to [0] entry of array of 24 core sensors #define CORE_SENSOR_PTRS(sensor,ptrbase,ptrmember) \ @@ -114,26 +109,6 @@ extern amec_sys_t g_amec_sys; [SENSOR_W_NUM(sensor, 14)] = ptrbase.ptrmember[14], \ [SENSOR_W_NUM(sensor, 15)] = ptrbase.ptrmember[15] -// Will define a set of "centaur_port_pair sensor pointers" by passing in -// base sensor name and ptr to [0] entry of array of 16 memcontroller sensors -#define PORTPAIR_SENSOR_PTRS(sensor,ptrbase,ptrmember,ptrsnsr) \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 0)] = ptrbase[0].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 1)] = ptrbase[0].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 0)] = ptrbase[1].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 1)] = ptrbase[1].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 0)] = ptrbase[2].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 1)] = ptrbase[2].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 0)] = ptrbase[3].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 1)] = ptrbase[3].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 0)] = ptrbase[4].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 1)] = ptrbase[4].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 0)] = ptrbase[5].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 1)] = ptrbase[5].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 0)] = ptrbase[6].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 1)] = ptrbase[6].ptrmember[1].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 0)] = ptrbase[7].ptrmember[0].ptrsnsr, \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 1)] = ptrbase[7].ptrmember[1].ptrsnsr - // Will create an entry in the G_amec_mini_sensor_list with a pointer at // the sensor index (gsid) passed in by "sensor" #define MINI_SENSOR_PTR(sensor,ptr) [sensor] = ptr @@ -236,46 +211,6 @@ extern amec_sys_t g_amec_sys; [SENSOR_W_NUM(sensor, 6)] = NULL, \ [SENSOR_W_NUM(sensor, 7)] = NULL -// Will define a set of "memory controller mini sensor ptrs" by passing in -// base sensor nameand ptr to [0] entry of array of 8 memcontroller sensors -#define PORTPAIR_MINI_SENSOR_PTRS(sensor,ptr) \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 0)] = ptr[ 0], \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 1)] = ptr[ 1], \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 0)] = ptr[ 2], \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 1)] = ptr[ 3], \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 0)] = ptr[ 4], \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 1)] = ptr[ 5], \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 0)] = ptr[ 6], \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 1)] = ptr[ 7], \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 0)] = ptr[ 8], \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 1)] = ptr[ 9], \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 0)] = ptr[10], \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 1)] = ptr[11], \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 0)] = ptr[12], \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 1)] = ptr[13], \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 0)] = ptr[14], \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 1)] = ptr[15] - -// Will define a set of "memc mini-sensor pointers" as NULL, since not -// every sensor must have a mini-sensor. -#define PORTPAIR_MINI_SENSOR_PTRS_NULL(sensor) \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 1, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 2, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 3, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 4, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 5, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 6, 0, 1)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 0)] = NULL, \ - [SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 1)] = NULL - //**************************************************************************** // Sensor Pointer Table // ---------------------- @@ -298,14 +233,6 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( AMESSdur5, &g_amec_sys.fw.amessdur[5]), SENSOR_PTR( AMESSdur6, &g_amec_sys.fw.amessdur[6]), SENSOR_PTR( AMESSdur7, &g_amec_sys.fw.amessdur[7]), - SENSOR_PTR( PROBE250US0, &g_amec_sys.fw.probe250us[0]), - SENSOR_PTR( PROBE250US1, &g_amec_sys.fw.probe250us[1]), - SENSOR_PTR( PROBE250US2, &g_amec_sys.fw.probe250us[2]), - SENSOR_PTR( PROBE250US3, &g_amec_sys.fw.probe250us[3]), - SENSOR_PTR( PROBE250US4, &g_amec_sys.fw.probe250us[4]), - SENSOR_PTR( PROBE250US5, &g_amec_sys.fw.probe250us[5]), - SENSOR_PTR( PROBE250US6, &g_amec_sys.fw.probe250us[6]), - SENSOR_PTR( PROBE250US7, &g_amec_sys.fw.probe250us[7]), SENSOR_PTR( GPEtickdur0, &g_amec_sys.fw.gpetickdur[0]), SENSOR_PTR( GPEtickdur1, &g_amec_sys.fw.gpetickdur[1]), SENSOR_PTR( RTLtickdur, &g_amec_sys.fw.prcdupdatedur), @@ -314,9 +241,6 @@ const sensor_ptr_t G_amec_sensor_list[] = // System Sensors // ------------------------------------------------------ SENSOR_PTR( PWRSYS, &g_amec_sys.sys.pwrsys), - SENSOR_PTR( PWRFAN, &g_amec_sys.fan.pwr250usfan), - SENSOR_PTR( PWRIO, &g_amec_sys.io.pwr250usio), - SENSOR_PTR( PWRSTORE, &g_amec_sys.storage.pwr250usstore), SENSOR_PTR( PWRGPU, &g_amec_sys.sys.pwr250usgpu), SENSOR_PTR( PWRAPSSCH0, &g_amec_sys.sys.pwrapssch[0]), SENSOR_PTR( PWRAPSSCH1, &g_amec_sys.sys.pwrapssch[1]), @@ -381,7 +305,6 @@ const sensor_ptr_t G_amec_sensor_list[] = // ------------------------------------------------------ // Core Sensors (24 of each) // ------------------------------------------------------ - CORE_SENSOR_PTRS( FREQREQC , &g_amec_sys.proc[0].core, freq250us), CORE_SENSOR_PTRS( FREQAC , &g_amec_sys.proc[0].core, freqa), CORE_SENSOR_PTRS( IPSC , &g_amec_sys.proc[0].core, ips4ms), CORE_SENSOR_PTRS( NOTBZEC , &g_amec_sys.proc[0].core, mcpifd4ms), @@ -464,14 +387,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( AMESSdur5, NULL), MINI_SENSOR_PTR( AMESSdur6, NULL), MINI_SENSOR_PTR( AMESSdur7, NULL), - MINI_SENSOR_PTR( PROBE250US0, NULL), - MINI_SENSOR_PTR( PROBE250US1, NULL), - MINI_SENSOR_PTR( PROBE250US2, NULL), - MINI_SENSOR_PTR( PROBE250US3, NULL), - MINI_SENSOR_PTR( PROBE250US4, NULL), - MINI_SENSOR_PTR( PROBE250US5, NULL), - MINI_SENSOR_PTR( PROBE250US6, NULL), - MINI_SENSOR_PTR( PROBE250US7, NULL), MINI_SENSOR_PTR( GPEtickdur0, NULL), MINI_SENSOR_PTR( GPEtickdur1, NULL), MINI_SENSOR_PTR( RTLtickdur, NULL), @@ -480,9 +395,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = // System Sensors // ------------------------------------------------------ MINI_SENSOR_PTR( PWRSYS, NULL), - MINI_SENSOR_PTR( PWRFAN, NULL), - MINI_SENSOR_PTR( PWRIO, NULL), - MINI_SENSOR_PTR( PWRSTORE, NULL), MINI_SENSOR_PTR( PWRGPU, NULL), MINI_SENSOR_PTR( PWRAPSSCH0, NULL), MINI_SENSOR_PTR( PWRAPSSCH1, NULL), @@ -546,7 +458,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = // ------------------------------------------------------ // Core Sensors (24 of each) // ------------------------------------------------------ - CORE_MINI_SENSOR_PTRS_NULL( FREQREQC ), CORE_MINI_SENSOR_PTRS_NULL( FREQAC ), CORE_MINI_SENSOR_PTRS( IPSC, &G_dcom_slv_outbox_tx.ips4msp0cy ), CORE_MINI_SENSOR_PTRS( NOTBZEC, &G_dcom_slv_outbox_tx.mcpifd4msp0cy ),