summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C
diff options
context:
space:
mode:
authorJenny Huynh <jhuynh@us.ibm.com>2016-07-11 18:45:43 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-07-22 15:50:38 -0400
commit69ae4cd2466fd208834671d34845b7ca0039f230 (patch)
treed986d6f673b9544069716ebf2f0e8117a1a37ca1 /src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C
parentaa79bdce93b50ba0a2ca3edac5b65350bcd637a8 (diff)
downloadtalos-hostboot-69ae4cd2466fd208834671d34845b7ca0039f230.tar.gz
talos-hostboot-69ae4cd2466fd208834671d34845b7ca0039f230.zip
First revision of NX initfiles
Change-Id: I0729dbda72776cd7efe1bc3ced161326ec6fdd60 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26882 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: CHRISTOPHER D. HANUDEL <chanudel@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27324 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C570
1 files changed, 570 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C
new file mode 100644
index 000000000..06fd600be
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_nx_scom.C
@@ -0,0 +1,570 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/initfiles/p9_nx_scom.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include "p9_nx_scom.H"
+#include <stdint.h>
+#include <stddef.h>
+#include <fapi2.H>
+
+using namespace fapi2;
+
+constexpr auto literal_0x1100088303E = 0x1100088303E;
+constexpr auto literal_0x0208577C1C0 = 0x0208577C1C0;
+constexpr auto literal_0x6E1FF77CFC0 = 0x6E1FF77CFC0;
+constexpr auto literal_1 = 1;
+constexpr auto literal_0xFC = 0xFC;
+constexpr auto literal_8 = 8;
+constexpr auto literal_2 = 2;
+constexpr auto literal_0x0000C20801F90FFC = 0x0000C20801F90FFC;
+constexpr auto literal_0x000300063E040000 = 0x000300063E040000;
+constexpr auto literal_0x00033DF7FE06F800 = 0x00033DF7FE06F800;
+
+fapi2::ReturnCode p9_nx_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0,
+ const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& TGT1)
+{
+ fapi2::ReturnCode l_rc = 0;
+
+ do
+ {
+ fapi2::buffer<uint64_t> l_scom_buffer;
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011041ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011041ull)");
+ break;
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 63, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 62, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 58, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 57, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 61, 1, 63 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011041ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011041ull)");
+ break;
+ }
+ }
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011042ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011042ull)");
+ break;
+ }
+
+ {
+ constexpr auto l_scom_buffer_MAX_13_INRD = 0xd;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_MAX_13_INRD, 33, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_MAX_7_INRD = 0x7;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_MAX_7_INRD, 37, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_MAX_13_INRD = 0xd;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_MAX_13_INRD, 8, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_MAX_7_INRD = 0x7;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_MAX_7_INRD, 12, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_MAX_3_INRD = 0x3;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_MAX_3_INRD, 25, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_OFF = 0x0;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_OFF, 48, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 23, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 24, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 16, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 17, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_OFF = 0x0;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_OFF, 56, 1, 63 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011042ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011042ull)");
+ break;
+ }
+ }
+ {
+ l_rc = fapi2::getScom( TGT0, 0x201105cull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x201105cull)");
+ break;
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_4 = 0x2;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_4, 1, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 0, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_4 = 0x2;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_4, 6, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 5, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_4 = 0x2;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_4, 11, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 10, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_4 = 0x2;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_4, 16, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 15, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_4 = 0x2;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_4, 21, 4, 60 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 20, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 25, 1, 63 );
+ }
+
+ {
+ constexpr auto l_scom_buffer_DIVIDE_BY_32 = 0x3;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_DIVIDE_BY_32, 26, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x201105cull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x201105cull)");
+ break;
+ }
+ }
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011083ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011083ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x1100088303E, 0, 44, 20 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011083ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011083ull)");
+ break;
+ }
+ }
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011086ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011086ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x0208577C1C0, 0, 44, 20 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011086ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011086ull)");
+ break;
+ }
+ }
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011087ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011087ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x6E1FF77CFC0, 0, 44, 20 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011087ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011087ull)");
+ break;
+ }
+ }
+ 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);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: FAPI_ATTR_GET (ATTR_PROC_FABRIC_ADDR_BAR_MODE)");
+ break;
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011095ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011095ull)");
+ break;
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 22, 1, 63 );
+ }
+
+ {
+ if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_SMALL_SYSTEM))
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 23, 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_scom_buffer_OFF = 0x0;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_OFF, 23, 1, 63 );
+ }
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_1, 25, 2, 62 );
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0xFC, 40, 8, 56 );
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0xFC, 48, 8, 56 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011095ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011095ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110a8ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110a8ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 8, 4, 60 );
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 4, 4, 60 );
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 12, 4, 60 );
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 16, 4, 60 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110a8ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110a8ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110c3ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110c3ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 27, 9, 55 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110c3ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110c3ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110c4ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110c4ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 27, 9, 55 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110c4ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110c4ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110c5ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110c5ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_8, 27, 9, 55 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110c5ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110c5ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110d5ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110d5ull)");
+ break;
+ }
+
+ {
+ constexpr auto l_scom_buffer_ON = 0x1;
+ l_scom_buffer.insert<uint64_t> (l_scom_buffer_ON, 1, 1, 63 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110d5ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110d5ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x20110d6ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x20110d6ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_2, 9, 3, 61 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x20110d6ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x20110d6ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011103ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011103ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x0000C20801F90FFC, 0, 50, 14 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011103ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011103ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011106ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011106ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x000300063E040000, 0, 50, 14 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011106ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011106ull)");
+ break;
+ }
+ }
+
+ {
+ l_rc = fapi2::getScom( TGT0, 0x2011107ull, l_scom_buffer );
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: getScom (0x2011107ull)");
+ break;
+ }
+
+ {
+ l_scom_buffer.insert<uint64_t> (literal_0x00033DF7FE06F800, 0, 50, 14 );
+ }
+
+ l_rc = fapi2::putScom(TGT0, 0x2011107ull, l_scom_buffer);
+
+ if (l_rc)
+ {
+ FAPI_ERR("ERROR executing: putScom (0x2011107ull)");
+ break;
+ }
+ }
+ }
+ while (0);
+
+ return l_rc;
+}
OpenPOWER on IntegriCloud