summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf
diff options
context:
space:
mode:
authorMatt Ploetz <maploetz@us.ibm.com>2015-11-05 12:57:31 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-11-05 18:04:09 -0600
commita413cfa82d41fadc54e7253bbcd1645742734c09 (patch)
treeb64e9b9442311000153174fd29710e4bff3d07dd /src/usr/hwpf
parent7e0b8122c610a2a49489d3ccd18c3e8a480dcc70 (diff)
downloadtalos-hostboot-a413cfa82d41fadc54e7253bbcd1645742734c09.tar.gz
talos-hostboot-a413cfa82d41fadc54e7253bbcd1645742734c09.zip
Set MSS_FREQ attribute based on capable and booted nest freq
Change-Id: Ia28bb2ec9de0ad203a2cb6fde44c663c036406fd CQ: SW325770 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21782 Tested-by: Jenkins Server Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> 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/usr/hwpf')
-rw-r--r--src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
index b749919a8..57451cb4a 100644
--- a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
+++ b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C
@@ -71,6 +71,12 @@ const uint64_t CENTAUR_SBE_PNOR_MRR = 0;
// Max SBE image buffer size
const uint32_t MAX_SBE_IMG_SIZE = 48 * 1024;
+// Low MSS freq for 32x32 machines
+const uint32_t MSS_FREQ_32x32_CONFIG = 1066;
+
+// Low Nest Freq
+const uint32_t LOW_NEST_FREQ = 2000;
+
namespace SBE_CENTAUR_INIT
{
@@ -95,9 +101,16 @@ void* call_sbe_centaur_init( void *io_pArgs )
TARGETING::TargetHandleList l_membufTargetList;
getAllChips(l_membufTargetList, TYPE_MEMBUF);
+ // Get sys target to check capable nest frequencies
+ TARGETING::Target* l_sys = NULL;
+ targetService().getTopLevelTarget(l_sys);
+ assert(l_sys != NULL, "sbe_centaur_init: sys target is NULL");
+
size_t l_sbePnorSize = 0;
void* l_sbePnorAddr = NULL;
errlHndl_t l_errl = NULL;
+ uint32_t l_booted_nest_freq = 0;
+ MRW_NEST_CAPABLE_FREQUENCIES_SYS l_mrw_nest_capable;
IStepError l_StepError;
@@ -213,8 +226,31 @@ void* call_sbe_centaur_init( void *io_pArgs )
// XIP customize is going to look for a PLL ring with a "stub"
// mem freq -- so set to a default, then clear it (so as not
// to mess up MSS HWP later
- l_membuf_target->setAttr<TARGETING::ATTR_MSS_FREQ>(1600);
+ // Grab capable frequencies
+ l_mrw_nest_capable =
+ l_sys->getAttr<ATTR_MRW_NEST_CAPABLE_FREQUENCIES_SYS>();
+
+ // Get the nest freq we booted with
+ l_booted_nest_freq = l_sys->getAttr<TARGETING::ATTR_NEST_FREQ_MHZ>();
+
+ // If we are running nest at 2.0, and we support 2.0 and 2.4, we
+ // need to drop MSS freq to 1066
+ if ((l_mrw_nest_capable ==
+ MRW_NEST_CAPABLE_FREQUENCIES_SYS_2000_MHZ_OR_2400_MHZ) &&
+ (l_booted_nest_freq == LOW_NEST_FREQ))
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Reducing MSS frequency in sbe_centaur_init to %d based on "
+ "nest frequency", MSS_FREQ_32x32_CONFIG);
+
+ l_membuf_target->setAttr
+ <TARGETING::ATTR_MSS_FREQ>(MSS_FREQ_32x32_CONFIG);
+ }
+ else //boot as normal
+ {
+ l_membuf_target->setAttr<TARGETING::ATTR_MSS_FREQ>(1600);
+ }
FAPI_INVOKE_HWP( l_errl, cen_xip_customize,
l_fapiTarget, l_sbePnorAddr,
OpenPOWER on IntegriCloud