summaryrefslogtreecommitdiffstats
path: root/src/include/usr/isteps
diff options
context:
space:
mode:
authorTsung Yeung <tyeung@us.ibm.com>2018-10-30 16:20:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-01-09 12:41:27 -0600
commit468aed31ffbed5d33e14de5959c66230ed50ee05 (patch)
treebcd09912499f1b786a0cacef4b366e69043060a2 /src/include/usr/isteps
parentb9a994a7a57a0d909b452e4e8a385224498beae3 (diff)
downloadtalos-hostboot-468aed31ffbed5d33e14de5959c66230ed50ee05.tar.gz
talos-hostboot-468aed31ffbed5d33e14de5959c66230ed50ee05.zip
Move NVDIMM Erase and Arm to Runtime
-Move erase and arm to after OCC has started -Address several TODOs in I2d68123ceb0b8e7a33b54f9acad0968670a67ea9 -Combine arm and erase into an atomic operation with ATOMIC_SAVE_AND_ERASE Change-Id: Iad06f6fe7128df3defc4ded57b0151f9c4b9d15e Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68197 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/isteps')
-rw-r--r--src/include/usr/isteps/nvdimm/nvdimm.H60
1 files changed, 56 insertions, 4 deletions
diff --git a/src/include/usr/isteps/nvdimm/nvdimm.H b/src/include/usr/isteps/nvdimm/nvdimm.H
index 3c448a9ac..bfe39fcd0 100644
--- a/src/include/usr/isteps/nvdimm/nvdimm.H
+++ b/src/include/usr/isteps/nvdimm/nvdimm.H
@@ -22,14 +22,26 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-#ifndef NVDIMM_H__
-#define NVDIMM_H__
+#ifndef NVDIMM_EXT_H__
+#define NVDIMM_EXT_H__
#include <targeting/common/util.H>
namespace NVDIMM
{
-
+enum
+{
+ NSTD_VAL_NOPRSV = 0x08, // memory valid, contents not preserved (genesis)
+ NSTD_VAL_NOPRSV_MASK = 0xF7,
+ NSTD_VAL_PRSV = 0x04, // memory contents preserved
+ NSTD_VAL_PRSV_MASK = 0xFB,
+ NSTD_ERR_NOPRSV = 0x02, // memory failed to preserve contents
+ NSTD_ERR_NOPRSV_MASK = 0xFD,
+ NSTD_ERR_NOBKUP = 0x01, // memory unable to preserve future content
+ NSTD_ERR_NOBKUP_MASK = 0xFE,
+ NSTD_ERR = 0x03, // NSTD_ERR_NOPRSV+NSTD_ERR_NOBKUP
+};
+#ifndef __HOSTBOOT_RUNTIME
/**
* @brief Entry function to NVDIMM management
* - Restore image from NVDIMM NAND flash to DRAM
@@ -41,8 +53,48 @@ namespace NVDIMM
*
**/
void nvdimm_restore(TARGETING::TargetHandleList &i_nvdimmList);
+#endif
+
+/**
+ * @brief This function arms the trigger to enable backup in the event
+ * of power loss (DDR Reset_n goes low)
+ *
+ * @param[in] i_nvdimm - nvdimm target with NV controller
+ *
+ * @return errlHndl_t - Null if successful, otherwise a pointer to
+ * the error log.
+ */
+errlHndl_t nvdimmArmResetN(TARGETING::Target *i_nvdimm);
+
+/**
+ * @brief This function erases image on the nvdimm target
+ *
+ * @param[in] i_nvdimm - nvdimm target with NV controller
+ *
+ * @return errlHndl_t - Null if successful, otherwise a pointer to
+ * the error log.
+ */
+errlHndl_t nvdimmEraseNF(TARGETING::Target *i_nvdimm);
+
+/**
+ * @brief Check nvdimm error state
+ *
+ * @param[in] i_nvdimm - nvdimm target
+ *
+ * @return bool - true if nvdimm is in any error state, false otherwise
+ */
+bool nvdimmInErrorState(TARGETING::Target *i_nvdimm);
+/**
+ * @brief Set the status flag
+ *
+ * @param[in] i_nvdimm - nvdimm target
+ *
+ * @param[in] i_status_flag - status flag to set for each nvdimm
+ *
+ */
+void nvdimmSetStatusFlag(TARGETING::Target *i_nvdimm, const uint8_t i_status_flag);
}
-#endif // NVDIMM_H__
+#endif // NVDIMM_EXT_H__
OpenPOWER on IntegriCloud