diff options
| author | Kahn Evans <kahnevan@us.ibm.com> | 2016-10-28 11:22:18 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 16:41:19 -0500 |
| commit | 0e5e920677202080d47365ed3302234745de339f (patch) | |
| tree | 9728e2ceb671f8df7b9be084960bc695b441764f /import/chips/p9/procedures/utils | |
| parent | f2f6810ba3965a3a542ee489c238b886bf84d188 (diff) | |
| download | talos-hcode-0e5e920677202080d47365ed3302234745de339f.tar.gz talos-hcode-0e5e920677202080d47365ed3302234745de339f.zip | |
Add wrappers used by Cronus to avoid compiling ekb C code directly into Cronus
Change-Id: Iee52d9792417344c91b0551c29b1e10b056d39ff
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31983
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@de.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/utils')
3 files changed, 107 insertions, 0 deletions
diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.C b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.C new file mode 100644 index 00000000..daf4f887 --- /dev/null +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.C @@ -0,0 +1,39 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.C $ */ +/* */ +/* OpenPOWER HCODE Project */ +/* */ +/* COPYRIGHT 2016,2017 */ +/* [+] 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 */ +// Wrapper function for p9_stop_save_cpureg() so Cronus doesn't have to compile C code from ekb directly into Cronus exe. + +#include <p9_stop_save_cpureg_wrap.H> + +extern "C" +{ + fapi2::ReturnCode p9_stop_save_cpureg_wrap(void* const i_pImage, const stopImageSection::CpuReg_t i_regId, + const uint64_t i_regData, const uint64_t i_pir) + { + stopImageSection::StopReturnCode_t l_rc = p9_stop_save_cpureg(i_pImage, i_regId, i_regData, i_pir); + return fapi2::ReturnCode(l_rc); + } + + +} // extern "C" diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.H b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.H new file mode 100644 index 00000000..fd297457 --- /dev/null +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.H @@ -0,0 +1,37 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.H $ */ +/* */ +/* OpenPOWER HCODE Project */ +/* */ +/* COPYRIGHT 2016,2017 */ +/* [+] 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 <fapi2.H> +#include <p9_stop_api.H> + +extern "C" +{ + typedef fapi2::ReturnCode (*p9_stop_save_cpureg_wrap_FP_t)(void* const i_pImage, + const stopImageSection::CpuReg_t i_regId, + const uint64_t i_regData, + const uint64_t i_pir); + + fapi2::ReturnCode p9_stop_save_cpureg_wrap(void* const i_pImage, const stopImageSection::CpuReg_t i_regId, + const uint64_t i_regData, const uint64_t i_pir); +}; diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.mk b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.mk new file mode 100644 index 00000000..8cc1b6ff --- /dev/null +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.mk @@ -0,0 +1,31 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/utils/stopreg/p9_stop_save_cpureg_wrap.mk $ +# +# OpenPOWER HCODE Project +# +# COPYRIGHT 2015,2017 +# [+] 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=p9_stop_save_cpureg_wrap +lib$(PROCEDURE)_DEPLIBS += p9_stop_util +lib$(PROCEDURE)_DEPLIBS += p9_stop_api +$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/p9) +$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/p9) +#OBJS+=p9_spr_name_map.o +$(call BUILD_PROCEDURE) |

