diff options
author | spashabk-in <shakeebbk@in.ibm.com> | 2017-07-25 01:24:30 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-08-09 04:26:19 -0400 |
commit | 170cb42e9a065c8949b38e449457889bbf8bdc82 (patch) | |
tree | 9b5bdcffbc9e3bcdba7662016a128b21e522edf5 /src | |
parent | 86b661b17a9cf64251c21ffdc577bcaf1b59af23 (diff) | |
download | talos-sbe-170cb42e9a065c8949b38e449457889bbf8bdc82.tar.gz talos-sbe-170cb42e9a065c8949b38e449457889bbf8bdc82.zip |
Moving some sbefw functions to seeprom
Change-Id: Ifb4340e52be309897b1b5075b9d7af08ab2ae624
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43585
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')
-rw-r--r-- | src/build/Makefile | 12 | ||||
-rw-r--r-- | src/build/linkerscripts/linkseeprom.cmd | 2 | ||||
-rw-r--r-- | src/sbefw/MakefileSeeprom | 59 | ||||
-rw-r--r-- | src/sbefw/sbecmdgeneric.C | 4 | ||||
-rw-r--r-- | src/sbefw/sbefwseepromfiles.mk | 29 |
5 files changed, 102 insertions, 4 deletions
diff --git a/src/build/Makefile b/src/build/Makefile index b639f31b..f38f6ae3 100644 --- a/src/build/Makefile +++ b/src/build/Makefile @@ -43,6 +43,10 @@ LIB_DIRS += -L$(OBJDIR)/sbefw SBEFWLIB := $(OBJDIR)/sbefw/libsbefw.a LLIBS += -lsbefw +LIB_DIRS += -L$(OBJDIR)/sbefwseeprom +SBEFWLIB := $(OBJDIR)/sbefwseeprom/libsbefwseeprom.a +LLIBS += -lsbefwseeprom + # FAPI2 library SUBDIRS += $(PLAT_FAPI2_DIR) LIB_DIRS += -L$(OBJDIR)/fapi2 @@ -134,7 +138,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) $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM) +$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _sbefw_seeprom $(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 @@ -154,7 +158,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) $(LINK_OBJS) $(LINK_SCRIPT_SBE) +$(IMG_DIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) _sbefw_seeprom $(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 @@ -193,7 +197,7 @@ tar: @echo "Generated simics.tar in Sbe images Directory" .PHONY: all normalize compress defaultset appendloader add_LoaderAddr symbols report \ - appendoverrides xml tracehash topfixedheaders $(SUBDIRS) \ + appendoverrides xml tracehash topfixedheaders $(SUBDIRS) _sbefw_seeprom \ tar install buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin @@ -258,6 +262,8 @@ platattr: # Build the subdirectories $(SUBDIRS): $(MAKE) -I $(INCLUDES) -C $@ -f Makefile +_sbefw_seeprom: + $(MAKE) -I $(INCLUDES) -C ../sbefw -f MakefileSeeprom #Build the SBE XIP Tools diff --git a/src/build/linkerscripts/linkseeprom.cmd b/src/build/linkerscripts/linkseeprom.cmd index cabb2c1e..74a73c1d 100644 --- a/src/build/linkerscripts/linkseeprom.cmd +++ b/src/build/linkerscripts/linkseeprom.cmd @@ -98,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* ) } > seeprom + *\libistep2.a:(.text* ) *\libistep3.a:(.text* ) *\libistep4.a:(.text* ) *\libistepmpipl.a:(.text* ) *\libistep5.a:(.text* ) *\libsbefwseeprom.a:(.text* ) } > seeprom _text_size = . - _text_origin; //////////////////////////////// diff --git a/src/sbefw/MakefileSeeprom b/src/sbefw/MakefileSeeprom new file mode 100644 index 00000000..0a29f9f6 --- /dev/null +++ b/src/sbefw/MakefileSeeprom @@ -0,0 +1,59 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/sbefw/Makefile $ +# +# OpenPOWER sbe Project +# +# Contributors Listed Below - 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 +#export P2P_ENABLE = 1 + +export SUB_OBJDIR = /sbefwseeprom + +include img_defs.mk +include sbefwseepromfiles.mk + +GCC-CFLAGS += -mlongcall +GCC-DEFS += -D__SBEFW_SEEPROM__=1 +OBJS := $(addprefix $(OBJDIR)/, $(SBEFWSEEPROM_OBJECTS)) + +libsbefwseeprom.a: $(OBJS) + $(AR) crs $(OBJDIR)/libsbefwseeprom.a $(OBJDIR)/*.o + +.PHONY: clean sbefwseeprom +sbefwseeprom: $(OBJS) + +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) + +$(OBJDIR): + mkdir -p $(OBJDIR) + + +#clean the kernel directory first, then the application level clean +clean: + rm -fr $(OBJDIR) + +ifneq ($(MAKECMDGOALS),clean) +include $(OBJS:.o=.d) +endif + + + + + diff --git a/src/sbefw/sbecmdgeneric.C b/src/sbefw/sbecmdgeneric.C index 49b493c5..baaccbae 100644 --- a/src/sbefw/sbecmdgeneric.C +++ b/src/sbefw/sbecmdgeneric.C @@ -48,6 +48,7 @@ using namespace fapi2; +#ifdef __SBEFW_SEEPROM__ // Forward declaration sbeCapabilityRespMsg::sbeCapabilityRespMsg() { @@ -352,7 +353,9 @@ uint32_t sbePsuQuiesce( uint8_t *i_pArg ) return rc; #undef SBE_FUNC } +#endif //__SBEFW_SEEPROM__ +#ifndef __SBEFW_SEEPROM__ //---------------------------------------------------------------------------- uint32_t sbeSetSystemFabricMap( uint8_t *i_pArg ) { @@ -391,4 +394,5 @@ uint32_t sbeSetSystemFabricMap( uint8_t *i_pArg ) return l_rc; #undef SBE_FUNC } +#endif //not __SBEFW_SEEPROM__ diff --git a/src/sbefw/sbefwseepromfiles.mk b/src/sbefw/sbefwseepromfiles.mk new file mode 100644 index 00000000..116c7573 --- /dev/null +++ b/src/sbefw/sbefwseepromfiles.mk @@ -0,0 +1,29 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/sbefw/sbefwseepromfiles.mk $ +# +# OpenPOWER sbe Project +# +# Contributors Listed Below - COPYRIGHT 2015,2017 +# +# +# 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 +SBEFWSEEPROM-CPP-SOURCES = sbecmdgeneric.C + +SBEFWSEEPROM-C-SOURCES = +SBEFWSEEPROM-S-SOURCES = + +SBEFWSEEPROM_OBJECTS = $(SBEFWSEEPROM-C-SOURCES:.c=.o) $(SBEFWSEEPROM-CPP-SOURCES:.C=.o) $(SBEFWSEEPROM-S-SOURCES:.S=.o) |