diff options
author | aalugore <aalugore@us.ibm.com> | 2015-08-24 13:42:24 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-09-18 19:31:11 -0500 |
commit | b672d269a8b235d0e4b4555d39192194af1bd55a (patch) | |
tree | 20e3c01961df4cf4d71a1f590a5b4861f6e3f60a /src/include | |
parent | 66569e88a40376b4881bef6c23df411380c8f367 (diff) | |
download | talos-hostboot-b672d269a8b235d0e4b4555d39192194af1bd55a.tar.gz talos-hostboot-b672d269a8b235d0e4b4555d39192194af1bd55a.zip |
Function to set Nest Frequency based off DIMM memory capability
-Needed for 32x32GB DIMM support
-Finds max capable frequency of system and all present DIMMs
and deconfigures any DIMM that cannot run at desired frequency
-If necessary, Sets Nest Freq and triggers SBE update
Change-Id: I9bba92f55f1b67ff4a15d79113f19d39272ec72d
RTC:122884
Depends-on:I1dca7196cd02a2704a238665b73b522c9e103936
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17829
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Tested-by: FSP CI Jenkins
Tested-by: Jenkins OP HW
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/hwpf/hwpf_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/isteps/istep12list.H | 4 | ||||
-rw-r--r-- | src/include/usr/sbe/sbeif.H | 16 | ||||
-rw-r--r-- | src/include/usr/targeting/common/target.H | 11 | ||||
-rw-r--r-- | src/include/util/algorithm.H | 18 | ||||
-rw-r--r-- | src/include/util/align.H | 17 |
6 files changed, 52 insertions, 16 deletions
diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H index 3f0ebd829..4ef403eb8 100644 --- a/src/include/usr/hwpf/hwpf_reasoncodes.H +++ b/src/include/usr/hwpf/hwpf_reasoncodes.H @@ -81,6 +81,8 @@ namespace fapi MOD_PLAT_ATTR_SVC_CEN_DQ_TO_DIMM_CONN_DQ = 0x27, MOD_PLAT_ATTR_SVC_GET_MEM_ATTR_DATA = 0x28, MOD_GET_WOF_FREQ_UPLIFT_SELECTED = 0x29, + MOD_SET_NEST_FREQ = 0x2A, + MOD_FIND_MAX_DMI_SPD = 0x2B, }; /** diff --git a/src/include/usr/isteps/istep12list.H b/src/include/usr/isteps/istep12list.H index 2e724f25c..f66873381 100644 --- a/src/include/usr/isteps/istep12list.H +++ b/src/include/usr/isteps/istep12list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -105,6 +105,8 @@ const DepModInfo g_istep12Dependancies = { #ifndef CONFIG_VPO_COMPILE DEP_LIB(libmc_config.so), #endif + DEP_LIB(libsbe.so), + DEP_LIB(libbuild_winkle_images.so), NULL } }; diff --git a/src/include/usr/sbe/sbeif.H b/src/include/usr/sbe/sbeif.H index b00e01f7d..ff397cae3 100644 --- a/src/include/usr/sbe/sbeif.H +++ b/src/include/usr/sbe/sbeif.H @@ -94,6 +94,22 @@ namespace SBE */ errlHndl_t resolveProcessorSbeSeeproms(); + /** + * @brief Determines whether we are on the Golden side or not + * + * @param[out] o_isGolden boolean, True if we are on Golden side, False + * otherwise. + * + * @return errlHndl_t Error log handle on failure. + * + * NOTE: -Golden Side means we booted from the Golden Seeprom pointing + * at the Golden side of PNOR. + * -Using master processor to make this determination. + */ + + errlHndl_t isGoldenSide( bool & o_isGolden ); + + } //end namespace SBE diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H index 25e7be6b6..bf5b7dad4 100644 --- a/src/include/usr/targeting/common/target.H +++ b/src/include/usr/targeting/common/target.H @@ -672,6 +672,17 @@ const char* Target::getAttrAsString() const return attrToString<A>(l_attrValue); } +// Function to set various frequency related attributes +/** + * @brief - sets various attributes directly related to the nest frequency. + * + * @param[in] i_sys - top level system target to set attributes for + * @param[in] i_newNestFreq - the new nest frequency to base all the attributes + * off of. + */ +void setFrequencyAttributes(Target * i_sys, uint32_t i_newNestFreq); + + // WARNING: The following #include imports any platform specific template // specializations for getAttr and tryGetAttr #include <targeting/adapters/targetadapter.H> diff --git a/src/include/util/algorithm.H b/src/include/util/algorithm.H index 54baa029d..dac0f47c9 100644 --- a/src/include/util/algorithm.H +++ b/src/include/util/algorithm.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -52,6 +54,20 @@ namespace Util static const T value = (a > b) ? a : b; }; + /** + * @brief - utility function that determines if a given number is + * power of 2. + * + * @param[in] i_num - given number. + * + * @return bool - True if the number is a power of 2, False otherwise. + */ + template <typename T> + bool isPow2(T i_num) + { + return (!(i_num & (i_num-1))); + } + }; }; #endif diff --git a/src/include/util/align.H b/src/include/util/align.H index e0132b2b7..10a836972 100644 --- a/src/include/util/align.H +++ b/src/include/util/align.H @@ -51,18 +51,7 @@ #define ALIGN_MEGABYTE(u) (ALIGN_X(u,MEGABYTE)) #define ALIGN_MEGABYTE_DOWN(u) (ALIGN_DOWN_X(u,MEGABYTE)) -// Returns a number that is aligned to the next highest power of 2 number of -// pages for the given buffer. -#define ALIGN_TO_NEXT_POWER_OF_TWO_PAGES(b) ({\ - unsigned int v = ALIGN_PAGE(b)/PAGE_SIZE;\ - v--;\ - v |= v >> 1;\ - v |= v >> 2;\ - v |= v >> 4;\ - v |= v >> 8;\ - v |= v >> 16;\ - v++;\ - v * PAGE_SIZE;\ - }) - +// Return a number rounded to the next power of two. +#define ALIGN_POW2(u) ((u&(u-1)) ? 1 << (64 - __builtin_clzl(u)) : u) +#define ALIGN_POW2_DOWN(u) (u ? 1 << (63 - __builtin_clzl(u)) : 0) #endif |