diff options
author | Prasad Bg Ranganath <prasadbgr@in.ibm.com> | 2016-06-08 04:49:41 -0500 |
---|---|---|
committer | Jennifer A. Stofer <stofer@us.ibm.com> | 2016-07-15 13:47:56 -0400 |
commit | 813a589d1df68fcea67e0265627f03c77f7d5780 (patch) | |
tree | b056903b15b31c2dae121372f68d277da234a75f /sbe | |
parent | 856efd3641ecd92cddfbe96eeebc9bf3930b2aee (diff) | |
download | talos-sbe-813a589d1df68fcea67e0265627f03c77f7d5780.tar.gz talos-sbe-813a589d1df68fcea67e0265627f03c77f7d5780.zip |
SBE_PLAT: GETRING - L1 support
Change-Id: I6fe37aa23e07ca75f17f48d5eea91e92472c7134
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25491
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'sbe')
-rw-r--r-- | sbe/hwpf/include/plat/plat_hw_access.H | 32 | ||||
-rw-r--r-- | sbe/hwpf/src/Makefile | 32 | ||||
-rw-r--r-- | sbe/hwpf/src/plat/Makefile | 42 | ||||
-rw-r--r-- | sbe/hwpf/src/plat/fapi2sbeplatfiles.mk | 52 | ||||
-rw-r--r-- | sbe/hwpf/src/plat/plat_hw_access.C | 53 |
5 files changed, 207 insertions, 4 deletions
diff --git a/sbe/hwpf/include/plat/plat_hw_access.H b/sbe/hwpf/include/plat/plat_hw_access.H index 0860e83d..109e678a 100644 --- a/sbe/hwpf/include/plat/plat_hw_access.H +++ b/sbe/hwpf/include/plat/plat_hw_access.H @@ -32,6 +32,7 @@ #define PLATHWACCESS_H_ #include <plat_includes.H> +#include "hw_access_def.H" /// PIB Error Mask @@ -90,5 +91,36 @@ asm volatile \ static_assert( K == TARGET_TYPE_NONE, \ "modifyCfamRegister is not supported by PPE platforms") + + // This function loads the scan region data for the given ring address and + // updates the check word data + // @param[in] : ring addtress + // @param[in]: ring mode + // @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. + fapi2::ReturnCode getRing_setup(const uint32_t i_ringAddress, + const fapi2::RingMode i_ringMode); + + // This function read the 64 bit data from the hardware + // @param[in] i_ringAddress - absolute ring address + // @param [out]: 64 bit data + // @param [in] i_bitShiftValue - Bit shift value that needs to rotate + // @note- If the ring length is divisble by 64, then bitshift will always be + // 64, else need to store the ring_length mod 64 and send that value in the + // last iteration. + // @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. + fapi2::ReturnCode getRing_granule_data(const uint32_t i_ringAddress, + uint64_t *o_data, + const uint32_t i_bitShiftValue); + + // This function verify the check word data is matching or not and will + // clean up the scan region data + // @param[in] i_ringAddress - absolute ring address + // @param[in] i_ringMode - Ring mode value + // @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. + fapi2::ReturnCode getRing_verifyAndcleanup(const uint32_t i_ringAddress, + const fapi2::RingMode i_ringMode); + + + #endif // PLATHWACCESS_H_ diff --git a/sbe/hwpf/src/Makefile b/sbe/hwpf/src/Makefile index 7255042e..8ace4a7d 100644 --- a/sbe/hwpf/src/Makefile +++ b/sbe/hwpf/src/Makefile @@ -1,3 +1,27 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: sbe/hwpf/src/Makefile $ +# +# OpenPOWER sbe Project +# +# Contributors Listed Below - COPYRIGHT 2015,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 # This Makefile is designed to be invoked with the -I argument export SUB_OBJDIR = /fapi2 @@ -8,14 +32,14 @@ include fapi2sbefiles.mk OBJS := $(addprefix $(OBJDIR)/, $(FAPI2LIB_OBJECTS)) -libfapi2.a: fapi2 hwpf +libfapi2.a: fapi2 hwpf plat $(AR) crs $(OBJDIR)/libfapi2.a $(OBJDIR)/*.o -.PHONY: clean fapi2 hwpf +.PHONY: clean fapi2 hwpf plat fapi2: $(OBJS) -#plat: -# $(MAKE) -I $(IMAGE_SRCDIR) -C $(PLAT_FAPI2_DIR) +plat: + $(MAKE) -I $(IMAGE_SRCDIR) -C $(PLAT_FAPI2_DIR)/src/plat hwpf: @echo "Processing fapi2 hwpf makefile" diff --git a/sbe/hwpf/src/plat/Makefile b/sbe/hwpf/src/plat/Makefile new file mode 100644 index 00000000..8bf9c50c --- /dev/null +++ b/sbe/hwpf/src/plat/Makefile @@ -0,0 +1,42 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: sbe/hwpf/src/plat/Makefile $ +# +# 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 +# This Makefile is designed to be invoked with the -I argument +include img_defs.mk +include fapi2sbeplatfiles.mk + +OBJS := $(addprefix $(OBJDIR)/, $(FAPI2PLATLIB_OBJECTS)) + +all: $(OBJS) + + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif + diff --git a/sbe/hwpf/src/plat/fapi2sbeplatfiles.mk b/sbe/hwpf/src/plat/fapi2sbeplatfiles.mk new file mode 100644 index 00000000..17a74e57 --- /dev/null +++ b/sbe/hwpf/src/plat/fapi2sbeplatfiles.mk @@ -0,0 +1,52 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: sbe/hwpf/src/plat/fapi2sbeplatfiles.mk $ +# +# OpenPOWER sbe Project +# +# Contributors Listed Below - COPYRIGHT 2015,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 +# @file fapi2ppefiles.mk +# +# @brief mk for including fapi2 object files +# +# @page ChangeLogs Change Logs +# @section fapi2ppefiles.mk +# @verbatim +# +# +# Change Log ****************************************************************** +# Flag Defect/Feature User Date Description +# ------ -------------- ---------- ------------ ----------- +# +# @endverbatim +# +########################################################################## +# Object Files +########################################################################## + +FAPI2PLAT-CPP-SOURCES += plat_ring_traverse.C +FAPI2PLAT-CPP-SOURCES += plat_hw_access.C + +FAPI2PLAT-C-SOURCES = +FAPI2PLAT-S-SOURCES = + + +FAPI2PLATLIB_OBJECTS += $(FAPI2PLAT-CPP-SOURCES:.C=.o) $(FAPI2PLAT-C-SOURCES:.c=.o) $(FAPI2PLAT-S-SOURCES:.S=.o) + diff --git a/sbe/hwpf/src/plat/plat_hw_access.C b/sbe/hwpf/src/plat/plat_hw_access.C new file mode 100644 index 00000000..adc02fc1 --- /dev/null +++ b/sbe/hwpf/src/plat/plat_hw_access.C @@ -0,0 +1,53 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: sbe/hwpf/src/plat/plat_hw_access.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 <fapi2.H> +#include "plat_hw_access.H" + +namespace fapi2 +{ + + ReturnCode getRing_setup(const uint32_t i_ringAddress, + const RingMode i_ringMode) + { + return FAPI2_RC_SUCCESS; + } + + ReturnCode getRing_granule_data(const uint32_t i_ringAddress, + uint64_t *o_data, + const uint32_t i_bitShiftValue) + { + return FAPI2_RC_SUCCESS; + } + + + ReturnCode getRing_verifyAndcleanup(const uint32_t i_ringAddress, + const RingMode i_ringMode) + { + return FAPI2_RC_SUCCESS; + } + + +}; |