summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/prdfPllDomain.H
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2016-04-15 16:34:52 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-05-12 09:57:23 -0400
commite22a971e4a78b218aee6c6d6be7e7c9e3886bed9 (patch)
tree26305adebf000308842757efaa78aa581a793118 /src/usr/diag/prdf/common/plat/prdfPllDomain.H
parent8ba27e9d76687d8071a19a64c690283d01d2523c (diff)
downloadtalos-hostboot-e22a971e4a78b218aee6c6d6be7e7c9e3886bed9.tar.gz
talos-hostboot-e22a971e4a78b218aee6c6d6be7e7c9e3886bed9.zip
PRD: created P9 configurator
Change-Id: I9bda0d2baefe828776e6323a99afea30b883e745 RTC: 145445 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23537 Tested-by: Jenkins Server Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24260 Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/plat/prdfPllDomain.H')
-rw-r--r--src/usr/diag/prdf/common/plat/prdfPllDomain.H291
1 files changed, 291 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/plat/prdfPllDomain.H b/src/usr/diag/prdf/common/plat/prdfPllDomain.H
new file mode 100644
index 000000000..7cf387c32
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/prdfPllDomain.H
@@ -0,0 +1,291 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plat/prdfPllDomain.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef prdfPllDomain_H
+#define prdfPllDomain_H
+
+#include <iipDomain.h>
+#include <iipResolutionFactory.h>
+#include <prdfExtensibleDomain.H>
+#include <prdfParentDomain.H>
+#include <prdfRuleChipDomain.H>
+#include <prdfThresholdResolutions.H>
+
+#ifndef __HOSTBOOT_MODULE
+ #include <hdctContent.H> // for hwTableContent
+#endif
+
+namespace PRDF
+{
+
+//------------------------------------------------------------------------------
+
+class PllDomain : public RuleChipDomain, public ExtensibleDomain,
+ public ParentDomain<ExtensibleDomain>
+{
+ public:
+
+#ifdef __HOSTBOOT_MODULE
+
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct clock source
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct second clock source
+ * @param Resolution to callout the correct clock source
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
+#else // not __HOSTBOOT_MODULE
+
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct clock source
+ * @param Dump content
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
+ /**
+ * @brief Constructor
+ * @param DOMAIN_ID the domain ID
+ * @param Resolution to callout the correct second clock source
+ * @param Resolution to callout the correct clock source
+ * @param Dump content
+ * @param ThresholdResolution::ThresholdPolicy
+ */
+ PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy & i_mfgThresh );
+
+#endif // not __HOSTBOOT_MODULE
+
+ /**
+ * @brief Perform any initialization required by the hardware
+ * @returns error code
+ * @post PLL errors cleared in hardware.
+ */
+ virtual int32_t Initialize(void);
+
+ /**
+ * @brief Query if anything in this domain is at the attention type specified
+ * @param Attention type to query for. (@see iipsdbug.h)
+ * @returns [true|false]
+ * @pre Initialize()
+ */
+ virtual bool Query(ATTENTION_TYPE attentionType);
+
+ /**
+ * @brief Analyze errors within the domain
+ * @param service data collector
+ * @param attentiont type (@see iipsdbug.h)
+ * @returns service data collector - completed
+ * @return return code
+ * @pre Initialize(); Query() == true
+ * @post domain element order may be modified.
+ */
+ virtual int32_t Analyze( STEP_CODE_DATA_STRUCT & serviceData,
+ ATTENTION_TYPE attentionType );
+
+ /**
+ * @brief Domain level plugin function used to clear PLL attentions in a
+ * domain and its subdomains.
+ * @param i_domain The target PLL domain.
+ * @param i_sc The step code data struct.
+ * @return SUCCESS
+ */
+ static int32_t ClearPll( ExtensibleDomain * i_domain,
+ STEP_CODE_DATA_STRUCT & i_sc );
+
+ /**
+ * @brief Domain level plugin function used to mask PLL attentions in a
+ * domain and its subdomains.
+ * @param i_domain The target PLL domain.
+ * @param i_sc The step code data struct.
+ * @return SUCCESS
+ */
+ static int32_t MaskPll( ExtensibleDomain * i_domain,
+ STEP_CODE_DATA_STRUCT & i_sc );
+
+ /**
+ * @brief Domain level plugin function used to mask PLL attentions in a
+ * domain and its subdomains.
+ * @param i_domain The target PLL domain.
+ * @param i_sc The step code data struct.
+ * @param i_oscPos osc position (only used by IO pcie domain)
+ * @return SUCCESS
+ */
+ static int32_t MaskPllIo( ExtensibleDomain * i_domain,
+ STEP_CODE_DATA_STRUCT & i_sc,
+ uint32_t i_oscPos );
+
+protected:
+
+ /**
+ * @brief Order the domain - with detecting element at the top
+ * @param Attention type (@see iipsdbug.h)
+ * @post domain elemenet order may be altered
+ * @note this is called by Analyze()
+ */
+ virtual void Order(ATTENTION_TYPE attentionType);
+
+private: // functions
+
+ /**
+ * @brief initialize pll chip plugin function names
+ */
+ virtual void InitChipPluginFuncs();
+
+private: // Data
+
+ enum { CONTAINER_SIZE = 8 };
+
+ Resolution & closeClockSource;
+ Resolution & farClockSource;
+
+ Resolution & iv_threshold;
+
+ // This resolution is used for the 2nd pcie osc only
+ // since the redundant pcie oscs are at the node
+ // level and can dynamically switch or config
+ // during the IPL
+ Resolution & iv_threshold2;
+
+#ifndef __HOSTBOOT_MODULE
+ hwTableContent iv_dumpContent;
+#endif
+
+ const char * QueryPllFunc;
+ const char * CapturePllFunc;
+ const char * CalloutPllFunc;
+ const char * MaskPllFunc;
+ const char * ClearPllFunc;
+ const char * PostAnalysisPllFunc;
+
+};
+
+//------------------------------------------------------------------------------
+
+#ifdef __HOSTBOOT_MODULE
+
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(clockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) )
+{
+ InitChipPluginFuncs();
+}
+
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(secondClockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) )
+{
+ InitChipPluginFuncs();
+}
+
+#else // not __HOSTBOOT_MODULE
+
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(clockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_dumpContent(i_hwdc)
+{
+ InitChipPluginFuncs();
+}
+
+inline
+PllDomain::PllDomain( DOMAIN_ID domain_id, Resolution & secondClockSource,
+ Resolution & clockSource,
+ hwTableContent i_hwdc,
+ const ThresholdResolution::ThresholdPolicy& i_mfgThresh) :
+ RuleChipDomain( domain_id, PllDomain::CONTAINER_SIZE ),
+ ExtensibleDomain("PllDomain"),
+ closeClockSource(secondClockSource),
+ farClockSource(clockSource),
+ iv_threshold( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_threshold2( ResolutionFactory::Access().GetThresholdResolution( 1,
+ ThresholdResolution::cv_pllDefault,
+ i_mfgThresh ) ),
+ iv_dumpContent(i_hwdc)
+{
+ InitChipPluginFuncs();
+}
+
+#endif // not __HOSTBOOT_MODULE
+
+//------------------------------------------------------------------------------
+
+} // end namespace PRDF
+
+#endif /* prdfPllDomain_H */
+
OpenPOWER on IntegriCloud