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 | |
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>
-rw-r--r-- | src/build/Makefile | 14 | ||||
-rw-r--r-- | src/build/import_hwp_mk/power/istepcommon/istepcommonfiles.mk | 1 | ||||
-rw-r--r-- | src/build/import_hwp_mk/power/istepmpipl/istepmpiplfiles.mk | 1 | ||||
-rw-r--r-- | src/build/linkerscripts/power/linkseeprom.cmd | 3 | ||||
-rw-r--r-- | src/hwpf/Makefile | 19 | ||||
-rw-r--r-- | src/hwpf/fapi2sbefiles.mk | 5 | ||||
-rw-r--r-- | src/hwpf/target.C | 31 | ||||
-rw-r--r-- | src/sbefw/app/power/apppowerfiles.mk | 2 |
8 files changed, 61 insertions, 15 deletions
diff --git a/src/build/Makefile b/src/build/Makefile index 928627cc..d144fcc7 100644 --- a/src/build/Makefile +++ b/src/build/Makefile @@ -84,6 +84,10 @@ LIB_DIRS += -L$(OBJDIR)/fapi2 FAPI2LIB := $(OBJDIR)/fapi2/libfapi2.a LLIBS += -lfapi2 +LIB_DIRS += -L$(OBJDIR)/fapi2_seeprom +FAPI2LIB := $(OBJDIR)/fapi2/libfapi2seeprom.a +LLIBS += -lfapi2seeprom + include $(HWPERR_SRCDIR)/hwpErrors.mk # Common Utils library @@ -138,7 +142,7 @@ $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis: $(IMG $(OBJDUMP) -S $< > $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis #create a linked ELF executable -$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _sbecore_seeprom _sbeapp_seeprom $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM) +$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _seeprom_libs $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM) $(LD) -n -T$(LINK_SCRIPT_SEEPROM) -Map $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).map \ -Bstatic -o $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(BOOT_OBJECTS) $(BUILDDATA_OBJDIR)/$(IMAGE_BASE_PPE_HEADER).o $(OBJS) $(LIB_DIRS) \ --start-group $(LLIBS) --end-group @@ -158,7 +162,7 @@ $(IMG_DIR)/$(IMAGE_SBE_NAME).bin $(IMG_DIR)/$(IMAGE_SBE_NAME).dis: $(IMG_DIR)/$( $(OBJDUMP) -S $< > $(IMG_DIR)/$(IMAGE_SBE_NAME).dis # create a linked ELF executable -$(IMG_DIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _sbecore_seeprom _sbeapp_seeprom $(LINK_OBJS) $(LINK_SCRIPT_SBE) +$(IMG_DIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _seeprom_libs $(LINK_OBJS) $(LINK_SCRIPT_SBE) $(LD) -e __system_reset -T$(LINK_SCRIPT_SBE) -Map $(IMG_DIR)/$(IMAGE_SBE_NAME).map -Bstatic -o $(IMG_DIR)/$(IMAGE_SBE_NAME).out $(LIB_DIRS) $(BUILDDATA_OBJDIR)/base_sbe_fixed.o --start-group $(LLIBS) --end-group # pass the link command file through the C preprocessor to evaluate macros and remove comments @@ -196,7 +200,7 @@ tar: @echo "Generated simics.tar in Sbe images Directory" .PHONY: all normalize compress defaultset appendloader add_LoaderAddr symbols report \ - appendoverrides xml security tracehash topfixedheaders $(SUBDIRS) _sbecore_seeprom _sbeapp_seeprom\ + appendoverrides xml security tracehash topfixedheaders $(SUBDIRS) _seeprom_libs \ tar install buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin @@ -262,9 +266,9 @@ platattr: # Build the subdirectories $(SUBDIRS): $(MAKE) -I $(INCLUDES) -C $@ -f Makefile -_sbecore_seeprom: +_seeprom_libs: + $(MAKE) -I $(INCLUDES) -C ../hwpf -f Makefile img_mem=seeprom $(MAKE) -I $(INCLUDES) -C ../sbefw/core -f Makefile img_mem=seeprom -_sbeapp_seeprom: $(MAKE) -I $(INCLUDES) -C ../sbefw/app/common -f Makefile img_mem=seeprom $(MAKE) -I $(INCLUDES) -C ../sbefw/app/$(PROJECT_APP_DIR) -f Makefile img_mem=seeprom diff --git a/src/build/import_hwp_mk/power/istepcommon/istepcommonfiles.mk b/src/build/import_hwp_mk/power/istepcommon/istepcommonfiles.mk index becdb2b7..1808444b 100644 --- a/src/build/import_hwp_mk/power/istepcommon/istepcommonfiles.mk +++ b/src/build/import_hwp_mk/power/istepcommon/istepcommonfiles.mk @@ -42,6 +42,7 @@ ISTEPCOMMON-CPP-SOURCES +=p9_pm_ocb_init.C ISTEPCOMMON-CPP-SOURCES +=p9_adu_setup.C ISTEPCOMMON-CPP-SOURCES +=p9_adu_coherent_utils.C ISTEPCOMMON-CPP-SOURCES +=p9_adu_access.C +ISTEPCOMMON-CPP-SOURCES +=p9_ram_core.C #Istep2 Procedure but this is required to run from PIBMEM ISTEPCOMMON-CPP-SOURCES +=p9_sbe_tp_switch_gears.C ISTEPCOMMON-CPP-SOURCES +=p9_sbe_npll_setup.C diff --git a/src/build/import_hwp_mk/power/istepmpipl/istepmpiplfiles.mk b/src/build/import_hwp_mk/power/istepmpipl/istepmpiplfiles.mk index b0c7d86e..e353031f 100644 --- a/src/build/import_hwp_mk/power/istepmpipl/istepmpiplfiles.mk +++ b/src/build/import_hwp_mk/power/istepmpipl/istepmpiplfiles.mk @@ -53,7 +53,6 @@ ISTEPMPIPL-CPP-SOURCES +=p9_perv_sbe_cmn.C ISTEPMPIPL-CPP-SOURCES +=p9_suspend_powman.C ISTEPMPIPL-CPP-SOURCES +=p9_collect_suspend_ffdc.C ISTEPMPIPL-CPP-SOURCES +=p9_eq_clear_atomic_lock.C -ISTEPMPIPL-CPP-SOURCES +=p9_ram_core.C ISTEPMPIPL-CPP-SOURCES +=p9_query_cache_access_state.C # Fast array procedures are moved here to locate it on seeprom ISTEPMPIPL-CPP-SOURCES += p9_sbe_fastarray_abist_catchup.C diff --git a/src/build/linkerscripts/power/linkseeprom.cmd b/src/build/linkerscripts/power/linkseeprom.cmd index 77224a69..4742f608 100644 --- a/src/build/linkerscripts/power/linkseeprom.cmd +++ b/src/build/linkerscripts/power/linkseeprom.cmd @@ -6,6 +6,7 @@ /* OpenPOWER sbe Project */ /* */ /* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -97,7 +98,7 @@ SECTIONS //////////////////////////////// .text ALIGN(8): { _text_origin = .; _text_offset = . - _seeprom_origin; - *\libistep2.a:(.text* ) *\libistep3.a:(.text* ) *\libistep4.a:(.text* ) *\libistepmpipl.a:(.text* ) *\libistep5.a:(.text* ) *\libsbecoreseeprom.a:(.text* ) *\libsbeapppowerseeprom.a:(.text* ) *\libsbeappcommonseeprom.a:(.text* ) } > seeprom + *\libistep2.a:(.text* ) *\libistep3.a:(.text* ) *\libistep4.a:(.text* ) *\libistepmpipl.a:(.text* ) *\libistep5.a:(.text* ) *\libsbecoreseeprom.a:(.text* ) *\libsbeapppowerseeprom.a:(.text* ) *\libsbeappcommonseeprom.a:(.text* ) *\libfapi2seeprom.a:(.text* ) } > seeprom _text_size = . - _text_origin; //////////////////////////////// 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 diff --git a/src/sbefw/app/power/apppowerfiles.mk b/src/sbefw/app/power/apppowerfiles.mk index e22c01d7..42a967ea 100644 --- a/src/sbefw/app/power/apppowerfiles.mk +++ b/src/sbefw/app/power/apppowerfiles.mk @@ -33,7 +33,6 @@ APPPOWERPIBMEM-CPP-SOURCES += sbecmdcntrldmt.C APPPOWERPIBMEM-CPP-SOURCES += sbecmdsram.C APPPOWERPIBMEM-CPP-SOURCES += sbecmdgeneric.C APPPOWERPIBMEM-CPP-SOURCES += istep.C -APPPOWERPIBMEM-CPP-SOURCES += sbecmdtracearray.C APPPOWERPIBMEM-C-SOURCES = APPPOWERPIBMEM-S-SOURCES = @@ -46,6 +45,7 @@ APPPOWERSEEPROM-CPP-SOURCES += sbecmdmemaccess.C APPPOWERSEEPROM-CPP-SOURCES += sbecmdmpipl.C APPPOWERSEEPROM-CPP-SOURCES += sbecmdfastarray.C APPPOWERSEEPROM-CPP-SOURCES += sbecmdgeneric.C +APPPOWERSEEPROM-CPP-SOURCES += sbecmdtracearray.C APPPOWERSEEPROM-C-SOURCES = APPPOWERSEEPROM-S-SOURCES = |