From 38c63b67d8d0faf64c8ec89035889a5deed4d60a Mon Sep 17 00:00:00 2001 From: Shelton Leung Date: Mon, 17 Dec 2018 20:24:34 -0500 Subject: HW474117 WAT to allow firmware to disable bypass on port Change-Id: Icf5414488d0173db041278953707d8267fd7fb45 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69914 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: VIJAY F. LOBO Reviewed-by: Adam S. Hale Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70220 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- .../p9/procedures/hwp/initfiles/p9n_mca_scom.C | 30 +++++++++++++++++++++- .../p9/procedures/hwp/initfiles/p9n_mcbist_scom.C | 21 +++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) (limited to 'src/import/chips/p9/procedures/hwp/initfiles') diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9n_mca_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9n_mca_scom.C index edce5e27f..4efcb0e96 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9n_mca_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9n_mca_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. */ /* */ /* */ @@ -89,6 +89,7 @@ constexpr uint64_t literal_1300 = 1300; constexpr uint64_t literal_1040 = 1040; constexpr uint64_t literal_1215 = 1215; constexpr uint64_t literal_1400 = 1400; +constexpr uint64_t literal_0b00 = 0b00; fapi2::ReturnCode p9n_mca_scom(const fapi2::Target& TGT0, const fapi2::Target& TGT1, const fapi2::Target& TGT2, @@ -1135,6 +1136,33 @@ fapi2::ReturnCode p9n_mca_scom(const fapi2::Target& TGT0 FAPI_TRY(fapi2::putScom(TGT0, 0x7010a0aull, l_scom_buffer)); } + { + FAPI_TRY(fapi2::getScom( TGT0, 0x7010a0bull, l_scom_buffer )); + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x10)) ) + { + l_scom_buffer.insert<9, 1, 63, uint64_t>(literal_0b0 ); + } + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) + && (l_chip_ec == 0x22)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x23)) ) + { + l_scom_buffer.insert<9, 1, 63, uint64_t>(literal_0b0 ); + } + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x10)) ) + { + l_scom_buffer.insert<10, 2, 62, uint64_t>(literal_0b00 ); + } + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) + && (l_chip_ec == 0x22)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x23)) ) + { + l_scom_buffer.insert<10, 2, 62, uint64_t>(literal_0b00 ); + } + + FAPI_TRY(fapi2::putScom(TGT0, 0x7010a0bull, l_scom_buffer)); + } { if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x21)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x22)) || ((l_chip_id == 0x5) && (l_chip_ec == 0x23)) ) diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9n_mcbist_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9n_mcbist_scom.C index 0b59dfafd..56c102555 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9n_mcbist_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9n_mcbist_scom.C @@ -36,8 +36,14 @@ constexpr uint64_t literal_0b00000000000000000000001111111011111111111111 = constexpr uint64_t literal_0b10000000000000000 = 0b10000000000000000; constexpr uint64_t literal_0b10000000001000000000000000000100000000000000 = 0b10000000001000000000000000000100000000000000; +constexpr uint64_t literal_0b100000000000000000000000000000000000000000000000 = + 0b100000000000000000000000000000000000000000000000; +constexpr uint64_t literal_0b11111111111111111111111111111111111111111111 = + 0b11111111111111111111111111111111111111111111; +constexpr uint64_t literal_0b10000010000000000 = 0b10000010000000000; constexpr uint64_t literal_0b11110000000 = 0b11110000000; constexpr uint64_t literal_0b00001000000000000000 = 0b00001000000000000000; +constexpr uint64_t literal_0b00010000000000000000 = 0b00010000000000000000; constexpr uint64_t literal_0b100 = 0b100; constexpr uint64_t literal_0b0100 = 0b0100; @@ -64,6 +70,19 @@ fapi2::ReturnCode p9n_mcbist_scom(const fapi2::Target l_scom_buffer.insert<0, 44, 20, uint64_t>(literal_0b10000000001000000000000000000100000000000000 ); FAPI_TRY(fapi2::putScom(TGT0, 0x7012383ull, l_scom_buffer)); } + { + FAPI_TRY(fapi2::getScom( TGT0, 0x701238full, l_scom_buffer )); + + l_scom_buffer.insert<0, 48, 16, uint64_t>(literal_0b100000000000000000000000000000000000000000000000 ); + FAPI_TRY(fapi2::putScom(TGT0, 0x701238full, l_scom_buffer)); + } + { + FAPI_TRY(fapi2::getScom( TGT0, 0x7012390ull, l_scom_buffer )); + + l_scom_buffer.insert<0, 44, 20, uint64_t>(literal_0b11111111111111111111111111111111111111111111 ); + l_scom_buffer.insert<44, 17, 47, uint64_t>(literal_0b10000010000000000 ); + FAPI_TRY(fapi2::putScom(TGT0, 0x7012390ull, l_scom_buffer)); + } { FAPI_TRY(fapi2::getScom( TGT0, 0x70123e0ull, l_scom_buffer )); @@ -90,6 +109,7 @@ fapi2::ReturnCode p9n_mcbist_scom(const fapi2::Target FAPI_TRY(fapi2::getScom( TGT0, 0x70123eaull, l_scom_buffer )); l_scom_buffer.insert<20, 20, 44, uint64_t>(literal_0b00001000000000000000 ); + l_scom_buffer.insert<0, 20, 44, uint64_t>(literal_0b00010000000000000000 ); FAPI_TRY(fapi2::putScom(TGT0, 0x70123eaull, l_scom_buffer)); } { @@ -97,6 +117,7 @@ fapi2::ReturnCode p9n_mcbist_scom(const fapi2::Target l_scom_buffer.insert<23, 3, 61, uint64_t>(literal_0b100 ); l_scom_buffer.insert<37, 4, 60, uint64_t>(literal_0b0100 ); + l_scom_buffer.insert<20, 3, 61, uint64_t>(literal_0b100 ); FAPI_TRY(fapi2::putScom(TGT0, 0x70123ebull, l_scom_buffer)); } -- cgit v1.2.1