summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2018-04-25 14:23:36 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-04-27 14:54:07 -0400
commit9e489a4e55630ff825726262406d394da68f2626 (patch)
tree4ab69e993fd92d1a68a5c2c5ce797d4257a41119
parent526bef08021c62233717c4aad8b48650f73c3180 (diff)
downloadtalos-hostboot-9e489a4e55630ff825726262406d394da68f2626.tar.gz
talos-hostboot-9e489a4e55630ff825726262406d394da68f2626.zip
wrap_test: OBUS deconfiguration
Due to fabric limitations, we can only have 2 OBUSes enabled at a time. This commit deconfigures the OBUSes that do not belong the set of links to enable in this boot based on attributes. Change-Id: I15f5e9f3ea186367b9c4d55f4dc2e9b32b251f6d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57836 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/HBconfig5
-rw-r--r--src/include/usr/hwas/common/deconfigGard.H2
-rw-r--r--src/include/usr/hwas/common/hwas_reasoncodes.H2
-rw-r--r--src/usr/hwas/common/hwas.C113
4 files changed, 122 insertions, 0 deletions
diff --git a/src/HBconfig b/src/HBconfig
index 249f9cf34..7011b1b5d 100644
--- a/src/HBconfig
+++ b/src/HBconfig
@@ -53,3 +53,8 @@ config SUPPORT_PARTIAL_CACHE
help
Support chips that do not have full cache --
intended for early bringup of hardware
+
+config SMP_WRAP_TEST
+ defaults y
+ help
+ Enables SMP Wrap configuration for manufacturing testing
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H
index ad1e80282..e27836522 100644
--- a/src/include/usr/hwas/common/deconfigGard.H
+++ b/src/include/usr/hwas/common/deconfigGard.H
@@ -186,6 +186,8 @@ public:
DECONFIGURED_BY_NO_PARENT_MC, // BASE | 0x19
DECONFIGURED_BY_NO_PARENT_MI, // BASE | 0x1A
+ DECONFIGURED_BY_NO_MATCHING_LINK_SET, // BASE | 0x1B
+
// mask - these bits mean it's a PLID and not an enum
DECONFIGURED_BY_PLID_MASK = 0xFFFF0000,
};
diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H
index 54e5ec494..94248a5d4 100644
--- a/src/include/usr/hwas/common/hwas_reasoncodes.H
+++ b/src/include/usr/hwas/common/hwas_reasoncodes.H
@@ -35,6 +35,7 @@ namespace HWAS
MOD_DECONFIG_TARGETS_FROM_GARD = 0x04,
MOD_VALIDATE_EC_LEVELS = 0x05,
MOD_RUNTIME_DECONFIG = 0x06,
+ MOD_DISABLE_OBUS = 0x07,
};
enum HwasReasonCode
@@ -62,6 +63,7 @@ namespace HWAS
RC_INVALID_PARAM = HWAS_COMP_ID | 0x11,
RC_NOT_AT_RUNTIME = HWAS_COMP_ID | 0x12,
RC_NULL_TARGET = HWAS_COMP_ID | 0x13,
+ RC_ONLY_TWO_OBUS_SHOULD_BE_CONFIGURED = HWAS_COMP_ID | 0x14,
};
};
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index 17c6b5b49..9bac35eb3 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -193,6 +193,104 @@ bool allCoresBad(const uint8_t & i_firstCore,
return coresBad;
}
+#ifdef CONFIG_SMP_WRAP_TEST
+/**
+ * @brief disable obuses in wrap config.
+ * Due to fabric limitations, we can only have 2 parallel OBUS
+ * connections at a time in wrap config.So, deconfigure appropriate
+ * OBUSes using the following rule. If the value of
+ * MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE (on the system target) does
+ * not match with the value of MFG_WRAP_TEST_ABUS_LINKS_SET (on the
+ * OBUS target), then deconfigure the OBUSes.
+ * @return errlHndl_t
+ *
+ */
+errlHndl_t disableOBUSes()
+{
+ errlHndl_t l_err = nullptr;
+
+ do
+ {
+ //get system target and figure out which links to enable
+ Target* pSys;
+ targetService().getTopLevelTarget(pSys);
+ auto l_links_set_enable =
+ pSys->getAttr<ATTR_MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE>();
+
+ //get all OBUS chiplets
+ TargetHandleList l_obusList;
+ getAllChiplets(l_obusList, TYPE_OBUS);
+ for (const auto & l_obus : l_obusList)
+ {
+ //It fails to compile if you compare two different enum types
+ //That's why, typecasting here. The underlying enum value
+ //should be the same.
+ ATTR_MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE_type l_link_set =
+ (ATTR_MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE_type)
+ l_obus->getAttr<ATTR_MFG_WRAP_TEST_ABUS_LINKS_SET>();
+
+ if (l_links_set_enable != l_link_set)
+ {
+ //deconfigure
+ l_err = HWAS::theDeconfigGard().deconfigureTarget(
+ *l_obus,
+ HWAS::DeconfigGard::DECONFIGURED_BY_NO_MATCHING_LINK_SET);
+ if (l_err)
+ {
+ HWAS_ERR("disableOBUSes: Unable to deconfigure %x OBUS",
+ get_huid(l_obus));
+ break;
+ }
+ }
+ }
+
+ if (l_err)
+ {
+ break;
+ }
+
+ //Sanity Check to make sure each proc only has a max of 2 OBUSes
+ //only if MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE was overidden
+ //because that means we are trying to run in wrap mode.
+ //Otherwise, it will be defaulted to SET_NONE
+ if (l_links_set_enable != MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE_SET_NONE)
+ {
+ TargetHandleList l_procList;
+ getAllChips(l_procList, TYPE_PROC);
+ for (const auto & l_proc : l_procList)
+ {
+ getChildChiplets(l_obusList, l_proc, TYPE_OBUS, true);
+ if (l_obusList.size() > 2)
+ {
+ HWAS_ERR("disableOBUSes: Only 2 BUSes should be functional"
+ " under %x, found %d",
+ get_huid(l_proc), l_obusList.size());
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_UNRECOVERABLE
+ * @moduleid MOD_DISABLE_OBUS
+ * @reasoncode RC_ONLY_TWO_OBUS_SHOULD_BE_CONFIGURED
+ * @devdesc Due to fabric limitations, only 2
+ * OBUSes should be configured, we found
+ * too many
+ * @custdesc A problem occurred during the IPL of
+ * the system: Found too many obus links
+ * @userdata1 HUID of proc
+ * @userdata2 number of functional OBUSes
+ */
+ l_err = hwasError(ERRL_SEV_UNRECOVERABLE,
+ MOD_DISABLE_OBUS,
+ RC_ONLY_TWO_OBUS_SHOULD_BE_CONFIGURED,
+ get_huid(l_proc), l_obusList.size());
+ break;
+ }
+ }
+ }
+ } while (0);
+ return l_err;
+}
+#endif
+
errlHndl_t discoverTargets()
{
HWAS_DBG("discoverTargets entry");
@@ -484,6 +582,21 @@ errlHndl_t discoverTargets()
// targets that need to be deconfigured
invokePresentByAssoc();
+#ifdef CONFIG_SMP_WRAP_TEST
+ //Due to fabric limitations, we can only have 2 parallel OBUS
+ //connections at a time in wrap config. So, deconfigure appropriate
+ //OBUSes using the following rule. If the value of
+ //MFG_WRAP_TEST_ABUS_LINKS_SET_ENABLE (on the system target) does
+ //not match with the value of MFG_WRAP_TEST_ABUS_LINKS_SET (on the
+ //OBUS target), then deconfigure the OBUSes.
+ errl = disableOBUSes();
+ if (errl)
+ {
+ HWAS_ERR ("discoverTargets:: disableOBUSes failed");
+ break;
+ }
+#endif
+
} while (0);
if (errl)
OpenPOWER on IntegriCloud