diff options
author | mbroyles <mbroyles@us.ibm.com> | 2019-07-11 11:46:07 -0500 |
---|---|---|
committer | Martha Broyles <mbroyles@us.ibm.com> | 2019-07-12 15:03:02 -0500 |
commit | 8bbfabefb85feea1f7a47804f8e167f238dd149a (patch) | |
tree | 0e1c92670c10259ab6fa7c151b3438e9523695a2 | |
parent | e447be8c2f21e3e7202779c546587afeb9e3e8ae (diff) | |
download | talos-occ-8bbfabefb85feea1f7a47804f8e167f238dd149a.tar.gz talos-occ-8bbfabefb85feea1f7a47804f8e167f238dd149a.zip |
New WOF sensor for final adjusted Ceff Ratio Vdd
Change-Id: I6b5447248b9beeb462556a4c943bb7f21b172a15
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80298
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
-rwxr-xr-x | src/occ_405/occbuildname.c | 2 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_enum.h | 1 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_info.c | 3 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_table.c | 10 | ||||
-rw-r--r-- | src/occ_405/wof/wof.c | 2 | ||||
-rw-r--r-- | src/occ_405/wof/wof.h | 9 |
6 files changed, 16 insertions, 11 deletions
diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c index 28ea467..7eb2a15 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"))) = /*<BuildName>*/ "op_occ_190710a\0" /*</BuildName>*/ ; +volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_190712a\0" /*</BuildName>*/ ; #endif diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h index 51238d5..0987497 100755 --- a/src/occ_405/sensor/sensor_enum.h +++ b/src/occ_405/sensor/sensor_enum.h @@ -519,6 +519,7 @@ enum e_gsid CEFFVDNRATIO, VRATIO, OCS_ADDR, + CEFFVDDRATIOADJ, // ------------------------------------------------------ // END of Sensor List (this must be last entry) diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c index 5cc4bb7..ceeae58 100755 --- a/src/occ_405/sensor/sensor_info.c +++ b/src/occ_405/sensor/sensor_info.c @@ -322,7 +322,8 @@ const sensor_info_t G_sensor_info[] = SENSOR_INFO_T_ENTRY( CEFFVDDRATIO, "%\0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1,-2) ), SENSOR_INFO_T_ENTRY( CEFFVDNRATIO, "%\0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1,-2) ), SENSOR_INFO_T_ENTRY( VRATIO, " \0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ), - SENSOR_INFO_T_ENTRY( OCS_ADDR, "%\0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -2) ), + SENSOR_INFO_T_ENTRY( OCS_ADDR, "%\0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -2) ), + SENSOR_INFO_T_ENTRY( CEFFVDDRATIOADJ, "%\0", AMEC_SENSOR_TYPE_WOF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1,-2) ), }; // Cause a compile error if we don't have all the sensors in the enum in the initialization list. diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c index d928e3a..36124f2 100755 --- a/src/occ_405/sensor/sensor_table.c +++ b/src/occ_405/sensor/sensor_table.c @@ -356,6 +356,7 @@ const sensor_ptr_t G_amec_sensor_list[] = SENSOR_PTR( CEFFVDNRATIO, &g_amec_sys.wof_sensors.ceff_ratio_vdn_sensor), SENSOR_PTR( VRATIO, &g_amec_sys.wof_sensors.v_ratio_sensor), SENSOR_PTR( OCS_ADDR, &g_amec_sys.wof_sensors.ocs_addr_sensor), + SENSOR_PTR( CEFFVDDRATIOADJ, &g_amec_sys.wof_sensors.ceff_ratio_vdd_adj_sensor), }; STATIC_ASSERT( (NUMBER_OF_SENSORS_IN_LIST != (sizeof(G_amec_sensor_list)/sizeof(sensor_ptr_t))) ); STATIC_ASSERT( (MAX_AMEC_SENSORS < (sizeof(G_amec_sensor_list)/sizeof(sensor_ptr_t))) ); @@ -523,10 +524,11 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION = // ------------------------------------------------------ // WOF Sensors // ------------------------------------------------------ - SENSOR_PTR( CEFFVDDRATIO, NULL), - SENSOR_PTR( CEFFVDNRATIO, NULL), - SENSOR_PTR( VRATIO, NULL), - SENSOR_PTR( OCS_ADDR, NULL), + MINI_SENSOR_PTR( CEFFVDDRATIO, NULL), + MINI_SENSOR_PTR( CEFFVDNRATIO, NULL), + MINI_SENSOR_PTR( VRATIO, NULL), + MINI_SENSOR_PTR( OCS_ADDR, NULL), + MINI_SENSOR_PTR( CEFFVDDRATIOADJ, NULL), }; STATIC_ASSERT( (NUMBER_OF_SENSORS_IN_LIST != (sizeof(G_amec_mini_sensor_list)/sizeof(uint16_t *))) ); STATIC_ASSERT( (MAX_AMEC_SENSORS < (sizeof(G_amec_mini_sensor_list)/sizeof(uint16_t *))) ); diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c index a8ada6a..a9d70af 100644 --- a/src/occ_405/wof/wof.c +++ b/src/occ_405/wof/wof.c @@ -1515,6 +1515,8 @@ void calculate_ceff_ratio_vdd( void ) // Now check the raw ceff ratio to prevent Over current by clipping to max of 100% // this is saved to the parameter used by the rest of the wof alg g_wof->ceff_ratio_vdd = prevent_over_current(l_raw_ceff_ratio); + // save the final adjusted Ceff ratio to a sensor + sensor_update(AMECSENSOR_PTR(CEFFVDDRATIOADJ), (uint16_t)g_wof->ceff_ratio_vdd); } } // else v_ratio != 0 } diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h index 75823bd..76d328a 100644 --- a/src/occ_405/wof/wof.h +++ b/src/occ_405/wof/wof.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -400,15 +400,14 @@ typedef struct __attribute__ ((packed)) uint32_t ocs_dirty_type1_count; // count of number of times dirty with type act (1) } amec_wof_t; -// Structure for sensors used in g_amec for AMESTER -// these will contain raw values any clipping for WOF alg will be represented -// in the parameter above in amec_wof_t +// Structure for sensors used in g_amec for AMESTER for additional debug typedef struct __attribute__ ((packed)) { - sensor_t ceff_ratio_vdd_sensor; + sensor_t ceff_ratio_vdd_sensor; // raw ceff ratio Vdd sensor_t ceff_ratio_vdn_sensor; sensor_t v_ratio_sensor; sensor_t ocs_addr_sensor; + sensor_t ceff_ratio_vdd_adj_sensor; // final adjusted ratio should reflect ceff_ratio_vdd in amec_wof_t } amec_wof_sensors_t; typedef struct __attribute__ ((packed)) |