summaryrefslogtreecommitdiffstats
path: root/src/include/usr/diag
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2013-01-14 23:00:14 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-02-22 12:01:35 -0600
commit17586d0f39d7b37a23bc40162626a0ad44924504 (patch)
tree34da1b33e7685a3b438a20142419f787d0666075 /src/include/usr/diag
parent523e7d2bffe799fa3f315eb5b4f037aedda3556f (diff)
downloadtalos-hostboot-17586d0f39d7b37a23bc40162626a0ad44924504.tar.gz
talos-hostboot-17586d0f39d7b37a23bc40162626a0ad44924504.zip
PRD: Some refactoring prdfMain.[CH]
Change-Id: I69d4ea7e9d3297732f5fe33d658c1a460bdda082 RTC: 50708 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2906 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3274
Diffstat (limited to 'src/include/usr/diag')
-rwxr-xr-xsrc/include/usr/diag/prdf/common/prdfMain_common.H (renamed from src/include/usr/diag/prdf/common/prdfMain.H)69
-rw-r--r--src/include/usr/diag/prdf/prdfMain.H56
2 files changed, 70 insertions, 55 deletions
diff --git a/src/include/usr/diag/prdf/common/prdfMain.H b/src/include/usr/diag/prdf/common/prdfMain_common.H
index e7c3726d1..4bbc4d8c3 100755
--- a/src/include/usr/diag/prdf/common/prdfMain.H
+++ b/src/include/usr/diag/prdf/common/prdfMain_common.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/include/usr/diag/prdf/common/prdfMain.H $ */
+/* $Source: src/include/usr/diag/prdf/common/prdfMain_common.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2002,2012 */
+/* COPYRIGHT International Business Machines Corp. 2002,2013 */
/* */
/* p1 */
/* */
@@ -21,26 +21,18 @@
/* */
/* IBM_PROLOG_END_TAG */
-#ifndef PRDF_MAIN_H
-#define PRDF_MAIN_H
+#ifndef __prdfMain_common_H
+#define __prdfMain_common_H
/**
- * @file prdfMain.H
- * @brief Interface to Processor Run-time Diagnostics (PRD)
- * @par
- * This includes all type definitions, function interfaces/contracts and
- * return codes for PRD.
- * These prototypes specify the functions that can be called externally
- * from other binds.
+ * @file prdfMain_common.H
+ * @brief PRD code used by external components.
+ *
+ * This file contains code that is strictly common between FSP and Hostboot. All
+ * platform specific code should be in the respective FSP only or Hostboot only
+ * files.
*/
-#ifdef __HOSTBOOT_MODULE
- #include <errl/errlentry.H>
-#else
- #include <errlentry.H>
-#endif
-
-#include <stdint.h>
#include <targeting/common/target.H>
namespace PRDF
@@ -143,6 +135,9 @@ enum prd_return_code_t
};
+/** Indicates if PRD has been initialized. */
+extern bool g_initialized;
+
/**
* @brief Initialize PRD system model and data
* @return Error log if error occurs
@@ -168,42 +163,6 @@ extern errlHndl_t main(ATTENTION_VALUE_TYPE i_attnType, const AttnList & i_attnL
*/
extern void iplCleanup();
-//------------------------------------------------------------------------------
-// Hostboot specific functions
-//------------------------------------------------------------------------------
-
-#ifdef __HOSTBOOT_MODULE
-
-/**
- * @brief initiate memory background scrubbing
- * @param[in] i_pTarget - Target handle of System or Node
- * @return Error log if error occurs
- */
-extern errlHndl_t startScrub(const TARGETING::TargetHandle_t i_pTarget);
-
-/**
- * @brief Restores hardware DRAM repairs to reflect what is stored in VPD.
- * @param[in] i_pTarget - Target handle of the memory controller
- * @return Non-SUCCESS if conditions are such that a callout had to be made, SUCCESS othewise.
- */
-extern int32_t restoreDramRepairs(const TARGETING::TargetHandle_t i_pTarget);
-
-#endif // __HOSTBOOT_MODULE
-
-//------------------------------------------------------------------------------
-// FSP specific functions
-//------------------------------------------------------------------------------
-
-#ifndef __HOSTBOOT_MODULE
-
-/**
- * @brief handle service data collector sync over
- * @return Error log if error occurs
- */
-extern errlHndl_t failoverComplete(void);
-
-#endif // not __HOSTBOOT_MODULE
-
} // End namespace PRDF
-#endif // PRDF_MAIN_H
+#endif // __prdfMain_common_H
diff --git a/src/include/usr/diag/prdf/prdfMain.H b/src/include/usr/diag/prdf/prdfMain.H
new file mode 100644
index 000000000..94c52bbb7
--- /dev/null
+++ b/src/include/usr/diag/prdf/prdfMain.H
@@ -0,0 +1,56 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/diag/prdf/prdfMain.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __prdfMain_H
+#define __prdfMain_H
+
+/**
+ * @file prdfMain.H
+ * @brief PRD code used by external components.
+ *
+ * This file contains code that is strictly specific to Hostboot. All code that
+ * is common between FSP and Hostboot should be in the respective common file.
+ */
+
+#include <errl/errlmanager.H> // for errlHndl_t
+
+// This must be included after all other includes. This will take care of cases
+// where a file must be included in the common code, but the include paths are
+// different between FSP and Hostboot.
+#include <diag/prdf/common/prdfMain_common.H>
+
+namespace PRDF
+{
+
+/**
+ * @brief Restores hardware DRAM repairs to reflect what is stored in VPD.
+ * @param i_mbaTarget An MBA target.
+ * @return Non-SUCCESS if conditions are such that a callout had to be made,
+ * SUCCESS othewise.
+ */
+extern int32_t restoreDramRepairs(const TARGETING::TargetHandle_t i_mbaTarget);
+
+} // end namespace PRDF
+
+#endif // __prdfMain_H
+
OpenPOWER on IntegriCloud