diff options
author | Chris Cain <cjcain@us.ibm.com> | 2016-10-24 16:28:57 -0500 |
---|---|---|
committer | Christopher J. Cain <cjcain@us.ibm.com> | 2016-10-27 16:14:21 -0400 |
commit | 567a3d045dad8431b0a73fbbfac95332475d5b0a (patch) | |
tree | bc49a4a416bbb189f881e0f81032ad48a6215d75 | |
parent | f18d4c19387deabb78c030a5c25ec09afb08019e (diff) | |
download | talos-occ-567a3d045dad8431b0a73fbbfac95332475d5b0a.tar.gz talos-occ-567a3d045dad8431b0a73fbbfac95332475d5b0a.zip |
Sensor updates for AVS Bus data collection
RTC: 137620
Change-Id: I2e394fdff7672c0a76c78c5d0f7f57885f1c5cfd
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31757
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: Christopher J. Cain <cjcain@us.ibm.com>
-rwxr-xr-x | src/occ_405/amec/amec_analytics.c | 8 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sensors_power.c | 14 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sys.h | 8 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c | 2 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_enum.h | 14 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_info.c | 11 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_table.c | 26 |
7 files changed, 51 insertions, 32 deletions
diff --git a/src/occ_405/amec/amec_analytics.c b/src/occ_405/amec/amec_analytics.c index fc0ebfe..c806292 100755 --- a/src/occ_405/amec/amec_analytics.c +++ b/src/occ_405/amec/amec_analytics.c @@ -295,11 +295,11 @@ void amec_analytics_main(void) (UINT32)tempreg; // load accumulator from last 2msec - tempaccum = g_amec->proc[i].cur250usvdd.src_accum_snapshot; + tempaccum = g_amec->proc[i].curvdd.src_accum_snapshot; // save current accum state for next 2msec - g_amec->proc[i].cur250usvdd.src_accum_snapshot = - (uint32_t)g_amec->proc[i].cur250usvdd.accumulator; - tempaccum = (uint32_t)g_amec->proc[i].cur250usvdd.accumulator + g_amec->proc[i].curvdd.src_accum_snapshot = + (uint32_t)g_amec->proc[i].curvdd.accumulator; + tempaccum = (uint32_t)g_amec->proc[i].curvdd.accumulator - tempaccum; // total accumulation over 2msec tempaccum = tempaccum>>3; g_amec->g44_avg[(i*MSA)+14] = g_amec->g44_avg[(i*MSA)+14] + diff --git a/src/occ_405/amec/amec_sensors_power.c b/src/occ_405/amec/amec_sensors_power.c index 912d5b0..787d0dc 100755 --- a/src/occ_405/amec/amec_sensors_power.c +++ b/src/occ_405/amec/amec_sensors_power.c @@ -267,7 +267,7 @@ void amec_update_apss_sensors(void) temp32 = ((l_vdd * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS; sensor_update( AMECSENSOR_PTR(PWR250USVDD0), (uint16_t)temp32); temp32 = ((l_vcs_vio_vpcie * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS; - sensor_update( AMECSENSOR_PTR(PWR250USVCS0), (uint16_t)temp32); + sensor_update( AMECSENSOR_PTR(PWRVCSVIOVDN), (uint16_t)temp32); // ---------------------------------------------------- // Convert Other Raw Misc Power from APSS into sensors @@ -529,8 +529,8 @@ void amec_update_external_voltage() l_temp = (l_data & 0x00FF0000) >>16; l_vcs = 16125 - ((uint32_t)l_temp * 625)/10; - sensor_update( AMECSENSOR_PTR(VOLT250USP0V0), (uint16_t) l_vdd); - sensor_update( AMECSENSOR_PTR(VOLT250USP0V1), (uint16_t) l_vcs); + sensor_update( AMECSENSOR_PTR(VOLTVDD), (uint16_t) l_vdd); + sensor_update( AMECSENSOR_PTR(VOLTVDN), (uint16_t) l_vcs); } // Function Specification @@ -538,7 +538,7 @@ void amec_update_external_voltage() // Name: amec_update_current_sensor // // Description: Estimates Vdd output current based on input power and Vdd voltage setting. -// Compute CUR250USVDD0 (current out of Vdd regulator) +// Compute CURVDD (current out of Vdd regulator) // // Flow: // @@ -553,7 +553,7 @@ void amec_update_current_sensor(void) { uint32_t result32; //temporary result uint16_t l_pow_reg_input_dW = AMECSENSOR_PTR(PWR250USVDD0)->sample * 10; // convert to dW by *10. - uint16_t l_vdd_reg = AMECSENSOR_PTR(VOLT250USP0V0)->sample; + uint16_t l_vdd_reg = AMECSENSOR_PTR(VOLTVDD)->sample; uint32_t l_pow_reg_output_mW; uint32_t l_curr_output; @@ -582,9 +582,9 @@ void amec_update_current_sensor(void) // p_out: max=300M (dW*0.00001) in 29 bits // v_out: min=5000 (0.0001 V) max=16000(0.0001 V) in 14 bits // i_out: max = 300M/5000 = 60000 (dW*0.00001/(0.0001V)= 0.01A), in 16 bits. - // VOLT250USP0V0 in units of 0.0001 V = 0.1 mV. (multiply by 0.1 to get mV) + // VOLTVDD in units of 0.0001 V = 0.1 mV. (multiply by 0.1 to get mV) l_curr_output = l_pow_reg_output_mW / l_vdd_reg; - sensor_update(AMECSENSOR_PTR(CUR250USVDD0), l_curr_output); + sensor_update(AMECSENSOR_PTR(CURVDD), l_curr_output); } diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h index 2b9df7a..3038a04 100755 --- a/src/occ_405/amec/amec_sys.h +++ b/src/occ_405/amec/amec_sys.h @@ -458,8 +458,8 @@ typedef struct vectorSensor_t memsp2ms_vector; sensor_t pwr250us; sensor_t pwr250usvdd; - sensor_t cur250usvdd; - sensor_t pwr250usvcs; + sensor_t curvdd; + sensor_t pwrvcsviovdn; sensor_t pwr250usmem; sensor_t sleepcnt4ms; sensor_t winkcnt4ms; @@ -477,6 +477,10 @@ typedef struct sensor_t temp16msdimm; sensor_t memsp2ms_tls; + sensor_t curvdn; + sensor_t pwrvdd; + sensor_t pwrvdn; + // Calculations & Interim Data uint16_t sleep_cnt; uint16_t winkle_cnt; diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c index 4ec2ce9..1c4512b 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds_datacnfg.c @@ -632,7 +632,7 @@ void apss_store_ipmi_sensor_id(const uint16_t i_channel, const apss_cfg_adc_v20_ case ADC_VCS_VIO_VPCIE_PROC_3: if (l_proc == (i_adc->assignment - ADC_VCS_VIO_VPCIE_PROC_0)) { - AMECSENSOR_PTR(PWR250USVCS0)->ipmi_sid = i_adc->ipmisensorId; + AMECSENSOR_PTR(PWRVCSVIOVDN)->ipmi_sid = i_adc->ipmisensorId; } break; diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h index 2bba7b1..0c793d0 100755 --- a/src/occ_405/sensor/sensor_enum.h +++ b/src/occ_405/sensor/sensor_enum.h @@ -116,9 +116,9 @@ enum e_gsid IPS4MSP0, MEMSP2MSP0, PWR250USP0, - PWR250USVDD0, - CUR250USVDD0, - PWR250USVCS0, + PWR250USVDD0, // from APSS (no change) + CURVDD, // from AVSBUS - renamed from CUR250USVDD0 (was calculated from APSS data) + PWRVCSVIOVDN, // from APSS - rename from PWR250USVCS0 to show what it includes PWR250USMEM0, SLEEPCNT4MSP0, WINKCNT4MSP0, @@ -462,13 +462,17 @@ enum e_gsid TEMPC22, TEMPC23, + CURVDN, // new - from AVSBUS + PWRVDD, // new - calculated from AVSBUS data + PWRVDN, // new - calculated from AVSBUS data + // ------------------------------------------------------ // Regulator Sensors // ------------------------------------------------------ UVOLT250USP0V0, UVOLT250USP0V1, - VOLT250USP0V0, - VOLT250USP0V1, + VOLTVDD, // always from AVSBUS - renamed from VOLT250USP0V0 + VOLTVDN, // always from AVSBUS - renamed from VOLT250USP0V1 // ------------------------------------------------------ // Memory Sensors diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c index 3713d9f..5f1b03b 100755 --- a/src/occ_405/sensor/sensor_info.c +++ b/src/occ_405/sensor/sensor_info.c @@ -265,8 +265,8 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( MEMSP2MSP0, "%\0", AMEC_SENSOR_TYPE_TIME, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USP0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USVDD0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( CUR250USVDD0, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1,-2) ), - SENSOR_INFO_T_ENTRY( PWR250USVCS0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), + SENSOR_INFO_T_ENTRY( CURVDD, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1,-2) ), + SENSOR_INFO_T_ENTRY( PWRVCSVIOVDN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( PWR250USMEM0, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( SLEEPCNT4MSP0, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( WINKCNT4MSP0, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), @@ -278,12 +278,15 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( VRFAN250USPROC, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENSOR_INFO_T_ENTRY( VRHOT250USPROC, "pin\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), SENS_QUAD_ENTRY_SET( TEMPQ, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_4MS_IN_HZ, AMEFP( 1, 0) ), + SENSOR_INFO_T_ENTRY( CURVDN, "A\0", AMEC_SENSOR_TYPE_CURRENT, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1,-2) ), + SENSOR_INFO_T_ENTRY( PWRVDD, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), + SENSOR_INFO_T_ENTRY( PWRVDN, "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), /* ==ReguSensors== NameString Units Type Location Number Freq ScaleFactor */ SENSOR_INFO_T_ENTRY( UVOLT250USP0V0, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), SENSOR_INFO_T_ENTRY( UVOLT250USP0V1, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), - SENSOR_INFO_T_ENTRY( VOLT250USP0V0, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), - SENSOR_INFO_T_ENTRY( VOLT250USP0V1, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), + SENSOR_INFO_T_ENTRY( VOLTVDD, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), + SENSOR_INFO_T_ENTRY( VOLTVDN, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, -1) ), /* ==CoreSensors== NameString Units Type Location Number Freq ScaleFactor */ SENS_CORE_ENTRY_SET( FREQ250USP0C, "MHz\0", AMEC_SENSOR_TYPE_FREQ, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ), diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c index 519ca61..33c34d7 100755 --- a/src/occ_405/sensor/sensor_table.c +++ b/src/occ_405/sensor/sensor_table.c @@ -336,8 +336,8 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( MEMSP2MSP0, &g_amec_sys.proc[0].memsp2ms), SENSOR_PTR( PWR250USP0, &g_amec_sys.proc[0].pwr250us), SENSOR_PTR( PWR250USVDD0, &g_amec_sys.proc[0].pwr250usvdd), - SENSOR_PTR( CUR250USVDD0, &g_amec_sys.proc[0].cur250usvdd), - SENSOR_PTR( PWR250USVCS0, &g_amec_sys.proc[0].pwr250usvcs), + SENSOR_PTR( CURVDD, &g_amec_sys.proc[0].curvdd), + SENSOR_PTR( PWRVCSVIOVDN, &g_amec_sys.proc[0].pwrvcsviovdn), SENSOR_PTR( PWR250USMEM0, &g_amec_sys.proc[0].pwr250usmem), SENSOR_PTR( SLEEPCNT4MSP0, &g_amec_sys.proc[0].sleepcnt4ms), SENSOR_PTR( WINKCNT4MSP0, &g_amec_sys.proc[0].winkcnt4ms), @@ -371,6 +371,10 @@ const sensor_ptr_t G_amec_sensor_list[] = CORE_SENSOR_PTRS( PWRPX250USP0C , &g_amec_sys.proc[0].core, pwrpx250us), CORE_SENSOR_PTRS( TEMPC, &g_amec_sys.proc[0].core, tempc), + SENSOR_PTR( CURVDN, &g_amec_sys.proc[0].curvdn), + SENSOR_PTR( PWRVDD, &g_amec_sys.proc[0].pwrvdd), + SENSOR_PTR( PWRVDN, &g_amec_sys.proc[0].pwrvdn), + // ------------------------------------------------------ // Memory Sensors // ------------------------------------------------------ @@ -405,8 +409,8 @@ const sensor_ptr_t G_amec_sensor_list[] = // ------------------------------------------------------ SENSOR_PTR( UVOLT250USP0V0, &g_amec_sys.proc[0].vrm[0].uvolt250us), SENSOR_PTR( UVOLT250USP0V1, &g_amec_sys.proc[0].vrm[1].uvolt250us), - SENSOR_PTR( VOLT250USP0V0, &g_amec_sys.proc[0].vrm[0].volt250us), - SENSOR_PTR( VOLT250USP0V1, &g_amec_sys.proc[0].vrm[1].volt250us), + SENSOR_PTR( VOLTVDD, &g_amec_sys.proc[0].vrm[0].volt250us), + SENSOR_PTR( VOLTVDN, &g_amec_sys.proc[0].vrm[1].volt250us), // ------------------------------------------------------ // Partition Sensors @@ -494,8 +498,8 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = MINI_SENSOR_PTR( MEMSP2MSP0, NULL), MINI_SENSOR_PTR( PWR250USP0, &G_dcom_slv_outbox_tx.pwr250usp0), MINI_SENSOR_PTR( PWR250USVDD0, NULL), - MINI_SENSOR_PTR( CUR250USVDD0, NULL), - MINI_SENSOR_PTR( PWR250USVCS0, NULL), + MINI_SENSOR_PTR( CURVDD, NULL), + MINI_SENSOR_PTR( PWRVCSVIOVDN, NULL), MINI_SENSOR_PTR( PWR250USMEM0, &G_dcom_slv_outbox_tx.pwr250usmemp0), MINI_SENSOR_PTR( SLEEPCNT4MSP0, &G_dcom_slv_outbox_tx.sleepcnt4msp0), MINI_SENSOR_PTR( WINKCNT4MSP0, &G_dcom_slv_outbox_tx.winkcnt4msp0), @@ -526,9 +530,13 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = CORE_MINI_SENSOR_PTRS_NULL( MSTL2MSP0C ), CORE_MINI_SENSOR_PTRS_NULL( CMT2MSP0C ), CORE_MINI_SENSOR_PTRS_NULL( PPICP0C ), - CORE_MINI_SENSOR_PTRS( PWRPX250USP0C, &G_dcom_slv_outbox_tx.pwrpx250usp0cy), // + CORE_MINI_SENSOR_PTRS( PWRPX250USP0C, &G_dcom_slv_outbox_tx.pwrpx250usp0cy), CORE_MINI_SENSOR_PTRS_NULL( TEMPC ), + MINI_SENSOR_PTR( CURVDN, NULL), + MINI_SENSOR_PTR( PWRVDD, NULL), + MINI_SENSOR_PTR( PWRVDN, NULL), + // ------------------------------------------------------ // Memory Sensors // ------------------------------------------------------ @@ -560,8 +568,8 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = // ------------------------------------------------------ MINI_SENSOR_PTR( UVOLT250USP0V0, NULL), MINI_SENSOR_PTR( UVOLT250USP0V1, NULL), - MINI_SENSOR_PTR( VOLT250USP0V0, NULL), - MINI_SENSOR_PTR( VOLT250USP0V1, NULL), + MINI_SENSOR_PTR( VOLTVDD, NULL), + MINI_SENSOR_PTR( VOLTVDN, NULL), // ------------------------------------------------------ // Partition Sensors |