From ab4dc96fd6cf584c42bd0b45be25458c0e61ad63 Mon Sep 17 00:00:00 2001 From: mbroyles Date: Mon, 13 Apr 2020 12:07:36 -0500 Subject: [PATCH] Fix Vdd ceff ratio calculation when active cores is less than sort cores Change-Id: I6adc2286acbda613ec6678485949d8b7ff5a721b CQ: SW489479 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/94962 Tested-by: FSP CI Jenkins Reviewed-by: Christopher J Cain Reviewed-by: Francesco A Campisano Reviewed-by: Martha Broyles --- src/occ_405/main.c | 2 +- src/occ_405/occbuildname.c | 4 ++-- src/occ_405/wof/wof.c | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/occ_405/main.c b/src/occ_405/main.c index 1d5e8cce..78ced729 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2019 */ +/* Contributors Listed Below - COPYRIGHT 2011,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c index ef4de9c9..517b68cf 100755 --- a/src/occ_405/occbuildname.c +++ b/src/occ_405/occbuildname.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2019 */ +/* Contributors Listed Below - COPYRIGHT 2014,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -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_191023a\0" /**/ ; +volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /**/ "op_occ_200417a\0" /**/ ; #endif diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c index a9d70af8..12aa53b7 100644 --- a/src/occ_405/wof/wof.c +++ b/src/occ_405/wof/wof.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -1376,7 +1376,8 @@ void calculate_ceff_ratio_vdd( void ) } // Read iac_tdp_vdd from OCCPstateParmBlock struct - g_wof->iac_tdp_vdd = G_oppb.lac_tdp_vdd_turbo_10ma; + g_wof->iac_tdp_vdd = multiply_ratio( G_oppb.lac_tdp_vdd_turbo_10ma, + g_wof->v_ratio ); // Get Vturbo and convert to 100uV (mV -> 100uV) = mV*10 g_wof->vdd_avg_tdp_100uv = 10 * G_oppb.operating_points[TURBO].vdd_mv; @@ -1467,8 +1468,8 @@ void calculate_ceff_ratio_vdd( void ) } } // else track to frequency - g_wof->c_ratio_vdd_volt = multiply_ratio( g_wof->vdd_avg_tdp_100uv, - g_wof->v_ratio ); + // Get Vturbo and convert to 100uV (mV -> 100uV) = mV*10 + g_wof->c_ratio_vdd_volt = G_oppb.operating_points[TURBO].vdd_mv * 10; // Calculate ceff_tdp_vdd // iac_tdp_vdd / ((V@Freq*Vratio)^1.3 * (Freq*Fratio))