summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-03-14 15:07:39 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-04-05 16:28:25 -0400
commit02f8995967cc97988cf3cdb40b1805915517bbaf (patch)
tree41f4053af67d9c91904f1ead70bb72f53bc941cc /src
parent211b0cb9d4470b3087bcbd9004e33a747750d3e5 (diff)
downloadtalos-hostboot-02f8995967cc97988cf3cdb40b1805915517bbaf.tar.gz
talos-hostboot-02f8995967cc97988cf3cdb40b1805915517bbaf.zip
Use SCOM to access Master Processor's SBE MSG register
Previously we always used CFAM to acess the sbe_msg_register. However, this will fail if we attempt to read the master via CFAM. The master processor cannot call getCfam on itself. In the case where we need to get this msg reg from the master we must use scom. RTC: 180604 CQ: SW421405 Change-Id: Iaa199361272e30b73114fafb8d3f6887c794464b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55883 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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://ralgit01.raleigh.ibm.com/gerrit1/55893 Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/hwp/sbe/p9_get_sbe_msg_register.C26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/import/chips/p9/procedures/hwp/sbe/p9_get_sbe_msg_register.C b/src/import/chips/p9/procedures/hwp/sbe/p9_get_sbe_msg_register.C
index 8f8b32a88..5e6ece884 100644
--- a/src/import/chips/p9/procedures/hwp/sbe/p9_get_sbe_msg_register.C
+++ b/src/import/chips/p9/procedures/hwp/sbe/p9_get_sbe_msg_register.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -40,13 +40,29 @@
fapi2::ReturnCode p9_get_sbe_msg_register(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_chip,
sbeMsgReg_t& o_sbeReg)
{
- fapi2::buffer<uint32_t> l_reg;
-
FAPI_DBG("Entering ...");
- FAPI_TRY(fapi2::getCfamRegister(i_chip, PERV_SB_MSG_FSI, l_reg));
+ fapi2::buffer<uint32_t> l_cfamReg;
+#ifdef __HOSTBOOT_MODULE
+ fapi2::buffer<uint64_t> l_scomReg;
+#ifndef __HOSTBOOT_RUNTIME
+ uint8_t l_is_master_chip = 0;
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_SBE_MASTER_CHIP, i_chip, l_is_master_chip));
- o_sbeReg.reg = l_reg;
+ if(l_is_master_chip)
+#else
+ if(true)
+#endif
+ {
+ FAPI_TRY(fapi2::getScom(i_chip, PERV_SB_MSG_SCOM, l_scomReg));
+ l_scomReg.extract<0, 32>(o_sbeReg.reg);
+ }
+ else
+#endif
+ {
+ FAPI_TRY(fapi2::getCfamRegister(i_chip, PERV_SB_MSG_FSI, l_cfamReg));
+ o_sbeReg.reg = l_cfamReg;
+ }
FAPI_DBG("Exiting ...");
OpenPOWER on IntegriCloud