From bedc05eb919f70831f744865c94e19d9d169e654 Mon Sep 17 00:00:00 2001 From: Jenny Huynh Date: Fri, 17 May 2019 10:40:33 -0400 Subject: Fabric inits update for Axone Change-Id: I7fd20b531154d7109b191f78c2400320552b611e Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77544 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: PPE CI Reviewed-by: DANIEL C. HOWE Reviewed-by: Thi N. Tran Tested-by: HWSV CI Tested-by: Hostboot CI Reviewed-by: Joseph J. McGill Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77557 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- .../procedures/hwp/initfiles/p9_fbc_cd_hp1_scom.C | 16 ++++++- .../procedures/hwp/initfiles/p9_fbc_cd_hp2_scom.C | 22 ++++++++-- .../procedures/hwp/initfiles/p9_fbc_cd_hp3_scom.C | 22 ++++++++-- .../procedures/hwp/initfiles/p9_fbc_no_hp_scom.C | 51 +++++++++++++++++++++- .../xml/attribute_info/chip_ec_attributes.xml | 19 +++++++- 5 files changed, 120 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp1_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp1_scom.C index 6f65f5fe5..896614802 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp1_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp1_scom.C @@ -149,6 +149,10 @@ fapi2::ReturnCode p9_fbc_cd_hp1_scom(const fapi2::Target l_scom_buffer; { if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) @@ -1200,11 +1204,21 @@ fapi2::ReturnCode p9_fbc_cd_hp1_scom(const fapi2::Target(literal_0b11111110 ); } - if (literal_1) + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<42, 2, 62, uint64_t>(literal_0b10 ); + } + + if (( ! l_def_IS_AXONE)) { l_scom_buffer.insert<42, 8, 56, uint64_t>(literal_0b11111110 ); } + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<44, 6, 58, uint64_t>(literal_0b000000 ); + } + if (literal_1) { l_scom_buffer.insert<50, 2, 62, uint64_t>(literal_0b01 ); diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp2_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp2_scom.C index 42e21b5f9..456de5563 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp2_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp2_scom.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,9 +40,11 @@ constexpr uint64_t literal_0b1111 = 0b1111; constexpr uint64_t literal_0b011 = 0b011; constexpr uint64_t literal_0b010 = 0b010; constexpr uint64_t literal_0b11111110 = 0b11111110; +constexpr uint64_t literal_0 = 0; +constexpr uint64_t literal_0b10 = 0b10; +constexpr uint64_t literal_0b000000 = 0b000000; constexpr uint64_t literal_0b01 = 0b01; constexpr uint64_t literal_0b00 = 0b00; -constexpr uint64_t literal_0b10 = 0b10; fapi2::ReturnCode p9_fbc_cd_hp2_scom(const fapi2::Target& TGT0, const fapi2::Target& TGT1) @@ -59,6 +61,10 @@ fapi2::ReturnCode p9_fbc_cd_hp2_scom(const fapi2::Target l_scom_buffer; { if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) @@ -184,11 +190,21 @@ fapi2::ReturnCode p9_fbc_cd_hp2_scom(const fapi2::Target(literal_0b11111110 ); } - if (literal_1) + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<42, 2, 62, uint64_t>(literal_0b10 ); + } + + if (( ! l_def_IS_AXONE)) { l_scom_buffer.insert<42, 8, 56, uint64_t>(literal_0b11111110 ); } + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<44, 6, 58, uint64_t>(literal_0b000000 ); + } + if (literal_1) { l_scom_buffer.insert<50, 2, 62, uint64_t>(literal_0b01 ); diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp3_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp3_scom.C index 9790095c3..3488465f2 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp3_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp3_scom.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,9 +40,11 @@ constexpr uint64_t literal_0b1 = 0b1; constexpr uint64_t literal_0b011 = 0b011; constexpr uint64_t literal_0b010 = 0b010; constexpr uint64_t literal_0b11111110 = 0b11111110; +constexpr uint64_t literal_0 = 0; +constexpr uint64_t literal_0b10 = 0b10; +constexpr uint64_t literal_0b000000 = 0b000000; constexpr uint64_t literal_0b01 = 0b01; constexpr uint64_t literal_0b00 = 0b00; -constexpr uint64_t literal_0b10 = 0b10; fapi2::ReturnCode p9_fbc_cd_hp3_scom(const fapi2::Target& TGT0, const fapi2::Target& TGT1) @@ -59,6 +61,10 @@ fapi2::ReturnCode p9_fbc_cd_hp3_scom(const fapi2::Target l_scom_buffer; { if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) @@ -184,11 +190,21 @@ fapi2::ReturnCode p9_fbc_cd_hp3_scom(const fapi2::Target(literal_0b11111110 ); } - if (literal_1) + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<42, 2, 62, uint64_t>(literal_0b10 ); + } + + if (( ! l_def_IS_AXONE)) { l_scom_buffer.insert<42, 8, 56, uint64_t>(literal_0b11111110 ); } + if (l_def_IS_AXONE) + { + l_scom_buffer.insert<44, 6, 58, uint64_t>(literal_0b000000 ); + } + if (literal_1) { l_scom_buffer.insert<50, 2, 62, uint64_t>(literal_0b01 ); diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C index d368c5b07..ba5d1a069 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,8 +31,8 @@ using namespace fapi2; constexpr uint64_t literal_0 = 0; constexpr uint64_t literal_1 = 1; -constexpr uint64_t literal_0x0 = 0x0; constexpr uint64_t literal_3 = 3; +constexpr uint64_t literal_0x0 = 0x0; constexpr uint64_t literal_0x3 = 0x3; constexpr uint64_t literal_2 = 2; constexpr uint64_t literal_0x4 = 0x4; @@ -89,6 +89,8 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target l_scom_buffer; { FAPI_TRY(fapi2::getScom( TGT0, 0x501180aull, l_scom_buffer )); @@ -128,6 +130,21 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target(l_PB_COM_PB_CFG_LCL_HW_MARK_CNT_42 ); + + if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) + { + if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; + l_scom_buffer.insert<49, 1, 61, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); + } + else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 61, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); + } + } + FAPI_TRY(fapi2::putScom(TGT0, 0x501180aull, l_scom_buffer)); } { @@ -168,6 +185,21 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target(l_PB_COM_PB_CFG_LCL_HW_MARK_CNT_42 ); + + if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) + { + if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; + l_scom_buffer.insert<49, 1, 62, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); + } + else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 62, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); + } + } + FAPI_TRY(fapi2::putScom(TGT0, 0x5011c0aull, l_scom_buffer)); } { @@ -1710,6 +1742,21 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target(l_PB_COM_PB_CFG_LCL_HW_MARK_CNT_42 ); + + if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) + { + if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; + l_scom_buffer.insert<49, 1, 63, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); + } + else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) + { + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 63, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); + } + } + FAPI_TRY(fapi2::putScom(TGT0, 0x501200aull, l_scom_buffer)); } diff --git a/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml index 61d9f96e4..50f2c1a36 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/chip_ec_attributes.xml @@ -7768,7 +7768,24 @@ - + + + ATTR_CHIP_EC_FEATURE_AXONE_FBC_SETTINGS + TARGET_TYPE_PROC_CHIP + + Fabric settings that are in Axone only + + + + ENUM_ATTR_NAME_AXONE + + 0x10 + GREATER_THAN_OR_EQUAL + + + + + ATTR_CHIP_EC_FEATURE_HW412371 TARGET_TYPE_PROC_CHIP, TARGET_TYPE_PROC_CHIP -- cgit v1.2.1