diff options
| author | Tsung Yeung <tyeung@us.ibm.com> | 2018-10-30 16:20:12 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-01-09 12:41:27 -0600 |
| commit | 468aed31ffbed5d33e14de5959c66230ed50ee05 (patch) | |
| tree | bcd09912499f1b786a0cacef4b366e69043060a2 /src/usr/isteps/pm/runtime | |
| parent | b9a994a7a57a0d909b452e4e8a385224498beae3 (diff) | |
| download | blackbird-hostboot-468aed31ffbed5d33e14de5959c66230ed50ee05.tar.gz blackbird-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/usr/isteps/pm/runtime')
| -rw-r--r-- | src/usr/isteps/pm/runtime/makefile | 7 | ||||
| -rw-r--r-- | src/usr/isteps/pm/runtime/rt_pm.C | 45 |
2 files changed, 50 insertions, 2 deletions
diff --git a/src/usr/isteps/pm/runtime/makefile b/src/usr/isteps/pm/runtime/makefile index ecffa4f37..c3be1b818 100644 --- a/src/usr/isteps/pm/runtime/makefile +++ b/src/usr/isteps/pm/runtime/makefile @@ -31,12 +31,17 @@ VPATH += ../ MODULE = pm_rt +EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps/nvdimm + ## Objects unique to HBRT OBJS += rt_pm.o +## Dependencies for nvdimm.mk +VPATH += ${ROOTPATH}/src/usr/isteps/nvdimm + SUBDIRS += test.d ## Objects common to HBRT and HB IPL include ../pm.mk - +include ${ROOTPATH}/src/usr/isteps/nvdimm/nvdimm.mk include ${ROOTPATH}/config.mk diff --git a/src/usr/isteps/pm/runtime/rt_pm.C b/src/usr/isteps/pm/runtime/rt_pm.C index 163a78b55..3e5ab8c10 100644 --- a/src/usr/isteps/pm/runtime/rt_pm.C +++ b/src/usr/isteps/pm/runtime/rt_pm.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -44,9 +44,12 @@ #include <initservice/isteps_trace.H> // targeting support +#include <targeting/common/util.H> #include <targeting/common/utilFilter.H> #include <targeting/common/targetservice.H> +#include <isteps/nvdimm/nvdimm.H> + #include <scom/scomif.H> #include <scom/wakeup.H> @@ -256,7 +259,47 @@ namespace RTPM l_err->collectTrace(ISTEP_COMP_NAME,1024); errlCommit( l_err, RUNTIME_COMP_ID ); l_err = nullptr; + break; + } + +#ifdef CONFIG_NVDIMM + //@TODO RTC 199645 - additional delay needed to ensure OCC is + // full functional + + // Only run this if PM complex started successfully + // as EPOW save trigger is done by the OCC + TARGETING::TargetHandleList l_dimmTargetList; + getChildAffinityTargets( l_dimmTargetList, proc_target, CLASS_NA, TYPE_DIMM ); + + for (auto const l_dimm : l_dimmTargetList) + { + if (TARGETING::isNVDIMM(l_dimm)) + { + // skip if the nvdimm is in error state + if (NVDIMM::nvdimmInErrorState(l_dimm)) + { + continue; + } + + l_err = NVDIMM::nvdimmArmResetN(l_dimm); + // If we run into any error here we will just + // commit the error log and move on. Let the + // system continue to boot and let the user + // salvage the data + if (l_err) + { + NVDIMM::nvdimmSetStatusFlag(l_dimm, NVDIMM::NSTD_ERR_NOBKUP); + // Committing the error as we don't want the this to interrupt + // the boot. This will notifiy the user that action is needed + // on this module + l_err->setSev(ERRL_SEV_INFORMATIONAL); + l_err->collectTrace(NVDIMM_COMP_NAME,1024); + errlCommit( l_err, NVDIMM_COMP_ID ); + continue; + } + } } +#endif } while(0); if ( l_err ) |

