Skip to content

Commit

Permalink
Memory Controller Axone initfiles - initial
Browse files Browse the repository at this point in the history
Change-Id: I6255f1e3aac26bc20b9331e58c445939b19cc17c
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69199
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: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: SHELTON LEUNG <sleung@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69202
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
  • Loading branch information
adamant1 authored and crgeddes committed Feb 14, 2019
1 parent b8427c4 commit e787bf7
Show file tree
Hide file tree
Showing 18 changed files with 1,173 additions and 25 deletions.
109 changes: 109 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] 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 "p9a_mc_scom.H"
#include <stdint.h>
#include <stddef.h>
#include <fapi2.H>

using namespace fapi2;

constexpr uint64_t literal_0xFFFFFFFFFFFFFFFF = 0xFFFFFFFFFFFFFFFF;
constexpr uint64_t literal_0x0000000000000000 = 0x0000000000000000;

fapi2::ReturnCode p9a_mc_scom(const fapi2::Target<fapi2::TARGET_TYPE_MC>& TGT0,
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& TGT1, const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT3)
{
{
fapi2::ATTR_EC_Type l_chip_ec;
fapi2::ATTR_NAME_Type l_chip_id;
FAPI_TRY(FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_NAME, TGT3, l_chip_id));
FAPI_TRY(FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_EC, TGT3, l_chip_ec));
fapi2::buffer<uint64_t> l_scom_buffer;
{
FAPI_TRY(fapi2::getScom( TGT0, 0x70123afull, l_scom_buffer ));

constexpr auto l_MCP_MISC_MBA_SCOMFIR_MCBPARMQ_CFG_CLOCK_MONITOR_EN_ON = 0x1;
l_scom_buffer.insert<59, 1, 63, uint64_t>(l_MCP_MISC_MBA_SCOMFIR_MCBPARMQ_CFG_CLOCK_MONITOR_EN_ON );
FAPI_TRY(fapi2::putScom(TGT0, 0x70123afull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013343ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0xFFFFFFFFFFFFFFFF );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013343ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013346ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013346ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013347ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013347ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013383ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0xFFFFFFFFFFFFFFFF );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013383ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013386ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013386ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x7013387ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x7013387ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x70133c3ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0xFFFFFFFFFFFFFFFF );
FAPI_TRY(fapi2::putScom(TGT0, 0x70133c3ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x70133c6ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x70133c6ull, l_scom_buffer));
}
{
FAPI_TRY(fapi2::getScom( TGT0, 0x70133c7ull, l_scom_buffer ));

l_scom_buffer.insert<0, 64, 0, uint64_t>(literal_0x0000000000000000 );
FAPI_TRY(fapi2::putScom(TGT0, 0x70133c7ull, l_scom_buffer));
}

};
fapi_try_exit:
return fapi2::current_err;
}
45 changes: 45 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] 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_P9A_MC_SCOM_PROCEDURE_H_
#define _INIT_P9A_MC_SCOM_PROCEDURE_H_


#include <stddef.h>
#include <stdint.h>
#include <fapi2.H>


typedef fapi2::ReturnCode (*p9a_mc_scom_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_MC>&,
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>&, const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);

extern "C"
{

fapi2::ReturnCode p9a_mc_scom(const fapi2::Target<fapi2::TARGET_TYPE_MC>& TGT0,
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& TGT1, const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT3);

}

#endif
27 changes: 27 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mc_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] 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
PROCEDURE=p9a_mc_scom
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)
77 changes: 77 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] 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 "p9a_mcc_omi_scan.H"
#include <stdint.h>
#include <stddef.h>
#include <fapi2.H>

using namespace fapi2;

constexpr uint64_t literal_8 = 8;

fapi2::ReturnCode p9a_mcc_omi_scan(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0)
{
{
fapi2::ATTR_EC_Type l_chip_ec;
fapi2::ATTR_NAME_Type l_chip_id;
FAPI_TRY(FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_NAME, TGT0, l_chip_id));
FAPI_TRY(FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_EC, TGT0, l_chip_ec));
fapi2::variable_buffer l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT(6);
fapi2::variable_buffer l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE(6);
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT.insertFromRight<uint64_t>(literal_8, 0, 6);
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE.insertFromRight<uint64_t>(0x3f, 0, 6);
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC01.CHAN0.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC01.CHAN1.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC01.CHAN2.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC01.CHAN3.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC01_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
fapi2::variable_buffer l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT(6);
fapi2::variable_buffer l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE(6);
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT.insertFromRight<uint64_t>(literal_8, 0, 6);
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE.insertFromRight<uint64_t>(0x3f, 0, 6);
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC23.CHAN0.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC23.CHAN1.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC23.CHAN2.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));
FAPI_TRY(fapi2::putSpyWithCare(TGT0, "MC23.CHAN3.ATCL.CL.CLSCOM.MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT",
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT,
l_MC23_CHAN0_ATCL_CL_CLSCOM_MCPERF0_WR_RSVD_LOWER_OR_STATIC_LIMIT_CARE));

};
fapi_try_exit:
return fapi2::current_err;
}
47 changes: 47 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] 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_P9A_MCC_OMI_SCAN_PROCEDURE_H_
#define _INIT_P9A_MCC_OMI_SCAN_PROCEDURE_H_


#include <stddef.h>
#include <stdint.h>
#include <fapi2.H>

#ifdef IFCOMPILER_PLAT
#define INITFILE_PROCEDURE \
p9a_mcc_omi_scan(TGT0);
#endif

typedef fapi2::ReturnCode (*p9a_mcc_omi_scan_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);

extern "C"
{

fapi2::ReturnCode p9a_mcc_omi_scan(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& TGT0);

}

#endif
36 changes: 36 additions & 0 deletions src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scan.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] 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
PROCEDURE=p9a_mcc_omi_scan
lib$(PROCEDURE)_COMMONFLAGS+=-DFAPI_SUPPORT_SPY_AS_STRING=1
$(call BUILD_PROCEDURE)

PROCEDURE=p9a_mcc_omi_scan_ifCompiler
lib$(PROCEDURE)_COMMONFLAGS+=-DFAPI_SUPPORT_SPY_AS_STRING=1
lib$(PROCEDURE)_COMMONFLAGS+=-DIFCOMPILER_PLAT=1
FAPI=2_IFCOMPILER
OBJS+=p9a_mcc_omi_scan.o
lib$(PROCEDURE)_LIBPATH=$(LIBPATH)/ifCompiler
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)

0 comments on commit e787bf7

Please sign in to comment.