summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2016-11-02 08:08:52 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-11-30 20:40:24 -0500
commit3d935f6f77c62b2f78fdd36995082eeeaae06c82 (patch)
tree1c05487f4eacea966498ff59754342f6c55b6f1a /src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C
parentd44c34769fbed39d6311c95acfa3802bf4a74482 (diff)
downloadtalos-sbe-3d935f6f77c62b2f78fdd36995082eeeaae06c82.tar.gz
talos-sbe-3d935f6f77c62b2f78fdd36995082eeeaae06c82.zip
Add support for iterating over EC_LEVELS
-Add support for looping over various EC levels for SCOM and Scan init files Change-Id: I7463b71698856922829cddc0e4d8d179803a1db8 RTC:159043 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31688 Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin Gass <bgass@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31874 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C191
1 files changed, 151 insertions, 40 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C
index edb49b29..e6269d54 100644
--- a/src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C
+++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_ncu_scom.C
@@ -41,7 +41,6 @@ fapi2::ReturnCode p9_ncu_scom(const fapi2::Target<fapi2::TARGET_TYPE_EX>& TGT0,
do
{
- fapi2::buffer<uint64_t> l_scom_buffer;
fapi2::ATTR_PROC_FABRIC_ADDR_BAR_MODE_Type l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE;
l_rc = FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_ADDR_BAR_MODE, TGT1, l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE);
@@ -52,79 +51,191 @@ fapi2::ReturnCode p9_ncu_scom(const fapi2::Target<fapi2::TARGET_TYPE_EX>& TGT0,
}
{
- l_rc = fapi2::getScom( TGT0, 0x1001100aull, l_scom_buffer );
-
- if (l_rc)
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- FAPI_ERR("ERROR executing: getScom (0x1001100aull)");
- break;
- }
+ l_rc = fapi2::getScom( TGT0, 0x1001100aull, l_scom_buffer );
- {
- if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_SMALL_SYSTEM))
+ if (l_rc)
{
- constexpr auto l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_ON = 0x1;
- l_scom_buffer.insert<uint64_t> (l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_ON, 9, 1, 63 );
+ FAPI_ERR("ERROR executing: getScom (0x1001100aull)");
+ break;
}
- else if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_LARGE_SYSTEM))
+
{
- constexpr auto l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_OFF = 0x0;
- l_scom_buffer.insert<uint64_t> (l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_OFF, 9, 1, 63 );
+ if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_SMALL_SYSTEM))
+ {
+ constexpr auto l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_ON, 9, 1, 63 );
+ }
+ else if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_LARGE_SYSTEM))
+ {
+ constexpr auto l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_OFF = 0x0;
+ l_scom_buffer.insert<uint64_t> (l_EXP_NC_NCMISC_NCSCOMS_SYSMAP_SM_NOT_LG_SEL_OFF, 9, 1, 63 );
+ }
}
- }
- l_rc = fapi2::putScom(TGT0, 0x1001100aull, l_scom_buffer);
+ l_rc = fapi2::putScom(TGT0, 0x1001100aull, l_scom_buffer);
- if (l_rc)
- {
- FAPI_ERR("ERROR executing: putScom (0x1001100aull)");
- break;
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100aull)");
+ break;
+ }
}
}
{
- l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
-
- if (l_rc)
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
- break;
- }
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
- {
- l_scom_buffer.insert<uint64_t> (literal_0b0001, 0, 4, 60 );
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0b0001, 0, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
+ }
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- l_scom_buffer.insert<uint64_t> (literal_0b0100, 4, 4, 60 );
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0b0100, 4, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
+ }
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- l_scom_buffer.insert<uint64_t> (literal_0x8, 8, 10, 54 );
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x8, 8, 10, 54 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
+ }
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- l_scom_buffer.insert<uint64_t> (literal_0x10, 26, 10, 54 );
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x10, 26, 10, 54 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
+ }
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- l_scom_buffer.insert<uint64_t> (literal_0x8, 18, 4, 60 );
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x8, 18, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
+ }
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
{
- l_scom_buffer.insert<uint64_t> (literal_0x8, 22, 4, 60 );
- }
+ l_rc = fapi2::getScom( TGT0, 0x1001100bull, l_scom_buffer );
- l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x1001100bull)");
+ break;
+ }
- if (l_rc)
- {
- FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
- break;
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x8, 22, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x1001100bull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x1001100bull)");
+ break;
+ }
}
}
+
}
- while (0);
+ while(0);
return l_rc;
}
OpenPOWER on IntegriCloud