diff options
author | Sunil.Kumar <skumar8j@in.ibm.com> | 2015-12-01 06:32:53 -0600 |
---|---|---|
committer | Amit J. Tendolkar <amit.tendolkar@in.ibm.com> | 2015-12-08 04:07:19 -0600 |
commit | 02632c435f420892f94ecf1a39785ed39e6fd62f (patch) | |
tree | b465d4f8e695df250ceacfe403790a997483c978 | |
parent | b50b79a16f7face41d9d4fbb5983af76c7d3de26 (diff) | |
download | talos-sbe-02632c435f420892f94ecf1a39785ed39e6fd62f.tar.gz talos-sbe-02632c435f420892f94ecf1a39785ed39e6fd62f.zip |
Makefile Infra
Change-Id: I541cbf57945ab77f7e2575745dc2cc6b839687b5
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22362
Tested-by: Jenkins Server
Reviewed-by: Basabjit Sengupta <basengup@in.ibm.com>
Reviewed-by: Amit J. Tendolkar <amit.tendolkar@in.ibm.com>
20 files changed, 429 insertions, 64 deletions
diff --git a/import/chips/p9/procedures/hwp/cache/Makefile b/import/chips/p9/procedures/hwp/cache/Makefile new file mode 100644 index 00000000..94d8ef88 --- /dev/null +++ b/import/chips/p9/procedures/hwp/cache/Makefile @@ -0,0 +1,30 @@ + +# This Makefile compiles all of the cache hardware procedure code. See the +# "cachehcdfiles.mk" file in this directory. + +#all generated files from this makefile will end up in obj/cache +export SUB_OBJDIR = /cache + +include img_defs.mk +include cachehcdfiles.mk + + +OBJS := $(addprefix $(OBJDIR)/, $(CACHE_OBJECTS)) + +libcache.a: cache + $(AR) crs $(OBJDIR)/libcache.a $(OBJDIR)/*.o + +.PHONY: clean cache +cache: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif diff --git a/import/chips/p9/procedures/hwp/cache/cachehcdfiles.mk b/import/chips/p9/procedures/hwp/cache/cachehcdfiles.mk new file mode 100644 index 00000000..2066cc39 --- /dev/null +++ b/import/chips/p9/procedures/hwp/cache/cachehcdfiles.mk @@ -0,0 +1,30 @@ +# @file cachehcdfiles.mk +# +# @brief mk for including cache hcode object files +# +########################################################################## +# Object Files +########################################################################## + +CACHE-CPP-SOURCES += p9_hcd_cache_arrayinit.C +CACHE-CPP-SOURCES += p9_hcd_cache_chiplet_init.C +CACHE-CPP-SOURCES += p9_hcd_cache_chiplet_reset.C +CACHE-CPP-SOURCES += p9_hcd_cache_dpll_setup.C +CACHE-CPP-SOURCES += p9_hcd_cache_gptr_time_initf.C +CACHE-CPP-SOURCES += p9_hcd_cache_initf.C +CACHE-CPP-SOURCES += p9_hcd_cache_occ_runtime_scom.C +CACHE-CPP-SOURCES += p9_hcd_cache_poweron.C +CACHE-CPP-SOURCES += p9_hcd_cache_ras_runtime_scom.C +CACHE-CPP-SOURCES += p9_hcd_cache_repair_initf.C +CACHE-CPP-SOURCES += p9_hcd_cache_runinit.C +CACHE-CPP-SOURCES += p9_hcd_cache_scomcust.C +CACHE-CPP-SOURCES += p9_hcd_cache_scominit.C +CACHE-CPP-SOURCES += p9_hcd_cache_startclocks.C + +CACHE-C-SOURCES += +CACHE-S-SOURCES += + +CACHE_OBJECTS += $(CACHE-CPP-SOURCES:.C=.o) +CACHE_OBJECTS += $(CACHE-C-SOURCES:.c=.o) +CACHE_OBJECTS += $(CACHE-S-SOURCES:.S=.o) + diff --git a/import/chips/p9/procedures/hwp/core/Makefile b/import/chips/p9/procedures/hwp/core/Makefile new file mode 100644 index 00000000..8bd2d2ac --- /dev/null +++ b/import/chips/p9/procedures/hwp/core/Makefile @@ -0,0 +1,30 @@ + +# This Makefile compiles all of the core hardware procedure code. See the +# "corehcdfiles.mk" file in this directory. + +#all generated files from this makefile will end up in obj/cache +export SUB_OBJDIR = /core + +include img_defs.mk +include corehcdfiles.mk + + +OBJS := $(addprefix $(OBJDIR)/, $(CORE_OBJECTS)) + +libcore.a: core + $(AR) crs $(OBJDIR)/libcore.a $(OBJDIR)/*.o + +.PHONY: clean core +core: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif diff --git a/import/chips/p9/procedures/hwp/core/corehcdfiles.mk b/import/chips/p9/procedures/hwp/core/corehcdfiles.mk new file mode 100644 index 00000000..368595c5 --- /dev/null +++ b/import/chips/p9/procedures/hwp/core/corehcdfiles.mk @@ -0,0 +1,32 @@ +# @file corehcdfiles.mk +# +# @brief mk for including core hcode object files +# +########################################################################## +# Object Files +########################################################################## + +CORE-CPP-SOURCES += p9_hcd_core_arrayinit.C +CORE-CPP-SOURCES += p9_hcd_core_chiplet_init.C +CORE-CPP-SOURCES += p9_hcd_core_chiplet_reset.C +CORE-CPP-SOURCES += p9_hcd_core_gptr_time_initf.C +CORE-CPP-SOURCES += p9_hcd_core_initf.C +CORE-CPP-SOURCES += p9_hcd_core_occ_runtime_scom.C +CORE-CPP-SOURCES += p9_hcd_core_pcb_arb.C +CORE-CPP-SOURCES += p9_hcd_core_poweron.C +CORE-CPP-SOURCES += p9_hcd_core_ras_runtime_scom.C +CORE-CPP-SOURCES += p9_hcd_core_repair_initf.C +CORE-CPP-SOURCES += p9_hcd_core_runinit.C +CORE-CPP-SOURCES += p9_hcd_core_scomcust.C +CORE-CPP-SOURCES += p9_hcd_core_scominit.C +CORE-CPP-SOURCES += p9_hcd_core_startclocks.C +CORE-CPP-SOURCES += p9_thread_control.C +CORE-CPP-SOURCES += p9_sbe_instruct_start.C + +CORE-C-SOURCES += +CORE-S-SOURCES += + +CORE_OBJECTS += $(CORE-CPP-SOURCES:.C=.o) +CORE_OBJECTS += $(CORE-C-SOURCES:.c=.o) +CORE_OBJECTS += $(CORE-S-SOURCES:.S=.o) + diff --git a/import/chips/p9/procedures/hwp/lib/Makefile b/import/chips/p9/procedures/hwp/lib/Makefile new file mode 100644 index 00000000..9cecb0ae --- /dev/null +++ b/import/chips/p9/procedures/hwp/lib/Makefile @@ -0,0 +1,30 @@ + +# This Makefile compiles all of the common library hardware procedure code. +# See the "libcommonfiles.mk" file in this directory. + +#all generated files from this makefile will end up in obj/lib +export SUB_OBJDIR = /lib + +include img_defs.mk +include libcommonfiles.mk + + +OBJS := $(addprefix $(OBJDIR)/, $(LIB_OBJECTS)) + +libcommon.a: lib + $(AR) crs $(OBJDIR)/libcommon.a $(OBJDIR)/*.o + +.PHONY: clean lib +lib: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif diff --git a/import/chips/p9/procedures/hwp/lib/libcommonfiles.mk b/import/chips/p9/procedures/hwp/lib/libcommonfiles.mk new file mode 100644 index 00000000..f494b819 --- /dev/null +++ b/import/chips/p9/procedures/hwp/lib/libcommonfiles.mk @@ -0,0 +1,18 @@ +# @file libcommonfiles.mk +# +# @brief mk for including library common object files +# +########################################################################## +# Object Files +########################################################################## + +LIB-CPP-SOURCES += p9_common_poweronoff.C +LIB-CPP-SOURCES += p9_common_pro_epi_log.C + +LIB-C-SOURCES += +LIB-S-SOURCES += + +LIB_OBJECTS += $(LIB-CPP-SOURCES:.C=.o) +LIB_OBJECTS += $(LIB-C-SOURCES:.c=.o) +LIB_OBJECTS += $(LIB-S-SOURCES:.S=.o) + diff --git a/import/chips/p9/procedures/hwp/nest/Makefile b/import/chips/p9/procedures/hwp/nest/Makefile new file mode 100644 index 00000000..c1fc1f6c --- /dev/null +++ b/import/chips/p9/procedures/hwp/nest/Makefile @@ -0,0 +1,30 @@ + +# This Makefile compiles all of the nest hardware procedure code. See the +# "nestfiles.mk" file in this directory. + +#all generated files from this makefile will end up in obj/nest +export SUB_OBJDIR = /nest + +include img_defs.mk +include nestfiles.mk + + +OBJS := $(addprefix $(OBJDIR)/, $(NEST_OBJECTS)) + +libnest.a: nest + $(AR) crs $(OBJDIR)/libnest.a $(OBJDIR)/*.o + +.PHONY: clean nest +nest: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif diff --git a/import/chips/p9/procedures/hwp/nest/nestfiles.mk b/import/chips/p9/procedures/hwp/nest/nestfiles.mk new file mode 100644 index 00000000..e0b97bc0 --- /dev/null +++ b/import/chips/p9/procedures/hwp/nest/nestfiles.mk @@ -0,0 +1,22 @@ +# @file nestfiles.mk +# +# @brief mk for including nest object files +# +########################################################################## +# Object Files +########################################################################## + +#NEST-CPP-SOURCES = p9_sbe_mcs_setup.C +NEST-CPP-SOURCES +=p9_sbe_scominit.C +NEST-CPP-SOURCES +=p9_sbe_fabricinit.C +NEST-CPP-SOURCES +=p9_fbc_utils.C +NEST-CPP-SOURCES +=p9_sbe_load_bootloader.C +NEST-CPP-SOURCES +=p9_pba_access.C +NEST-CPP-SOURCES +=p9_pba_coherent_utils.C +NEST-CPP-SOURCES +=p9_pba_setup.C +NEST-C-SOURCES = +NEST-S-SOURCES = + +NEST_OBJECTS += $(NEST-CPP-SOURCES:.C=.o) +NEST_OBJECTS += $(NEST-C-SOURCES:.c=.o) +NEST_OBJECTS += $(NEST-S-SOURCES:.S=.o) diff --git a/import/chips/p9/procedures/hwp/perv/Makefile b/import/chips/p9/procedures/hwp/perv/Makefile new file mode 100644 index 00000000..5c1fc635 --- /dev/null +++ b/import/chips/p9/procedures/hwp/perv/Makefile @@ -0,0 +1,30 @@ + +# This Makefile compiles all of the core hardware procedure code. See the +# "pervfiles.mk" file in this directory. + +#all generated files from this makefile will end up in obj/perv +export SUB_OBJDIR = /perv + +include img_defs.mk +include pervfiles.mk + + +OBJS := $(addprefix $(OBJDIR)/, $(PERV_OBJECTS)) + +libperv.a: perv + $(AR) crs $(OBJDIR)/libperv.a $(OBJDIR)/*.o + +.PHONY: clean perv +perv: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif diff --git a/import/chips/p9/procedures/hwp/perv/pervfiles.mk b/import/chips/p9/procedures/hwp/perv/pervfiles.mk new file mode 100644 index 00000000..030fb39a --- /dev/null +++ b/import/chips/p9/procedures/hwp/perv/pervfiles.mk @@ -0,0 +1,51 @@ +# @file pervfiles.mk +# +# @brief mk for including perv object files +# +########################################################################## +# Object Files +########################################################################## + +PERV-CPP-SOURCES =p9_sbe_arrayinit.C +PERV-CPP-SOURCES +=p9_sbe_attr_setup.C +PERV-CPP-SOURCES +=p9_sbe_check_master.C +PERV-CPP-SOURCES +=p9_sbe_chiplet_init.C +PERV-CPP-SOURCES +=p9_sbe_chiplet_pll_initf.C +PERV-CPP-SOURCES +=p9_sbe_chiplet_pll_setup.C +PERV-CPP-SOURCES +=p9_sbe_chiplet_reset.C +PERV-CPP-SOURCES +=p9_sbe_enable_seeprom.C +PERV-CPP-SOURCES +=p9_sbe_gptr_time_repr_initf.C +PERV-CPP-SOURCES +=p9_sbe_lpc_init.C +PERV-CPP-SOURCES +=p9_sbe_nest_enable_ridi.C +PERV-CPP-SOURCES +=p9_sbe_nest_initf.C +PERV-CPP-SOURCES +=p9_sbe_nest_startclocks.C +PERV-CPP-SOURCES +=p9_sbe_npll_initf.C +PERV-CPP-SOURCES +=p9_sbe_npll_setup.C +PERV-CPP-SOURCES +=p9_sbe_select_ex.C +PERV-CPP-SOURCES +=p9_sbe_startclock_chiplets.C +PERV-CPP-SOURCES +=p9_sbe_tp_arrayinit.C +PERV-CPP-SOURCES +=p9_sbe_tp_chiplet_init1.C +PERV-CPP-SOURCES +=p9_sbe_tp_chiplet_init2.C +PERV-CPP-SOURCES +=p9_sbe_tp_chiplet_init3.C +PERV-CPP-SOURCES +=p9_sbe_tp_chiplet_reset.C +PERV-CPP-SOURCES +=p9_sbe_tp_enable_ridi.C +PERV-CPP-SOURCES +=p9_sbe_tp_gptr_time_repr_initf.C +PERV-CPP-SOURCES +=p9_sbe_tp_initf.C +PERV-CPP-SOURCES +=p9_sbe_tp_ld_image.C +PERV-CPP-SOURCES +=p9_sbe_tp_switch_gears.C +PERV-CPP-SOURCES +=p9_select_boot_master.C +PERV-CPP-SOURCES +=p9_select_clock_mux.C +PERV-CPP-SOURCES +=p9_set_fsi_gp_shadow.C +PERV-CPP-SOURCES +=p9_setup_clock_term.C +PERV-CPP-SOURCES +=p9_setup_sbe_config.C +PERV-CPP-SOURCES +=p9_sbe_setup_evid.C +PERV-CPP-SOURCES +=p9_perv_sbe_cmn.C +PERV-CPP-SOURCES +=p9_sbe_common.C +PERV-CPP-SOURCES +=p9_sbe_gear_switcher.C + +PERV-C-SOURCES = +PERV-S-SOURCES = + +PERV_OBJECTS += $(PERV-CPP-SOURCES:.C=.o) +PERV_OBJECTS += $(PERV-C-SOURCES:.c=.o) +PERV_OBJECTS += $(PERV-S-SOURCES:.S=.o) diff --git a/import/chips/p9/procedures/xml/error_info/hwpErrors.mk b/import/chips/p9/procedures/xml/error_info/hwpErrors.mk new file mode 100644 index 00000000..bfc0251d --- /dev/null +++ b/import/chips/p9/procedures/xml/error_info/hwpErrors.mk @@ -0,0 +1,30 @@ +# @file hwpErrors.mk +# +# @brief mk for including library common error files +# +########################################################################## +# Error Files +########################################################################## + +PERV_CURR_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + +# This variable name must not change +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_perv_sbe_cmn_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_arrayinit_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_chiplet_init_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_chiplet_pll_setup_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_common_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_fabricinit_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_gear_switcher_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_nest_startclocks_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_npll_setup_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_tp_arrayinit_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_tp_chiplet_init3_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_mcs_setup_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_hcd_cache_dpll_setup_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_common_poweronoff_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_hcd_cache_startclocks_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_hcd_core_startclocks_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_pba_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_sbe_load_bootloader_errors.xml +ERROR_XML_FILES += $(PERV_CURR_DIR)/p9_thread_control_errors.xml diff --git a/sbe/build/citest/etc/patches/p9n.chip.patch b/sbe/build/citest/etc/patches/p9n.chip.patch new file mode 100644 index 00000000..ceee66c1 --- /dev/null +++ b/sbe/build/citest/etc/patches/p9n.chip.patch @@ -0,0 +1,5 @@ +570a571,574 +> +> # scratch pad register +> 0x0005003F +> diff --git a/sbe/build/citest/etc/patches/patchlist.txt b/sbe/build/citest/etc/patches/patchlist.txt index 5bf8c309..0f9ad16e 100644 --- a/sbe/build/citest/etc/patches/patchlist.txt +++ b/sbe/build/citest/etc/patches/patchlist.txt @@ -1,6 +1,12 @@ # Example Format -Brief description of the problem or reason for patch --RTC: Task/Story used to remove this patch --CQ: Defect/Req for checking the changes into fips910 --Files: list of files --Coreq: list of associated changes, e.g. workarounds.presimsetup +#Brief description of the problem or reason for patch +#-RTC: Task/Story used to remove this patch +#-CQ: Defect/Req for checking the changes into fips910 +#-Files: list of files +#-Coreq: list of associated changes, e.g. workarounds.presimsetup + +RTC: 142706 +Files: P9n.chip. This patch is used to add missing register in scomdef file. + As test verification of all isteps, updated scomdef, p9n.chip + will be added in CMVC. + diff --git a/sbe/build/citest/etc/workarounds.postsimsetup b/sbe/build/citest/etc/workarounds.postsimsetup index e19a6c02..49053538 100755 --- a/sbe/build/citest/etc/workarounds.postsimsetup +++ b/sbe/build/citest/etc/workarounds.postsimsetup @@ -9,3 +9,7 @@ #cp $BACKING_BUILD/src/simu/data/cec-chip/base_cec_chip_file $sb/simu/data/cec-chip #patch -p0 $sb/simu/data/cec-chip/base_cec_chip_file $HOSTBOOTROOT/src/build/citest/etc/patches/my_patch_File +echo "+++ Updating p9n.chip file" +mkdir -p $sb/simu/data/cec-chip +cp $BACKING_BUILD/src/simu/data/cec-chip/p9n.chip $sb/simu/data/cec-chip +patch -p0 $sb/simu/data/cec-chip/p9n.chip $SBEROOT/sbe/build/citest/etc/patches/p9n.chip.patch diff --git a/sbe/image/Makefile b/sbe/image/Makefile index d6cbd799..2de83b27 100644 --- a/sbe/image/Makefile +++ b/sbe/image/Makefile @@ -63,35 +63,31 @@ HWPLIB_MAKE_DIR := $(HWPLIB_SRCDIR) LIB_DIRS += -L$(OBJDIR)/lib HWPLIB := $(OBJDIR)/libcommon.a LLIBS += -lcommon -include $(HWPLIB_SRCDIR)/libcommonerrors.mk +include $(HWPERR_SRCDIR)/hwpErrors.mk # Common Cache HWP Exit library CACHE_MAKE_DIR := $(CACHE_SRCDIR) LIB_DIRS += -L$(OBJDIR)/cache CACHELIB := $(OBJDIR)/cache/libcache.a LLIBS += -lcache -include $(CACHE_SRCDIR)/cachehcderrors.mk # Common Core libraries CORE_MAKE_DIR := $(CORE_SRCDIR) LIB_DIRS += -L$(OBJDIR)/core CORELIB := $(OBJDIR)/core/libcore.a LLIBS += -lcore -include $(CORE_SRCDIR)/corehcderrors.mk # Common Perv libraries PERV_MAKE_DIR := $(PERV_SRCDIR) LIB_DIRS += -L$(OBJDIR)/perv PERVLIB := $(OBJDIR)/perv/libperv.a LLIBS += -lperv -include $(PERV_SRCDIR)/perverrors.mk # Common Nest libraries NEST_MAKE_DIR := $(NEST_SRCDIR) LIB_DIRS += -L$(OBJDIR)/nest NESTLIB := $(OBJDIR)/nest/libnest.a LLIBS += -lnest -include $(NEST_SRCDIR)/nesterrors.mk SBE_TOOLS := $(TOOLS_IMAGE_DIR)/sbe_xip_tool $(TOOLS_IMAGE_DIR)/sbe_default_tool @@ -197,19 +193,21 @@ buildInfo: #Create an obj directory if needed $(LINK_OBJS) $(OBJS) $(OBJS:.o=.d) $(OBJDIR)/base_sbe_fixed.o $(OBJDIR)/base_sbe_fixed.d: | $(OBJDIR) -ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/perv_attributes.xml +ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/pg_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/pervasive_attributes.xml -ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/proc_attributes.xml -ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/ex_attributes.xml -ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/eq_attributes.xml +# TODO via RTC 142708 +# Workaound for ATTR_CHIP_UNIT_POS. Remove Mirror_WA_attributes.xml once fapi +# support is in. +ATTRFILES += $(IMPORT_XML_DIR)/../../../../../sbe/image/Mirror_WA_attributes.xml +ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/p9_sbe_load_bootloader_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/core_attributes.xml ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/nest_attributes.xml $(OBJDIR): - $(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) - $(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl -path $(TOOLS_ATTR_DIR)/src -inc $(PPE_FAPI2_DIR)/include -src $(PPE_FAPI2_DIR)/src - $(TOOLS_ATTR_DIR)/ppeCreateIfAttrService.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeCreateIfAttrService.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) mkdir -p $(OBJDIR) .PHONY: clean topfixedheaders $(PKLIB) $(P2PLIB) $(PPELIB) $(FAPI2LIB) $(CACHELIB) $(CORELIB) $(PERVLIB) $(NESTLIB) $(HWPLIB) buildInfo pibMemAttrSet @@ -217,16 +215,16 @@ $(OBJDIR): #errxml: topfixedheaders attrids platattr attrserv topfixedheaders: - $(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl . $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) attrids: - $(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) platattr: $(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(TOOLS_ATTR_DIR)/src --inc $(PPE_FAPI2_DIR)/include --src $(PPE_FAPI2_DIR)/src attrserv: - $(TOOLS_ATTR_DIR)/ppeCreateIfAttrService.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_ATTR_DIR)/ppeCreateIfAttrService.pl $(PPE_FAPI2_DIR)/include $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) #Build macro-specific kernel code @@ -285,7 +283,7 @@ normalize: $(SBE_TOOLS) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(TOOLS_IMAGE_DIR)/sbe_xip_tool $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin normalize defaultset: $(SBE_TOOLS) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin normalize - $(TOOLS_IMAGE_DIR)/ppeSetFixed.pl $(TOOLS_IMAGE_DIR) $(BASE_OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_IMAGE_DIR)/ppeSetFixed.pl $(TOOLS_IMAGE_DIR) $(BASE_OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) # Build hwp_error_info.H. If the script fails then print the contents of # the header and then delete whatever garbage the script left to force it to @@ -330,7 +328,7 @@ tracehash: $(THASH) -c -d $(OBJDIR) -s $(OBJDIR)/trexStringFile pibMemAttrSet: - $(TOOLS_IMAGE_DIR)/ppeSetFixedPibmem.pl $(IMPORT_XML_DIR)/p9_ppe_attributes.xml $(ATTRFILES) + $(TOOLS_IMAGE_DIR)/ppeSetFixedPibmem.pl $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES) #clean the kernel directory first, then the application level clean clean: diff --git a/sbe/image/Mirror_WA_attributes.xml b/sbe/image/Mirror_WA_attributes.xml new file mode 100644 index 00000000..ea4bac8a --- /dev/null +++ b/sbe/image/Mirror_WA_attributes.xml @@ -0,0 +1,11 @@ +<!-- $Id: proc_pll_ring_attributes.xml,v 1.17 2014/11/13 20:14:02 szhong Exp $ --> +<!-- proc_pll_ring_attributes.xml --> +<attributes> + <attribute> + <id>ATTR_CHIP_UNIT_POS</id> + <targetType>TARGET_TYPE_PERV</targetType> + <description></description> + <valueType>uint8</valueType> + </attribute> + <!-- ********************************************************************* --> +</attributes> diff --git a/sbe/image/img_defs.mk b/sbe/image/img_defs.mk index 00d46b4f..e9a4c87d 100644 --- a/sbe/image/img_defs.mk +++ b/sbe/image/img_defs.mk @@ -47,28 +47,33 @@ export IMAGE_SRCDIR = $(abspath .) endif ifndef CACHE_SRCDIR -export CACHE_SRCDIR = $(abspath ../../hwp/cache) +export CACHE_SRCDIR = $(abspath ../../import/chips/p9/procedures/hwp/cache) endif ifndef CORE_SRCDIR -export CORE_SRCDIR = $(abspath ../../hwp/core) +export CORE_SRCDIR = $(abspath ../../import/chips/p9/procedures/hwp/core) endif ifndef PERV_SRCDIR -export PERV_SRCDIR = $(abspath ../../hwp/perv) +export PERV_SRCDIR = $(abspath ../../import/chips/p9/procedures/hwp/perv) +endif + +ifndef HWPERR_SRCDIR +export HWPERR_SRCDIR = $(abspath ../../import/chips/p9/procedures/xml/error_info) endif ifndef NEST_SRCDIR -export NEST_SRCDIR = $(abspath ../../hwp/nest) +export NEST_SRCDIR = $(abspath ../../import/chips/p9/procedures/hwp/nest) endif ifndef HWPLIB_SRCDIR -export HWPLIB_SRCDIR = $(abspath ../../hwp/lib) +export HWPLIB_SRCDIR = $(abspath ../../import/chips/p9/procedures/hwp/lib) endif ifndef IMG_INCLUDES export IMG_INCLUDES = -I$(IMAGE_SRCDIR) -I$(CACHE_SRCDIR) -I$(CORE_SRCDIR) -I$(PERV_SRCDIR) -I$(NEST_SRCDIR) endif + ifndef BASE_OBJDIR export BASE_OBJDIR = $(abspath ../obj) endif @@ -88,11 +93,11 @@ export TOOLS_IMAGE_DIR = $(abspath ../../tools/image) endif ifndef IMPORT_XML_DIR -export IMPORT_XML_DIR = $(abspath ../../importtemp/xml) +export IMPORT_XML_DIR = $(abspath ../../import/chips/p9/procedures/xml) endif ifndef IMPORT_COMMON_DIR -export IMPORT_COMMON_DIR = $(abspath ../../importtemp/common) +export IMPORT_COMMON_DIR = $(abspath ../../import/chips/p9/common) endif ifndef P2P_SRCDIR @@ -274,11 +279,9 @@ ASFLAGS = -mppe42 ifdef P2P_ENABLE #use this to disable optimizations (fused compare/branch etc.) -PCP-FLAG = - -#use this to enable optimizations -#PCP-FLAG = +PCP-FLAG = -b endif + ############################################################################ #override the GNU Make implicit rule for going from a .C to a .o diff --git a/sbe/sbefw/sbecmdiplcontrol.C b/sbe/sbefw/sbecmdiplcontrol.C index e810d519..542e9304 100644 --- a/sbe/sbefw/sbecmdiplcontrol.C +++ b/sbe/sbefw/sbecmdiplcontrol.C @@ -49,6 +49,10 @@ // Core HWP header file #include "p9_hcd_core.H" +// istep 5 hwp header files +#include "p9_sbe_instruct_start.H" +#include "p9_sbe_load_bootloader.H" + // Forward declaration using namespace fapi2; ReturnCode sbeExecuteIstep (uint8_t i_major, uint8_t i_minor); @@ -65,13 +69,11 @@ typedef ReturnCode (*sbeIstep_t)( sbeIstepHwp_t ); // Wrapper function which will call HWP with Proc target. ReturnCode istepWithProc( sbeIstepHwp_t i_hwp ); ReturnCode istepNoOp( sbeIstepHwp_t i_hwp ); - -ReturnCode istepWithEx( sbeIstepHwp_t i_hwp); - ReturnCode istepWithEq( sbeIstepHwp_t i_hwp); ReturnCode istepWithCore( sbeIstepHwp_t i_hwp); -//structure for mapping SBE wrapper and HWP functions +ReturnCode istepLoadBootLoader( sbeIstepHwp_t i_hwp); +//structure for mapping SBE wrapper and HWP functions typedef struct { sbeIstep_t istepWrapper; @@ -139,7 +141,12 @@ static istepMap_t g_istep3PtrTbl[ ISTEP3_MAX_SUBSTEPS ] = { &istepWithProc, (sbeIstepHwp_t)&p9_sbe_fabricinit }, { &istepNoOp, NULL }, // TODO via RTC 120752 // FW proc_sbe_check_master - { &istepWithProc, (sbeIstepHwp_t)&p9_sbe_mcs_setup }, + // TODO via RTC 142710 + // mcs_setup does not compile currently as MI target support + // is not present. So currently this istep has neem made NoOp + // in this code + //{ &istepWithProc, (sbeIstepHwp_t)&p9_sbe_mcs_setup }, + { &istepNoOp, NULL }, // mcs_setup does not compile currently { &istepWithProc, (sbeIstepHwp_t)&p9_sbe_select_ex }, }; static istepMap_t g_istep4PtrTbl[ ISTEP4_MAX_SUBSTEPS ] = @@ -149,14 +156,14 @@ static istepMap_t g_istep4PtrTbl[ ISTEP4_MAX_SUBSTEPS ] = { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_gptr_time_initf }, { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_dpll_setup }, { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_chiplet_init }, - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_repair_initf }, - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_arrayinit }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_repair_initf }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_arrayinit }, { &istepNoOp, NULL }, // DFT Only { &istepNoOp, NULL }, // DFT Only - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_initf }, - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_startclocks }, - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_scominit }, - { &istepWithEx, (sbeIstepHwp_t )&p9_hcd_cache_scomcust }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_initf }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_startclocks }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_scominit }, + { &istepWithEq, (sbeIstepHwp_t )&p9_hcd_cache_scomcust }, { &istepNoOp, NULL }, // Runtime only { &istepNoOp, NULL }, // Runtime only { &istepNoOp, NULL }, // stub for SBE @@ -186,8 +193,8 @@ static istepMap_t g_istep4PtrTbl[ ISTEP4_MAX_SUBSTEPS ] = // Add the support for istep 5 HWP static istepMap_t g_istep5PtrTbl[ ISTEP5_MAX_SUBSTEPS ] { - { &istepNoOp, NULL }, - { &istepNoOp, NULL }, + { &istepLoadBootLoader, NULL }, + { &istepWithCore, (sbeIstepHwp_t )&p9_sbe_instruct_start }, }; // Functions @@ -404,19 +411,6 @@ ReturnCode istepWithProc( sbeIstepHwp_t i_hwp) //---------------------------------------------------------------------------- -ReturnCode istepWithEx( sbeIstepHwp_t i_hwp) -{ - fapi2::Target<fapi2::TARGET_TYPE_EX > ex10_target((uint64_t)10); - SBE_DEBUG("istepWithEx"); - ReturnCode rc = FAPI2_RC_SUCCESS; - if( i_hwp ) - { - rc = i_hwp(ex10_target); - } - return rc; -} - -//---------------------------------------------------------------------------- ReturnCode istepWithEq( sbeIstepHwp_t i_hwp) { @@ -454,6 +448,17 @@ ReturnCode istepWithCore( sbeIstepHwp_t i_hwp) //---------------------------------------------------------------------------- +ReturnCode istepLoadBootLoader( sbeIstepHwp_t i_hwp) +{ + // TODO via RTC 135345 + // Send right Ex, address and size of HB loader + Target<TARGET_TYPE_PROC_CHIP > proc = plat_getChipTarget(); + fapi2::Target<fapi2::TARGET_TYPE_EX > exTgt((uint64_t)7); + ReturnCode rc = p9_sbe_load_bootloader( proc, exTgt, 0, NULL ); + return rc; +} + +//---------------------------------------------------------------------------- ReturnCode istepNoOp( sbeIstepHwp_t i_hwp) { SBE_DEBUG("istepNoOp"); diff --git a/sbe/test/test.xml b/sbe/test/test.xml index 1b23623a..505a875e 100755 --- a/sbe/test/test.xml +++ b/sbe/test/test.xml @@ -18,6 +18,11 @@ <simcmd>sim->frontend_current_processor = p9Proc0.sbe.ppe</simcmd> <exitonerror>yes</exitonerror> </testcase> + <!-- Workaround to set clock regs. Once simics have fix, we can remove it --> + <testcase> + <simcmd>p9Proc0.proc_chip.invoke parallel_store LOGIC 0xffc50000 \"00000000_00000001\" 64</simcmd> + </testcase> + <!-- Write value to a register and than read it back --> <!-- Register SBE tools --> <testcase> <simcmd>run-python-file targets/p9_nimbus/sbeTest/simics-debug-framework.py</simcmd> diff --git a/sbe/test/testScom.xml b/sbe/test/testScom.xml index 01228e2a..2e4bf051 100755 --- a/sbe/test/testScom.xml +++ b/sbe/test/testScom.xml @@ -1,10 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - <!-- Workaround to set clock regs. Once simics have fix, we can remove it --> - <testcase> - <simcmd>p9Proc0.proc_chip.invoke parallel_store LOGIC 0xffc50000 \"00000000_00000001\" 64</simcmd> - </testcase> - <!-- Write value to a register and than read it back --> <testcase> <simcmd>run-python-file targets/p9_nimbus/sbeTest/testPutGetScom.py</simcmd> <exitonerror>yes</exitonerror> |