summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep06/host_discover_targets.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/isteps/istep06/host_discover_targets.C')
-rw-r--r--src/usr/isteps/istep06/host_discover_targets.C65
1 files changed, 62 insertions, 3 deletions
diff --git a/src/usr/isteps/istep06/host_discover_targets.C b/src/usr/isteps/istep06/host_discover_targets.C
index 89e0dd8dd..7884056c1 100644
--- a/src/usr/isteps/istep06/host_discover_targets.C
+++ b/src/usr/isteps/istep06/host_discover_targets.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -59,6 +59,7 @@
//SBE interfacing
#include <sbeio/sbeioif.H>
#include <sys/misc.h>
+#include <sbe/sbeif.H>
#include <p9_query_core_access_state.H>
#include <p9_setup_sbe_config.H>
@@ -618,13 +619,71 @@ void* host_discover_targets( void *io_pArgs )
errlCommit (l_err, ISTEP_COMP_ID);
}
} // end if (l_pMasterProcChip)
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "host_discover_targets exit" );
#ifdef CONFIG_PRINT_SYSTEM_INFO
print_system_info();
#endif
+ // Handle the case where we don't have a valid memory map swap victim due
+ // to a module swap - See TARGETING::adjustMemoryMap()
+ if( l_pTopLevel->getAttr<TARGETING::ATTR_FORCE_SBE_UPDATE>()
+ == TARGETING::FORCE_SBE_UPDATE_BAR_MISMATCH )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Forcing SBE update to handle swapped memory map" );
+ l_err = SBE::updateProcessorSbeSeeproms();
+ if(l_err)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "host_discover_targets: Error calling updateProcessorSbeSeeproms");
+ l_stepError.addErrorDetails( l_err );
+ errlCommit( l_err, ISTEP_COMP_ID );
+ }
+
+ // We should never get here, if we do that means the SBE update didn't
+ // actually happen. That is a problem since we're currently running
+ // with mismatched BAR data
+ TARGETING::ATTR_XSCOM_BASE_ADDRESS_type l_xscom =
+ l_pMasterProcChip->getAttr<TARGETING::ATTR_XSCOM_BASE_ADDRESS>();
+ TARGETING::ATTR_PROC_EFF_FABRIC_GROUP_ID_type l_group =
+ l_pMasterProcChip->getAttr<TARGETING::ATTR_PROC_EFF_FABRIC_GROUP_ID>();
+ TARGETING::ATTR_PROC_EFF_FABRIC_CHIP_ID_type l_chip =
+ l_pMasterProcChip->getAttr<TARGETING::ATTR_PROC_EFF_FABRIC_CHIP_ID>();
+ /*@
+ * @errortype
+ * @moduleid ISTEP::MOD_DISCOVER_TARGETS
+ * @reasoncode ISTEP::RC_CANNOT_BOOT_WITH_MISMATCHED_BARS
+ * @userdata1 Current XSCOM BAR
+ * @userdata2[0-31] Desired ATTR_PROC_EFF_FABRIC_GROUP_ID
+ * @userdata2[32:63] Desired ATTR_PROC_EFF_FABRIC_GROUP_ID
+ * @devdesc Not able to update the SBE to correct the BAR mismatch
+ * @custdesc Required module update failed
+ */
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ISTEP::MOD_DISCOVER_TARGETS,
+ ISTEP::RC_CANNOT_BOOT_WITH_MISMATCHED_BARS,
+ l_xscom,
+ TWO_UINT32_TO_UINT64(
+ l_group,
+ l_chip));
+
+ l_err->addHwCallout( l_pMasterProcChip,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL );
+
+ l_err->collectTrace(TARG_COMP_NAME);
+ l_err->collectTrace(SBE_COMP_NAME);
+ l_err->collectTrace("ISTEPS_TRACE",256);
+
+ // Create IStep error log and cross ref error that occurred
+ l_stepError.addErrorDetails( l_err );
+ errlCommit( l_err, ISTEP_COMP_ID );
+ }
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "host_discover_targets exit" );
+
return l_stepError.getErrorHandle();
}
OpenPOWER on IntegriCloud