diff options
author | Shakeeb A. Pasha B K <shakeebbk@in.ibm.com> | 2018-03-26 02:21:04 -0400 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-03-29 05:12:03 -0400 |
commit | 783b420403b7d649b38ffd4772dc422499914449 (patch) | |
tree | fb8305ddb24bccd60dfa74e8bdc35dbdbd3d55c8 /src/hwpf | |
parent | b6c3a885a1ff9e1ea22b7c71ee6da7a860908b3d (diff) | |
download | talos-sbe-783b420403b7d649b38ffd4772dc422499914449.tar.gz talos-sbe-783b420403b7d649b38ffd4772dc422499914449.zip |
Revert "SBE Space optimisation" by moving ramming to pibmem
This reverts commit 2dce1d2d7fbbca6e1f917fb9c76632561c5a84b1.
And move plat target init and plat attr init to seeprom
Perfromace measurements - from sbe_tart to proc_attn_listen:
Without this change: 3.433112590s
With this change : 3.458556197s
Change-Id: If6b5dfcae2e40aa5d0d608e1d01036546c525628
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56239
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/hwpf')
-rw-r--r-- | src/hwpf/Makefile | 19 | ||||
-rw-r--r-- | src/hwpf/fapi2sbefiles.mk | 5 | ||||
-rw-r--r-- | src/hwpf/target.C | 31 |
3 files changed, 48 insertions, 7 deletions
diff --git a/src/hwpf/Makefile b/src/hwpf/Makefile index e61d8a18..e060a678 100644 --- a/src/hwpf/Makefile +++ b/src/hwpf/Makefile @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2017 +# Contributors Listed Below - COPYRIGHT 2015,2018 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,16 +24,22 @@ # IBM_PROLOG_END_TAG # This Makefile is designed to be invoked with the -I argument +ifneq ($(img_mem), seeprom) export SUB_OBJDIR = /fapi2 +OBJS = $(addprefix $(OBJDIR)/, $(FAPI2PLATLIB_OBJECTS)) +LIBNAME = libfapi2 +else +export SUB_OBJDIR = /fapi2_seeprom +GCC-DEFS += -D__SBEFW_SEEPROM__=1 +OBJS = $(addprefix $(OBJDIR)/, $(FAPI2PLATLIB_SEEPROM_OBJECTS)) +LIBNAME = libfapi2seeprom +endif include img_defs.mk include fapi2sbefiles.mk - -OBJS := $(addprefix $(OBJDIR)/, $(FAPI2PLATLIB_OBJECTS)) - -libfapi2.a: fapi2 hwpf - $(AR) crs $(OBJDIR)/libfapi2.a $(OBJDIR)/*.o +$(LIBNAME).a: $(OBJS) + $(AR) crs $(OBJDIR)/$(LIBNAME).a $(OBJDIR)/*.o .PHONY: clean fapi2 hwpf fapi2: $(OBJS) diff --git a/src/hwpf/fapi2sbefiles.mk b/src/hwpf/fapi2sbefiles.mk index 93409440..45165c5b 100644 --- a/src/hwpf/fapi2sbefiles.mk +++ b/src/hwpf/fapi2sbefiles.mk @@ -5,7 +5,8 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2015,2017 +# Contributors Listed Below - COPYRIGHT 2015,2018 +# [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,3 +51,5 @@ FAPI2PLAT-S-SOURCES = FAPI2PLATLIB_OBJECTS += $(FAPI2PLAT-CPP-SOURCES:.C=.o) $(FAPI2PLAT-C-SOURCES:.c=.o) $(FAPI2PLAT-S-SOURCES:.S=.o) +FAPI2PLAT-SEEPROM-CPP-SOURCES += target.C +FAPI2PLATLIB_SEEPROM_OBJECTS += $(FAPI2PLAT-SEEPROM-CPP-SOURCES:.C=.o) diff --git a/src/hwpf/target.C b/src/hwpf/target.C index 7ba54237..b1e1a0c0 100644 --- a/src/hwpf/target.C +++ b/src/hwpf/target.C @@ -31,6 +31,7 @@ #include <p9_perv_scom_addresses.H> #include <p9_perv_scom_addresses_fld.H> +#ifndef __SBEFW_SEEPROM__ // Global Vector containing ALL targets. This structure is referenced by // fapi2::getChildren to produce the resultant returned vector from that // call. @@ -46,8 +47,28 @@ fapi2attr::CoreAttributes_t* G_core_attributes_ptr; fapi2attr::EQAttributes_t* G_eq_attributes_ptr; fapi2attr::EXAttributes_t* G_ex_attributes_ptr; +#else // __SBEFW_SEEPROM__ +extern std::vector<fapi2::plat_target_handle_t> G_vec_targets; + +// Global variable for fixed section in pibmem +extern G_sbe_attrs_t G_sbe_attrs; + +extern fapi2attr::SystemAttributes_t* G_system_attributes_ptr; +extern fapi2attr::ProcChipAttributes_t* G_proc_chip_attributes_ptr; +extern fapi2attr::PervAttributes_t* G_perv_attributes_ptr; +extern fapi2attr::CoreAttributes_t* G_core_attributes_ptr; +extern fapi2attr::EQAttributes_t* G_eq_attributes_ptr; +extern fapi2attr::EXAttributes_t* G_ex_attributes_ptr; + +#endif // else __SBEFW_SEEPROM__ + namespace fapi2 { +#ifdef __SBEFW_SEEPROM__ +extern fapi2::ReturnCode + plat_TargetPresent( fapi2::Target<fapi2::TARGET_TYPE_PERV> & i_chiplet_target, + bool & b_present); + ReturnCode plat_AttrInit() { union @@ -387,6 +408,9 @@ namespace fapi2 fapi_try_exit: return fapi2::current_err; } +#endif //__SBEFW_SEEPROM__ + +#ifndef __SBEFW_SEEPROM__ // Get the plat target handle by chiplet number - For PERV targets template<> @@ -753,6 +777,9 @@ fapi_try_exit: return fapi2::current_err; } +#endif // not __SBEFW_SEEPROM__ + +#ifdef __SBEFW_SEEPROM__ /// @brief Function to initialize the G_targets vector based on partial good /// attributes /// this will move to plat_target.H formally @@ -1006,6 +1033,9 @@ fapi_try_exit: return fapi2::current_err; } +#endif // __SBEFW_SEEPROM__ +#ifndef __SBEFW_SEEPROM__ + /// @brief Function to initialize the G_targets vector based on partial good /// attributes fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> plat_getChipTarget() @@ -1075,4 +1105,5 @@ fapi_try_exit: fapi_try_exit: return fapi2::current_err; } +#endif //not __SBEFW_SEEPROM__ } // fapi2 |