Skip to content

Commit

Permalink
Fix auto-arming NVDIMMs for ESS systems
Browse files Browse the repository at this point in the history
ESS requires HB to arm the NVDIMMs during IPL
after PM complex is started.  Requires moving
the nvdimmArm() and associated functions from
nvdimm_rt.C to nvdimm.C.

Change-Id: Ie7fd08b27ad7959b21086f0f291764c2156e5bd9
CQ:SW479909
CMVC-Prereq:1096403
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/86489
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
cvswen authored and dcrowell77 committed Nov 20, 2019
1 parent e3870cb commit d432c45
Show file tree
Hide file tree
Showing 5 changed files with 852 additions and 836 deletions.
22 changes: 11 additions & 11 deletions src/include/usr/isteps/nvdimm/nvdimm.H
Expand Up @@ -159,17 +159,6 @@ errlHndl_t nvdimmEraseNF(TARGETING::Target *i_nvdimm);
*/
void nvdimmSetStatusFlag(TARGETING::Target *i_nvdimm, const uint8_t i_status_flag);

#ifdef __HOSTBOOT_RUNTIME

/**
* @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 This function arms/disarms the trigger based on i_state
*
Expand Down Expand Up @@ -205,6 +194,17 @@ bool nvdimmArm(TARGETING::TargetHandleList &i_nvdimmTargetList);
*/
bool nvdimmDisarm(TARGETING::TargetHandleList &i_nvdimmTargetList);

#ifdef __HOSTBOOT_RUNTIME

/**
* @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 Check the ES (enery source)/backup power module(BPM) health status of
* the individual NVDIMMs supplied in list
Expand Down
18 changes: 16 additions & 2 deletions src/usr/isteps/istep21/call_host_runtime_setup.C
Expand Up @@ -68,6 +68,7 @@

#ifdef CONFIG_NVDIMM
#include "call_nvdimm_update.H"
#include <isteps/nvdimm/nvdimm.H>
#endif

using namespace ERRORLOG;
Expand Down Expand Up @@ -736,6 +737,19 @@ void* call_host_runtime_setup (void *io_pArgs)
errlCommit(l_err, ISTEP_COMP_ID);
pmStartSuccess = false;
}
else
{
#ifdef CONFIG_NVDIMM
// Arm the nvdimms
// Only get here if is_sapphire_load and PM started and have NVDIMMs
TARGETING::TargetHandleList l_nvdimmTargetList;
NVDIMM::nvdimm_getNvdimmList(l_nvdimmTargetList);
if (l_nvdimmTargetList.size() != 0)
{
NVDIMM::nvdimmArm(l_nvdimmTargetList);
}
#endif
}

#ifdef CONFIG_HTMGT
// Report PM status to HTMGT
Expand Down Expand Up @@ -767,7 +781,7 @@ void* call_host_runtime_setup (void *io_pArgs)
uint8_t l_skip_fir_attr_reset = 1;
// Since we are not leaving the PM complex alive, we will
// explicitly put it into reset and clean up any memory
l_err = HBPM::resetPMAll(HBPM::RESET_AND_CLEAR_ATTRIBUTES,
l_err = HBPM::resetPMAll(HBPM::RESET_AND_CLEAR_ATTRIBUTES,
l_skip_fir_attr_reset);
if (l_err)
{
Expand Down Expand Up @@ -846,7 +860,7 @@ void* call_host_runtime_setup (void *io_pArgs)
break;
}
}

// Update the MDRT Count and PDA Table Entries from Attribute
TargetService& l_targetService = targetService();
Target* l_sys = nullptr;
Expand Down

0 comments on commit d432c45

Please sign in to comment.