From 3fe1c55beea6c4b4d2c575194fbaea56d83f1b79 Mon Sep 17 00:00:00 2001 From: Nick Klazynski Date: Fri, 2 Sep 2016 12:14:07 -0500 Subject: Add FIR action and mask values for core Change-Id: I2a26594793187d61cbf52997946e26665dcb645d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29266 Tested-by: Jenkins Server Reviewed-by: Joseph J. McGill Reviewed-by: Thi N. Tran Tested-by: Thi N. Tran Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29317 Tested-by: FSP CI Jenkins Reviewed-by: Sachin Gupta --- .../chips/p9/procedures/hwp/initfiles/initfiles.mk | 3 +- .../p9/procedures/hwp/initfiles/p9_core_scom.C | 110 +++++++++++++++++++++ .../p9/procedures/hwp/initfiles/p9_core_scom.H | 43 ++++++++ 3 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C create mode 100644 src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.H diff --git a/src/import/chips/p9/procedures/hwp/initfiles/initfiles.mk b/src/import/chips/p9/procedures/hwp/initfiles/initfiles.mk index 9703f3e3..73caf30b 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/initfiles.mk +++ b/src/import/chips/p9/procedures/hwp/initfiles/initfiles.mk @@ -1,7 +1,7 @@ # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # -# $Source: import/chips/p9/procedures/hwp/initfiles/initfiles.mk $ +# $Source: src/import/chips/p9/procedures/hwp/initfiles/initfiles.mk $ # # OpenPOWER sbe Project # @@ -33,6 +33,7 @@ INITFILES-CPP-SOURCES += p9_ncu_scom.C INITFILES-CPP-SOURCES += p9_l2_scom.C INITFILES-CPP-SOURCES += p9_l3_scom.C +INITFILES-CPP-SOURCES += p9_core_scom.C INITFILES-C-SOURCES += INITFILES-S-SOURCES += diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C new file mode 100644 index 00000000..df02d0f4 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C @@ -0,0 +1,110 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.C $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +#include "p9_core_scom.H" +#include +#include +#include + +using namespace fapi2; + +constexpr auto literal_0x0301D70000AB7696 = 0x0301D70000AB7696; +constexpr auto literal_0x0000000000000000 = 0x0000000000000000; +constexpr auto literal_0xA858009775100008 = 0xA858009775100008; + +fapi2::ReturnCode p9_core_scom(const fapi2::Target& TGT0) +{ + fapi2::ReturnCode l_rc = 0; + + do + { + fapi2::buffer l_scom_buffer; + { + l_rc = fapi2::getScom( TGT0, 0x20010a43ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x20010a43ull)"); + break; + } + + { + l_scom_buffer.insert (literal_0x0301D70000AB7696, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x20010a43ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x20010a43ull)"); + break; + } + } + { + l_rc = fapi2::getScom( TGT0, 0x20010a46ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x20010a46ull)"); + break; + } + + { + l_scom_buffer.insert (literal_0x0000000000000000, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x20010a46ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x20010a46ull)"); + break; + } + } + { + l_rc = fapi2::getScom( TGT0, 0x20010a47ull, l_scom_buffer ); + + if (l_rc) + { + FAPI_ERR("ERROR executing: getScom (0x20010a47ull)"); + break; + } + + { + l_scom_buffer.insert (literal_0xA858009775100008, 0, 64, 0 ); + } + + l_rc = fapi2::putScom(TGT0, 0x20010a47ull, l_scom_buffer); + + if (l_rc) + { + FAPI_ERR("ERROR executing: putScom (0x20010a47ull)"); + break; + } + } + } + while (0); + + return l_rc; +} diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.H b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.H new file mode 100644 index 00000000..97600c70 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.H @@ -0,0 +1,43 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_core_scom.H $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef _INIT_P9_CORE_SCOM_PROCEDURE_H_ +#define _INIT_P9_CORE_SCOM_PROCEDURE_H_ + + +#include +#include +#include + + +typedef fapi2::ReturnCode (*p9_core_scom_FP_t)(const fapi2::Target&); + +extern "C" +{ + + fapi2::ReturnCode p9_core_scom(const fapi2::Target& TGT0); + +} + +#endif -- cgit v1.2.1