summaryrefslogtreecommitdiffstats
path: root/src/import/chips
diff options
context:
space:
mode:
authorMark Pizzutillo <Mark.Pizzutillo@ibm.com>2019-11-18 17:24:22 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-12-02 10:22:49 -0600
commit7e3eaedffa203b920c0f8ddcff2f38f92a9b29a4 (patch)
treee8591c2e92bd6220d5875a2b314c46ab8c1e7d8a /src/import/chips
parent30077cd8b888e0f680baa061387a636404d63aa4 (diff)
downloadtalos-hostboot-7e3eaedffa203b920c0f8ddcff2f38f92a9b29a4.tar.gz
talos-hostboot-7e3eaedffa203b920c0f8ddcff2f38f92a9b29a4.zip
Add check for compatible upstream templates before enabling Explorer metadata
Change-Id: I9c406ae9134799a7f524a4ecc86cc2ff78ec791c Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87354 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87367 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.C37
-rw-r--r--src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml14
2 files changed, 50 insertions, 1 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.C
index 9b46f9f50..40c253590 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.C
@@ -40,6 +40,7 @@
#include <mss_p9a_attribute_getters.H>
#include <generic/memory/mss_git_data_helper.H>
#include <lib/workarounds/exp_omi_workarounds.H>
+#include <generic/memory/lib/utils/find.H>
///
/// @brief Verify we know how to talk to the connected device
@@ -510,6 +511,42 @@ fapi2::ReturnCode omiSetACTagPASIDMetaData(const fapi2::Target<fapi2::TARGET_TYP
l_meta_data_ena,
"Metadata requested but not supported", l_meta_data_ena));
+ // If we plan on enabling metadata, make sure either upstream templates 5 or 9 are enabled
+ if (l_meta_data_ena)
+ {
+ uint8_t l_enable_template_5 = 0;
+ uint8_t l_enable_template_9 = 0;
+ uint8_t l_enable_template_4 = 0;
+
+ const auto& l_mcc = mss::find_target<fapi2::TARGET_TYPE_MCC>(i_target);
+
+ FAPI_TRY(mss::attr::get_explr_enable_us_tmpl_5(i_target, l_enable_template_5));
+ FAPI_TRY(mss::attr::get_explr_enable_us_tmpl_9(i_target, l_enable_template_9));
+
+ FAPI_ASSERT((l_enable_template_5 == fapi2::ENUM_ATTR_EXPLR_ENABLE_US_TMPL_5_ENABLED) ||
+ (l_enable_template_9 == fapi2::ENUM_ATTR_EXPLR_ENABLE_US_TMPL_9_ENABLED),
+ fapi2::METADATA_ENABLE_REQUIRES_TEMPLATE_5_OR_9()
+ .set_TARGET(i_target)
+ .set_TMPL_5(l_enable_template_5)
+ .set_TMPL_9(l_enable_template_9),
+ "%s METADATA_ENABLE requires upstream template either 5 or 9 to be set. "
+ "TMPL_5: %u TMPL_9: %u",
+ mss::c_str(i_target),
+ l_enable_template_5,
+ l_enable_template_9)
+
+ // Check for downstream template 4 as well. We won't bomb out here, just have an error printout if not enabled
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_ENABLE_DL_TMPL_4, l_mcc, l_enable_template_4),
+ "Error from FAPI_ATTR_GET (ATTR_PROC_ENABLE_DL_TMPL_4)");
+
+ if (l_enable_template_4 != fapi2::ENUM_ATTR_PROC_ENABLE_DL_TMPL_4_ENABLED)
+ {
+ FAPI_ERR("%s Expected MCC %s TMPL_4 to be enabled for metadata enabling. Was not enabled: may be incorrectly configured",
+ mss::c_str(i_target),
+ mss::c_str(l_mcc));
+ }
+ }
+
l_value.insertFromRight<EXPLR_OC_OCTRLPID_MSB_METADATA_ENABLED,
EXPLR_OC_OCTRLPID_MSB_METADATA_ENABLED_LEN>
(l_meta_data_ena);
diff --git a/src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml b/src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml
index 7654fe832..eba974e3b 100644
--- a/src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml
+++ b/src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2018 -->
+<!-- Contributors Listed Below - COPYRIGHT 2018,2019 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -83,4 +83,16 @@
<ffdc>A</ffdc>
</hwpError>
<!-- ******************************************************************** -->
+ <hwpError>
+ <rc>RC_METADATA_ENABLE_REQUIRES_TEMPLATE_5_OR_9</rc>
+ <description>
+ Procedure: exp_omi_init.C
+ Upstream template 5 or 9 need to be enabled for
+ metadata enable.
+ </description>
+ <ffdc>TARGET</ffdc>
+ <ffdc>TMPL_5</ffdc>
+ <ffdc>TMPL_9</ffdc>
+ </hwpError>
+ <!-- ******************************************************************** -->
</hwpErrors>
OpenPOWER on IntegriCloud