From a2b260834429284487442f2241d821a4bbda7454 Mon Sep 17 00:00:00 2001 From: Matthew Raybuck Date: Tue, 10 Sep 2019 12:17:50 -0500 Subject: [PATCH] BPM Update Tweaks Adds procedure and part callouts where necessary and updates some comments. Change-Id: Ia94add82b7ccbafc11243452d616898133297ecd RTC:215466 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83535 Reviewed-by: Corey V Swenson Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M Crowell --- src/usr/isteps/nvdimm/bpm_update.C | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/usr/isteps/nvdimm/bpm_update.C b/src/usr/isteps/nvdimm/bpm_update.C index 1208d784169..df0857a7ff7 100644 --- a/src/usr/isteps/nvdimm/bpm_update.C +++ b/src/usr/isteps/nvdimm/bpm_update.C @@ -734,9 +734,8 @@ errlHndl_t Bpm::issueCommand(const uint8_t i_command, payloadHeaderDataSize, TARGETING::get_huid(iv_nvdimm)) ); - errl->addPartCallout(iv_nvdimm, - HWAS::BPM_PART_TYPE, - HWAS::SRCI_PRIORITY_HIGH); + errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH); errl->collectTrace(BPM_COMP_NAME); nvdimmAddPage4Regs(iv_nvdimm,errl); nvdimmAddVendorLog(iv_nvdimm, errl); @@ -1254,6 +1253,9 @@ errlHndl_t Bpm::enterUpdateMode() BPM_RC::BPM_START_UPDATE, BPM_RC::BPM_ENTER_UPDATE_MODE, TARGETING::get_huid(iv_nvdimm)); + infoErrl->addPartCallout(iv_nvdimm, + HWAS::BPM_PART_TYPE, + HWAS::SRCI_PRIORITY_HIGH); infoErrl->collectTrace(BPM_COMP_NAME); nvdimmAddVendorLog(iv_nvdimm, infoErrl); nvdimmAddPage4Regs(iv_nvdimm, infoErrl); @@ -3749,9 +3751,16 @@ errlHndl_t Bpm::runConfigUpdates(BpmConfigLidImage i_configImage) errl = updateConfig(); if (errl != nullptr) { - // If the config update fails for any reason we should erase the - // firmware section so that subsequent IPLs/attempts will not think - // that we have a fully valid image when we do not. + // We are returning with an error. Since the error is from the + // config part of the updates it's best to erase the firmware on the + // BPM so that updates will be attempted on it in the future. + // Because there isn't a way to determine the validity of the config + // section on the BPM we're completely reliant on what the firmware + // version reports to decide if we need to update or not. If we see + // that the firmware version matches the image but for some reason + // the config data wasn't updated properly we could believe we + // updated successfully when, in fact, we just left the BPM in a bad + // state. if ( (iv_firmwareStartAddress == MAIN_PROGRAM_ADDRESS) || (iv_firmwareStartAddress == MAIN_PROGRAM_ADDRESS_ALT)) { @@ -3887,15 +3896,6 @@ errlHndl_t Bpm::runFirmwareUpdates(BpmFirmwareLidImage i_image) handleMultipleErrors(errl, exitErrl); } - // Reset controller and unlock encryption if necessary - exitErrl = nvdimmResetController(iv_nvdimm); - if (exitErrl != nullptr) - { - TRACFCOMP(g_trac_bpm, ERR_MRK"Bpm::runFirmwareUpdates() " - "Couldn't reset NVDIMM controller."); - handleMultipleErrors(errl, exitErrl); - } - return errl; }