diff options
author | CHRISTINA L. GRAVES <clgraves@us.ibm.com> | 2016-02-11 17:29:07 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-03-03 18:20:53 -0500 |
commit | 0c9ab5b7c8f918e43a2d78157826b449e54db9bd (patch) | |
tree | 6ba29ee405246772230440a3db410cddc3da2a87 /src/import/chips/p9/procedures/hwp/initfiles | |
parent | 8ac26004762ecbd79141fa103692a200e6958851 (diff) | |
download | talos-hostboot-0c9ab5b7c8f918e43a2d78157826b449e54db9bd.tar.gz talos-hostboot-0c9ab5b7c8f918e43a2d78157826b449e54db9bd.zip |
L2 for psi scom init
Change-Id: Ib53568344a88bc58049f2d0a04a8d9ed6500b531
Original-Change-Id: I8839a4c6e4d53c3394af1a5f926221dec6e48153
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/24236
Tested-by: Jenkins Server
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21676
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/initfiles')
3 files changed, 193 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.C new file mode 100644 index 000000000..28902de9c --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.C @@ -0,0 +1,136 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/initfiles/p9_psi_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_psi_scom.H" +#include <stdint.h> +#include <stddef.h> +#include <fapi2.H> +#include <attribute_ids.H> +#include <target_types.H> +#include <fapi2_attribute_service.H> +using namespace fapi2; + +#define LITERAL_0b00000 0b00000 +#define LITERAL_0x000 0x000 +#define LITERAL_0x0000000000000000 0x0000000000000000 +#define LITERAL_0x3902FFF800000000 0x3902FFF800000000 +#define LITERAL_0xC629000000000000 0xC629000000000000 + +fapi2::ReturnCode p9_psi_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0) +{ + fapi2::ReturnCode l_rc = 0; + + do + { + fapi2::buffer<uint64_t> BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0; + l_rc = fapi2::getScom( TGT0, 0x501290full, BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x501290f)"); + break; + } + + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 0, 16, 48 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 16, 12, 36 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 0, 4, 32 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 32, 12, 20 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 0, 4, 16 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x000, 48, 5, 11 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 0, 16, 48 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 16, 12, 36 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 0, 4, 32 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 32, 12, 20 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 0, 4, 16 ); + BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0b00000, 48, 5, 11 ); + + fapi2::buffer<uint64_t> BRIDGE_PSIHB_PSIHB_FIR_ACTION0_REG_scom0; + l_rc = fapi2::getScom( TGT0, 0x5012906ull, BRIDGE_PSIHB_PSIHB_FIR_ACTION0_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5012906)"); + break; + } + + BRIDGE_PSIHB_PSIHB_FIR_ACTION0_REG_scom0.insert<uint64_t> (LITERAL_0x0000000000000000, 0, 29, 35 ); + BRIDGE_PSIHB_PSIHB_FIR_ACTION0_REG_scom0.insert<uint64_t> (LITERAL_0x0000000000000000, 0, 21, 14 ); + + fapi2::buffer<uint64_t> BRIDGE_PSIHB_PSIHB_FIR_ACTION1_REG_scom0; + l_rc = fapi2::getScom( TGT0, 0x5012907ull, BRIDGE_PSIHB_PSIHB_FIR_ACTION1_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5012907)"); + break; + } + + BRIDGE_PSIHB_PSIHB_FIR_ACTION1_REG_scom0.insert<uint64_t> (LITERAL_0xC629000000000000, 0, 29, 35 ); + BRIDGE_PSIHB_PSIHB_FIR_ACTION1_REG_scom0.insert<uint64_t> (LITERAL_0xC629000000000000, 0, 21, 14 ); + + fapi2::buffer<uint64_t> BRIDGE_PSIHB_PSIHB_FIR_MASK_REG_scom0; + l_rc = fapi2::getScom( TGT0, 0x5012903ull, BRIDGE_PSIHB_PSIHB_FIR_MASK_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x5012903)"); + break; + } + + BRIDGE_PSIHB_PSIHB_FIR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x3902FFF800000000, 0, 29, 35 ); + BRIDGE_PSIHB_PSIHB_FIR_MASK_REG_scom0.insert<uint64_t> (LITERAL_0x3902FFF800000000, 0, 17, 18 ); + + + l_rc = fapi2::putScom( TGT0, 0x5012903ull, BRIDGE_PSIHB_PSIHB_FIR_MASK_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5012903)"); + break; + } + + l_rc = fapi2::putScom( TGT0, 0x5012906ull, BRIDGE_PSIHB_PSIHB_FIR_ACTION0_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5012906)"); + break; + } + + l_rc = fapi2::putScom( TGT0, 0x5012907ull, BRIDGE_PSIHB_PSIHB_FIR_ACTION1_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x5012907)"); + break; + } + + l_rc = fapi2::putScom( TGT0, 0x501290full, BRIDGE_PSIHB_PSIHB_ERROR_MASK_REG_scom0 ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x501290f)"); + break; + } + + } + while(0); + + return l_rc; +} + diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.H b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.H new file mode 100644 index 000000000..54f7afb20 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.H @@ -0,0 +1,37 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/initfiles/p9_psi_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_PSI_SCOM_PROCEDURE_H_ +#define _INIT_P9_PSI_SCOM_PROCEDURE_H_ + + +#include <stddef.h> +#include <stdint.h> +#include <fapi2_target.H> +#include <fapi2.H> + +typedef fapi2::ReturnCode (*p9_psi_scom_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&); + +extern "C" +{ + + fapi2::ReturnCode p9_psi_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0); + +} + +#endif diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.mk b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.mk new file mode 100644 index 000000000..cf15fbc59 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_psi_scom.mk @@ -0,0 +1,20 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: chips/p9/procedures/hwp/initfiles/p9_psi_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_psi_scom +$(call BUILD_PROCEDURE)
\ No newline at end of file |