Skip to content

Commit

Permalink
HW474117 WAT to allow firmware to disable bypass on port
Browse files Browse the repository at this point in the history
Change-Id: Icf5414488d0173db041278953707d8267fd7fb45
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69914
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: VIJAY F. LOBO <vflobo@us.ibm.com>
Reviewed-by: Adam S. Hale <adam.samuel.hale@ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70220
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Shelton Leung authored and dcrowell77 committed Jan 18, 2019
1 parent 7ef75d2 commit 38c63b6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/import/chips/p9/procedures/hwp/initfiles/p9n_mca_scom.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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<fapi2::TARGET_TYPE_MCA>& TGT0,
const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& TGT1, const fapi2::Target<fapi2::TARGET_TYPE_MCS>& TGT2,
Expand Down Expand Up @@ -1135,6 +1136,33 @@ fapi2::ReturnCode p9n_mca_scom(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& 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)) )
Expand Down
21 changes: 21 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9n_mcbist_scom.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -64,6 +70,19 @@ fapi2::ReturnCode p9n_mcbist_scom(const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>
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 ));

Expand All @@ -90,13 +109,15 @@ fapi2::ReturnCode p9n_mcbist_scom(const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>
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));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x70123ebull, l_scom_buffer ));

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));
}

Expand Down

0 comments on commit 38c63b6

Please sign in to comment.