diff options
3 files changed, 479 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.C new file mode 100644 index 000000000..8430d9067 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.C @@ -0,0 +1,420 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/initfiles/p9_int_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_int_scom.H" +#include <stdint.h> +#include <stddef.h> +#include <fapi2.H> + +using namespace fapi2; + +constexpr auto literal_1 = 1; +constexpr auto literal_0 = 0; +constexpr auto literal_0x0000000000028000 = 0x0000000000028000; +constexpr auto literal_0x00000000040101C3 = 0x00000000040101C3; +constexpr auto literal_0x9554021F80100E0C = 0x9554021F80100E0C; +constexpr auto literal_0b00 = 0b00; +constexpr auto literal_0x010003FF00100020 = 0x010003FF00100020; +constexpr auto literal_0xD8DFB200FFAFFFD7 = 0xD8DFB200FFAFFFD7; +constexpr auto literal_0x0008002000002002 = 0x0008002000002002; +constexpr auto literal_0xEF6437D2DE7DD3FD = 0xEF6437D2DE7DD3FD; +constexpr auto literal_0x0002000410000000 = 0x0002000410000000; +constexpr auto literal_0x7710CCC3E0000701 = 0x7710CCC3E0000701; +constexpr auto literal_0x00001003000002 = 0x00001003000002; +constexpr auto literal_0xFFFFEFFCFFFFFC = 0xFFFFEFFCFFFFFC; +constexpr auto literal_0x0003C018006 = 0x0003C018006; +constexpr auto literal_0xFFFDFFEFFFA = 0xFFFDFFEFFFA; + +fapi2::ReturnCode p9_int_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; + 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; + } + + fapi2::ATTR_PROC_FABRIC_PUMP_MODE_Type l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE; + l_rc = FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_PUMP_MODE, TGT1, l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE); + + if (l_rc) + { + FAPI_ERR("ERROR executing: FAPI_ATTR_GET (ATTR_PROC_FABRIC_PUMP_MODE)"); + break; + } + + { + l_rc = fapi2::getScom( TGT0, 0x501300aull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x501300aull)"); + break; + } + + { + if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_SMALL_SYSTEM)) + { + l_scom_buffer.insert<uint64_t> (literal_1, 0, 1, 63 ); + } + else if ((l_TGT1_ATTR_PROC_FABRIC_ADDR_BAR_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_ADDR_BAR_MODE_LARGE_SYSTEM)) + { + l_scom_buffer.insert<uint64_t> (literal_0, 0, 1, 63 ); + } + } + + { + if ((l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_PUMP_MODE_CHIP_IS_GROUP)) + { + l_scom_buffer.insert<uint64_t> (literal_1, 1, 1, 63 ); + } + else if ((l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE == fapi2::ENUM_ATTR_PROC_FABRIC_PUMP_MODE_CHIP_IS_NODE)) + { + l_scom_buffer.insert<uint64_t> (literal_0, 1, 1, 63 ); + } + } + + l_rc = fapi2::putScom(TGT0, 0x501300aull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x501300aull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013033ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013033ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x0000000000028000, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013033ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013033ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013036ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013036ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x00000000040101C3, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013036ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013036ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013037ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013037ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x9554021F80100E0C, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013037ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013037ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013124ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013124ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0b00, 28, 2, 62 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013124ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013124ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013140ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013140ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x010003FF00100020, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013140ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013140ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013141ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013141ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0xD8DFB200FFAFFFD7, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013141ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013141ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013148ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013148ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x0008002000002002, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013148ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013148ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013149ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013149ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0xEF6437D2DE7DD3FD, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013149ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013149ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013178ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013178ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x0002000410000000, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013178ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013178ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013179ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013179ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x7710CCC3E0000701, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013179ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013179ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013270ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013270ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x00001003000002, 0, 56, 8 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013270ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013270ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013271ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013271ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0xFFFFEFFCFFFFFC, 0, 56, 8 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013271ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013271ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013272ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013272ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0x0003C018006, 0, 44, 20 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013272ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013272ull)"); + break; + } + } + + { + l_rc = fapi2::getScom( TGT0, 0x5013273ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5013273ull)"); + break; + } + + { + l_scom_buffer.insert<uint64_t> (literal_0xFFFDFFEFFFA, 0, 44, 20 ); + } + + l_rc = fapi2::putScom(TGT0, 0x5013273ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5013273ull)"); + break; + } + } + } + while (0); + + return l_rc; +} diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.H b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.H new file mode 100644 index 000000000..f79126e3f --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.H @@ -0,0 +1,39 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/initfiles/p9_int_scom.H $ */ +/* */ +/* 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 */ +#ifndef _INIT_P9_INT_SCOM_PROCEDURE_H_ +#define _INIT_P9_INT_SCOM_PROCEDURE_H_ + + +#include <stddef.h> +#include <stdint.h> +#include <fapi2.H> + + +typedef fapi2::ReturnCode (*p9_int_scom_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&, + const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>&); + +extern "C" +{ + + fapi2::ReturnCode p9_int_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0, + const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& TGT1); + +} + +#endif diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.mk b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.mk new file mode 100644 index 000000000..9f85d8f78 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.mk @@ -0,0 +1,20 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: chips/p9/procedures/hwp/initfiles/p9_int_scom.mk $ +# +# 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 +PROCEDURE=p9_int_scom +$(call BUILD_PROCEDURE)
\ No newline at end of file |