diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2017-05-24 14:45:39 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-05-31 16:29:05 -0400 |
commit | 588fadffb2749a9d0ab7f5add6fc12cc900683b6 (patch) | |
tree | 4f1faf522d13082b35292224fde67541c8a2d54a /src/usr | |
parent | 263a2404b2ca6559925fd4796eecbfbebaf41c50 (diff) | |
download | talos-hostboot-588fadffb2749a9d0ab7f5add6fc12cc900683b6.tar.gz talos-hostboot-588fadffb2749a9d0ab7f5add6fc12cc900683b6.zip |
Use Turbo freq for WOF selection in Turbo mode
Changing from using the nominal freq in all cases to use Turbo in
Turbo power and Nominal in Nominal power mode.
Change-Id: I213200a61461f397284758b699cfb1189ae6bca6
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40938
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/fapi2/plat_wof_access.C | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/usr/fapi2/plat_wof_access.C b/src/usr/fapi2/plat_wof_access.C index c1fd9983c..a05134715 100644 --- a/src/usr/fapi2/plat_wof_access.C +++ b/src/usr/fapi2/plat_wof_access.C @@ -112,6 +112,9 @@ fapi2::ReturnCode platParseWOFTables(uint8_t* o_wofData) getChildChiplets(pECList, l_mProc, TARGETING::TYPE_CORE, false); uint32_t l_numCores = pECList.size(); + // Choose a sort freq + uint32_t l_sortFreq = 0; + // Get the socket power uint32_t l_socketPower = 0; uint8_t l_wofPowerLimit = @@ -121,23 +124,23 @@ fapi2::ReturnCode platParseWOFTables(uint8_t* o_wofData) { l_socketPower = l_sys->getAttr<TARGETING::ATTR_SOCKET_POWER_TURBO>(); + l_sortFreq = l_sys->getAttr<TARGETING::ATTR_FREQ_CORE_MAX>(); } else { l_socketPower = l_sys->getAttr<TARGETING::ATTR_SOCKET_POWER_NOMINAL>(); + l_sortFreq = l_sys->getAttr<TARGETING::ATTR_NOMINAL_FREQ_MHZ>(); } // Get the frequencies uint32_t l_nestFreq = l_sys->getAttr<TARGETING::ATTR_FREQ_PB_MHZ>(); - uint32_t l_nomFreq = - l_sys->getAttr<TARGETING::ATTR_NOMINAL_FREQ_MHZ>(); // Trace the input params FAPI_INF("WOF table search: " - "Cores %d SocketPower 0x%X NestFreq 0x%X NomFreq 0x%X", - l_numCores, l_socketPower, l_nestFreq, l_nomFreq); + "Cores %d SocketPower 0x%X NestFreq 0x%X SortFreq 0x%X", + l_numCores, l_socketPower, l_nestFreq, l_sortFreq); void* l_pWofImage = nullptr; size_t l_lidImageSize = 0; @@ -336,7 +339,7 @@ fapi2::ReturnCode platParseWOFTables(uint8_t* o_wofData) if( (l_wth->core_count == l_numCores) && (l_wth->socket_power_w == l_socketPower) && (l_wth->nest_frequency_mhz == l_nestFreq) && - (l_wth->sort_power_freq_mhz == l_nomFreq) ) + (l_wth->sort_power_freq_mhz == l_sortFreq) ) { // Found a match FAPI_INF("Found a WOF table match"); @@ -368,10 +371,11 @@ fapi2::ReturnCode platParseWOFTables(uint8_t* o_wofData) * @errortype * @moduleid fapi2::MOD_FAPI2_PLAT_PARSE_WOF_TABLES * @reasoncode fapi2::RC_WOF_TABLE_NOT_FOUND - * @userdata1[00:31] Number of cores + * @userdata1[00:15] Number of cores + * @userdata1[16:31] WOF Power Mode (0=Nominal,1=Turbo) * @userdata1[32:63] Socket power * @userdata2[00:31] Nest frequency - * @userdata2[32:63] Nominal frequency + * @userdata2[32:63] Sort frequency * @devdesc No WOF table match found * @custdesc Firmware Error */ @@ -379,12 +383,13 @@ fapi2::ReturnCode platParseWOFTables(uint8_t* o_wofData) ERRORLOG::ERRL_SEV_UNRECOVERABLE, fapi2::MOD_FAPI2_PLAT_PARSE_WOF_TABLES, fapi2::RC_WOF_TABLE_NOT_FOUND, - TWO_UINT32_TO_UINT64( + TWO_UINT16_ONE_UINT32_TO_UINT64( l_numCores, + l_wofPowerLimit, l_socketPower), TWO_UINT32_TO_UINT64( l_nestFreq, - l_nomFreq), + l_sortFreq), true); //software callout l_errl->collectTrace(FAPI_TRACE_NAME); |