summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorspashabk-in <shakeebbk@in.ibm.com>2016-12-29 01:11:11 -0600
committerAMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>2017-02-03 05:09:45 -0500
commitc835670e2a0e0ba4061fb535a40c55f2532183f1 (patch)
tree64d41bd53c1503c0fda5eb7a9cb248450079c20e /src
parent86844d608200c72970e2fca8fe802892b67ebac9 (diff)
downloadtalos-sbe-c835670e2a0e0ba4061fb535a40c55f2532183f1.tar.gz
talos-sbe-c835670e2a0e0ba4061fb535a40c55f2532183f1.zip
DD2 image infrastructure
Change-Id: Iacd98b961f87b805fab788f004d87880c4f5f7e0 cmvc-req:1013262 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34241 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/boot/Makefile12
-rw-r--r--src/build/Makefile44
-rw-r--r--src/build/img_defs.mk29
-rw-r--r--src/build/import_hwp_mk/istep2/Makefile7
-rw-r--r--src/build/import_hwp_mk/istep3/Makefile6
-rw-r--r--src/build/import_hwp_mk/istep4/Makefile6
-rw-r--r--src/build/import_hwp_mk/istep5/Makefile4
-rw-r--r--src/build/import_hwp_mk/istepcommon/Makefile4
-rw-r--r--src/build/import_hwp_mk/istepmpipl/Makefile7
-rwxr-xr-xsrc/build/parsAndCutElf.py19
-rw-r--r--src/build/utils/base_ppe_header.S2
-rw-r--r--src/build/utils/sbe_link.H4
-rw-r--r--src/build/utils/utils.mk2
-rwxr-xr-xsrc/test/framework/build-script4
-rwxr-xr-xsrc/test/framework/create-sandbox2
-rwxr-xr-xsrc/tools/debug/sbe-debug.py30
-rwxr-xr-xsrc/tools/debug/simics-debug-framework.py9
-rwxr-xr-xsrc/tools/utils/sbePrime.py16
18 files changed, 128 insertions, 79 deletions
diff --git a/src/boot/Makefile b/src/boot/Makefile
index 1189108a..cc6666c9 100644
--- a/src/boot/Makefile
+++ b/src/boot/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -58,13 +58,13 @@ $(LINK_SCRIPT_OTPROM): $(LINKER_DIR)/linkotprom.cmd
$(CPP) -I$(INCLUDES) -E -x c++ -P $(DEFS) $(LINKER_DIR)/linkotprom.cmd -o $(LINK_SCRIPT_OTPROM)
# ---- Loader Image ------
-$(IMG_DIR)/$(IMAGE_LOADER_NAME).bin $(OBJDIR)/$(IMAGE_LOADER_NAME).dis: $(OBJDIR)/$(IMAGE_LOADER_NAME).out
- $(OBJCOPY) -O binary $< $(IMG_DIR)/$(IMAGE_LOADER_NAME).bin --pad-to 0x`/usr/bin/nm $(OBJDIR)/$(IMAGE_LOADER_NAME).out | grep "A _loader_end" | cut -d " " -f 1`
- $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_LOADER_NAME).dis
+$(IMG_DIR)/$(IMAGE_LOADER_NAME).bin $(IMG_DIR)/$(IMAGE_LOADER_NAME).dis: $(IMG_DIR)/$(IMAGE_LOADER_NAME).out
+ $(OBJCOPY) -O binary $< $(IMG_DIR)/$(IMAGE_LOADER_NAME).bin --pad-to 0x`/usr/bin/nm $(IMG_DIR)/$(IMAGE_LOADER_NAME).out | grep "A _loader_end" | cut -d " " -f 1`
+ $(OBJDUMP) -S $< > $(IMG_DIR)/$(IMAGE_LOADER_NAME).dis
#create a linked ELF executable
-$(OBJDIR)/$(IMAGE_LOADER_NAME).out: $(LOADER_OBJS) $(LINK_SCRIPT_LOADER)
- $(LD) -e l2_loader -T$(LINK_SCRIPT_LOADER) -Map $(OBJDIR)/$(IMAGE_LOADER_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_LOADER_NAME).out $(LOADER_OBJS)
+$(IMG_DIR)/$(IMAGE_LOADER_NAME).out: $(LOADER_OBJS) $(LINK_SCRIPT_LOADER)
+ $(LD) -e l2_loader -T$(LINK_SCRIPT_LOADER) -Map $(IMG_DIR)/$(IMAGE_LOADER_NAME).map -Bstatic -o $(IMG_DIR)/$(IMAGE_LOADER_NAME).out $(LOADER_OBJS)
# pass the link command file through the C preprocessor to evaluate macros
# and remove comments
diff --git a/src/build/Makefile b/src/build/Makefile
index d49d3572..3d03bb7c 100644
--- a/src/build/Makefile
+++ b/src/build/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
@@ -87,18 +87,18 @@ LIB_DIRS += -L$(OBJDIR-ISTEPCOMMON)
ISTEPCOMMON := $(OBJDIR-ISTEPCOMMON)/libistepcommon.a
LLIBS += -listepcommon
-SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out
-SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).map
-SIMICS_PPE_TAR_FILES += $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).dis
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_LOADER_NAME).out
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_LOADER_NAME).map
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_LOADER_NAME).dis
ifeq ($(img), seeprom)
-SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
-SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).map
-SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe_seeprom_*.out
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe_seeprom_*.map
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe_seeprom_*.dis
endif
-SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe.syms
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbe_*.syms
SIMICS_PPE_TAR_FILES += $(TEST_SRCDIR)/*.xml
SIMICS_PPE_TAR_FILES += $(TEST_SRCDIR)/*.py
-SIMICS_PPE_TAR_FILES += $(IMG_DIR)/sbeStringFile
+SIMICS_PPE_TAR_FILES += $(IMG_DIR)/$(SBE_STRINGFILE_NAME)
SIMICS_PPE_TAR_FILES += $(PPETRACEPP_BIN_DIR)/ppe2fsp
SIMICS_BB_TAR_FILES += $(SIMICSTOOLS_SRCDIR)/*
SIMICS_BB_TAR_FILES += $(DEBUGTOOLS_SRCDIR)/simics-debug-framework.py
@@ -123,19 +123,19 @@ LINK_OBJS = $(OBJS)
OBJS := $(addprefix $(OBJDIR)/, $(TOP_OBJECTS))
LINK_OBJS += $(OBJS) $(GCCLIBS)
-LINK_SCRIPT_SEEPROM = $(addprefix $(OBJDIR)/build/linkerscripts, linkscriptseeprom)
+LINK_SCRIPT_SEEPROM = $(addprefix $(OBJDIR)/build/linkerscripts, linkscriptseeprom_$(IMAGE_SUFFIX))
LINK_SCRIPT_SBE = $(addprefix $(OBJDIR)/build/linkerscripts, linkscriptsbe)
# ---- SEEPROM Image ------
# This removes all unecessary headers from the ELF executable
$(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
- ./parsAndCutElf.py
+ ./parsAndCutElf.py $(IMAGE_SUFFIX)
$(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)
$(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)/base_ppe_header.o $(OBJS) $(LIB_DIRS) \
+ -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
# pass the link command file through the C preprocessor to evaluate macros
@@ -173,7 +173,11 @@ all: $(OBJDIR) xml $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin \
report
endif
-install: all
+install: all tar
+
+tar:
+# TODO:Remove this line once Simics supports DD specific files
+ @cp $(IMG_DIR)/sbe_seeprom_DD1.bin $(IMG_DIR)/sbe_seeprom.bin | true
@echo "Installing simics.tar"
@rm -rf $(OBJDIR)/simics-tar-dir
@mkdir $(OBJDIR)/simics-tar-dir
@@ -188,7 +192,8 @@ install: all
@echo "Generated simics.tar in Sbe images Directory"
.PHONY: all normalize defaultset appendloader add_LoaderAddr symbols report \
- appendoverrides xml tracehash topfixedheaders $(SUBDIRS)
+ appendoverrides xml tracehash topfixedheaders $(SUBDIRS) \
+ tar install
buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set build_date `date +%Y%m%d`
@@ -198,13 +203,13 @@ buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin
add_LoaderAddr: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L1_LoaderAddr 0x`nm $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out | grep __l1Loader | cut -f 1 -d " "`
- $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L2_LoaderAddr 0x`nm $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out | grep __l2_loader_setup | cut -f 1 -d " "`
+ $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set L2_LoaderAddr 0x`nm $(IMG_DIR)/$(IMAGE_LOADER_NAME).out | grep __l2_loader_setup | cut -f 1 -d " "`
$(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin set kernelAddr 0x`nm $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out | grep __pk_boot | cut -f 1 -d " "`
ifeq ($(img), seeprom)
-symbols: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out
+symbols: $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(IMG_DIR)/$(IMAGE_LOADER_NAME).out
$(NM) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out > $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
- $(NM) $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out >> $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
+ $(NM) $(IMG_DIR)/$(IMAGE_LOADER_NAME).out >> $(IMG_DIR)/$(SBE_SYMBOLS_NAME)
endif
ifeq ($(img), pibmem)
symbols: $(IMG_DIR)/$(IMAGE_SBE_NAME).out
@@ -238,7 +243,8 @@ ATTRFILES += $(IMPORT_XML_DIR)/attribute_info/chip_ec_attributes.xml
$(OBJDIR):
mkdir -p $(OBJDIR)
mkdir -p $(IMG_DIR)
- mkdir -p $(OBJDIR)/genfiles
+ mkdir -p $(GENFILES_DIR)
+ mkdir -p $(IMPORT_OBJDIR)
$(TOOLS_ATTR_DIR)/ppeParseProcSbeFixed.pl $(GENFILES_DIR) $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
$(TOOLS_ATTR_DIR)/ppeParseAttributeInfo.pl $(GENFILES_DIR) $(IMPORT_XML_DIR)/attribute_info/p9_sbe_attributes.xml $(ATTRFILES)
$(TOOLS_ATTR_DIR)/ppeCreateAttrGetSetMacros.pl --path $(PLAT_FAPI2_DIR)/src/plat --inc $(GENFILES_DIR) --src $(GENFILES_DIR)
@@ -301,7 +307,7 @@ appendloader: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(I
# collect all of the trace hash files for this image into a single sbeStringFile
tracehash:
mkdir -p $(OBJDIR)
- $(THASH) -c -d $(OBJDIR) -s $(IMG_DIR)/sbeStringFile
+ $(THASH) -c -d $(OBJDIR) -s $(IMG_DIR)/$(SBE_STRINGFILE_NAME)
#clean the kernel directory first, then the application level clean
clean:
diff --git a/src/build/img_defs.mk b/src/build/img_defs.mk
index 138fe31e..7fc0707e 100644
--- a/src/build/img_defs.mk
+++ b/src/build/img_defs.mk
@@ -56,12 +56,19 @@
#
# OBJDIR : target directory for all generated files
-IMAGE_SEEPROM_NAME := sbe_seeprom
-IMAGE_SBE_NAME := sbe_pibmem
+IMAGE_SUFFIX := DD1
+ifeq ($(ddlevel), DD2)
+IMAGE_SUFFIX := DD2
+GCC-DEFS += -DDD2
+endif
+IMAGE_SEEPROM_NAME := sbe_seeprom_$(IMAGE_SUFFIX)
+IMAGE_SBE_NAME := sbe_pibmem_$(IMAGE_SUFFIX)
IMAGE_LOADER_NAME := sbe_loader
IMAGE_OTPROM_NAME := sbe_otprom
+IMAGE_BASE_PPE_HEADER := base_ppe_header
-SBE_SYMBOLS_NAME := sbe.syms
+SBE_SYMBOLS_NAME := sbe_$(IMAGE_SUFFIX).syms
+SBE_STRINGFILE_NAME := sbeStringFile_$(IMAGE_SUFFIX)
ifndef PPE_TYPE
PPE_TYPE := std
@@ -268,28 +275,32 @@ ifndef FAPI2_TOOLS_DIR
export FAPI2_TOOLS_DIR = $(IMPORT_SRCDIR)/hwpf/fapi2/tools/
endif
+ifndef IMPORT_OBJDIR
+export IMPORT_OBJDIR= import_hwp_mk
+endif
+
ifndef OBJDIR-ISTEP2
-export OBJDIR-ISTEP2 = $(BASE_OBJDIR)/istep2
+export OBJDIR-ISTEP2 = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istep2
endif
ifndef OBJDIR-ISTEP3
-export OBJDIR-ISTEP3 = $(BASE_OBJDIR)/istep3
+export OBJDIR-ISTEP3 = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istep3
endif
ifndef OBJDIR-ISTEP4
-export OBJDIR-ISTEP4 = $(BASE_OBJDIR)/istep4
+export OBJDIR-ISTEP4 = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istep4
endif
ifndef OBJDIR-ISTEP5
-export OBJDIR-ISTEP5 = $(BASE_OBJDIR)/istep5
+export OBJDIR-ISTEP5 = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istep5
endif
ifndef OBJDIR-ISTEPMPIPL
-export OBJDIR-ISTEPMPIPL = $(BASE_OBJDIR)/istepmpipl
+export OBJDIR-ISTEPMPIPL = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istepmpipl
endif
ifndef OBJDIR-ISTEPCOMMON
-export OBJDIR-ISTEPCOMMON = $(BASE_OBJDIR)/istepcommon
+export OBJDIR-ISTEPCOMMON = $(BASE_OBJDIR)/$(IMPORT_OBJDIR)/istepcommon
endif
GCC-TOOL-PATH = $(CTEPATH)/tools/ppetools/prod
diff --git a/src/build/import_hwp_mk/istep2/Makefile b/src/build/import_hwp_mk/istep2/Makefile
index 06c3ab0a..8bfa2196 100644
--- a/src/build/import_hwp_mk/istep2/Makefile
+++ b/src/build/import_hwp_mk/istep2/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -26,14 +26,16 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istep2
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istep2
include img_defs.mk
include istep2files.mk
export VPATH = $(PERV_SRCDIR):$(NEST_SRCDIR):$(CACHE_SRCDIR):$(CORE_SRCDIR):$(PM_SRCDIR):$(INITFILES_SRCDIR):$(LIB_SRCDIR)
+ifneq ($(ddlevel), DD2)
GCC-CFLAGS += -mlongcall
+endif
OBJSISTEP2 := $(addprefix $(OBJDIR-ISTEP2)/, $(ISTEP2_OBJECTS))
@@ -43,7 +45,6 @@ libistep2.a: istep2
$(AR) crs $(OBJDIR-ISTEP2)/libistep2.a $(OBJDIR-ISTEP2)/*.o
istep2: $(OBJSISTEP2)
-
$(OBJSISTEP2) $(OBJSISTEP2:.o=.d): | $(OBJDIR-ISTEP2)
$(OBJDIR-ISTEP2):
diff --git a/src/build/import_hwp_mk/istep3/Makefile b/src/build/import_hwp_mk/istep3/Makefile
index f692cf8c..ef27452f 100644
--- a/src/build/import_hwp_mk/istep3/Makefile
+++ b/src/build/import_hwp_mk/istep3/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -26,14 +26,16 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istep3
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istep3
include img_defs.mk
include istep3files.mk
export VPATH = $(PERV_SRCDIR):$(NEST_SRCDIR):$(CACHE_SRCDIR):$(CORE_SRCDIR):$(PM_SRCDIR):$(INITFILES_SRCDIR):$(LIB_SRCDIR)
+ifneq ($(ddlevel), DD2)
GCC-CFLAGS += -mlongcall
+endif
OBJSISTEP3 := $(addprefix $(OBJDIR-ISTEP3)/, $(ISTEP3_OBJECTS))
diff --git a/src/build/import_hwp_mk/istep4/Makefile b/src/build/import_hwp_mk/istep4/Makefile
index 882d47f6..116b783d 100644
--- a/src/build/import_hwp_mk/istep4/Makefile
+++ b/src/build/import_hwp_mk/istep4/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -26,14 +26,16 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istep4
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istep4
include img_defs.mk
include istep4files.mk
export VPATH = $(PERV_SRCDIR):$(NEST_SRCDIR):$(CACHE_SRCDIR):$(CORE_SRCDIR):$(PM_SRCDIR):$(INITFILES_SRCDIR):$(LIB_SRCDIR)
+ifneq ($(ddlevel), DD2)
GCC-CFLAGS += -mlongcall
+endif
OBJSISTEP4 := $(addprefix $(OBJDIR-ISTEP4)/, $(ISTEP4_OBJECTS))
diff --git a/src/build/import_hwp_mk/istep5/Makefile b/src/build/import_hwp_mk/istep5/Makefile
index ee1f2b51..5af46dd0 100644
--- a/src/build/import_hwp_mk/istep5/Makefile
+++ b/src/build/import_hwp_mk/istep5/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -26,7 +26,7 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istep5
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istep5
include img_defs.mk
include istep5files.mk
diff --git a/src/build/import_hwp_mk/istepcommon/Makefile b/src/build/import_hwp_mk/istepcommon/Makefile
index c4386526..046c88a8 100644
--- a/src/build/import_hwp_mk/istepcommon/Makefile
+++ b/src/build/import_hwp_mk/istepcommon/Makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -26,7 +26,7 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istepcommon
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istepcommon
include img_defs.mk
include istepcommonfiles.mk
diff --git a/src/build/import_hwp_mk/istepmpipl/Makefile b/src/build/import_hwp_mk/istepmpipl/Makefile
index d9822f90..6742a13e 100644
--- a/src/build/import_hwp_mk/istepmpipl/Makefile
+++ b/src/build/import_hwp_mk/istepmpipl/Makefile
@@ -5,7 +5,8 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
+# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,14 +26,16 @@
# "*.mk" file in this directory.
#all generated files from this makefile will end up in obj/*
-export SUB_OBJDIR = /istepmpipl
+export SUB_OBJDIR = /$(IMPORT_OBJDIR)/istepmpipl
include img_defs.mk
include istepmpiplfiles.mk
export VPATH = $(PERV_SRCDIR):$(NEST_SRCDIR):$(CACHE_SRCDIR):$(CORE_SRCDIR):$(PM_SRCDIR):$(INITFILES_SRCDIR):$(LIB_SRCDIR)
+ifneq ($(ddlevel), DD2)
GCC-CFLAGS += -mlongcall
+endif
OBJSISTEPMPIPL := $(addprefix $(OBJDIR-ISTEPMPIPL)/, $(ISTEPMPIPL_OBJECTS))
diff --git a/src/build/parsAndCutElf.py b/src/build/parsAndCutElf.py
index acfe64a5..43201cb2 100755
--- a/src/build/parsAndCutElf.py
+++ b/src/build/parsAndCutElf.py
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -30,10 +30,17 @@ import random
import sys
# Workaround to cut SBE image from elf image.
-def parserElf():
- cmd = "readelf -S ../../images/sbe_seeprom.out"
+def parserElf(argv):
+ try:
+ ddlevel = argv[1]
+ except:
+ print "Missing DD level name"
+ exit(-1)
+ SBE_SEEPROM_OUT = "../../images/sbe_seeprom_"+ddlevel+".out"
+ SBE_SEEPROM_BIN = "../../images/sbe_seeprom_"+ddlevel+".bin"
+ cmd = "readelf -S "+SBE_SEEPROM_OUT
firstSection = ".header"
- cmd1 = "nm ../../images/sbe_seeprom.out | grep _sbe_image_size"
+ cmd1 = "nm "+SBE_SEEPROM_OUT+" | grep _sbe_image_size"
output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
i = 0;
for line in output.stdout:
@@ -60,11 +67,11 @@ def parserElf():
exit(-1)
# cut the image
- cmd1 = "dd skip=" + str(startSize) + " count=" + str(endSize) + " if=../../images/sbe_seeprom.out of=../../images/sbe_seeprom.bin bs=1"
+ cmd1 = "dd skip=" + str(startSize) + " count=" + str(endSize) + " if="+SBE_SEEPROM_OUT+" of="+SBE_SEEPROM_BIN+" bs=1"
rc = os.system(cmd1)
if ( rc ):
print "ERROR running %s: %d "%( cmd1, rc )
exit(-1)
-parserElf()
+parserElf(sys.argv)
diff --git a/src/build/utils/base_ppe_header.S b/src/build/utils/base_ppe_header.S
index 8242f415..da9245ff 100644
--- a/src/build/utils/base_ppe_header.S
+++ b/src/build/utils/base_ppe_header.S
@@ -139,7 +139,7 @@ __header_string_reserved:
.section .strings, "aS", @progbits
.section .base, "a", @progbits
- P9XipHeader P9_XIP_MAGIC_SEEPROM, 0x80000000, _sbe_image_size
+ P9XipHeader P9_XIP_MAGIC_SEEPROM, SBE_SEEPROM_BASE_ORIGIN, _sbe_image_size
// Create the .fixed section
.proc_sbe_fixed_system
diff --git a/src/build/utils/sbe_link.H b/src/build/utils/sbe_link.H
index 6c8c95ff..a4394aa6 100644
--- a/src/build/utils/sbe_link.H
+++ b/src/build/utils/sbe_link.H
@@ -65,6 +65,10 @@
/// The link address of the P9 SBE Base image
#define SBE_SEEPROM_BASE_ORIGIN 0x80000000
+#ifdef DD2
+#undef SBE_SEEPROM_BASE_ORIGIN
+#define SBE_SEEPROM_BASE_ORIGIN 0xFF800000
+#endif
/// This Index depends upon XIP HEADER File
/// Each section table entry is 12 bytes(SIZE_OF_SBE_XIP_SECTION) size,
diff --git a/src/build/utils/utils.mk b/src/build/utils/utils.mk
index 25c1f1d2..6614cd79 100644
--- a/src/build/utils/utils.mk
+++ b/src/build/utils/utils.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
diff --git a/src/test/framework/build-script b/src/test/framework/build-script
index 49eb170c..5fda45aa 100755
--- a/src/test/framework/build-script
+++ b/src/test/framework/build-script
@@ -38,10 +38,6 @@ source "$SBEROOT/src/test/framework/setup-env"
#check-copyright > copyright.log 2>&1 &
#COPYRIGHT_PID=$!
-
-# Build PIBMEM Image
-bash -c "make install img=pibmem" || exit -1
-bash -c "rm -rf $SBEROOT/obj/sbefw" || exit -1
# Build SEEPROM Image
bash -c "make install" || exit -1
diff --git a/src/test/framework/create-sandbox b/src/test/framework/create-sandbox
index c0505344..0ddf74a5 100755
--- a/src/test/framework/create-sandbox
+++ b/src/test/framework/create-sandbox
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
diff --git a/src/tools/debug/sbe-debug.py b/src/tools/debug/sbe-debug.py
index c944548d..aab8d645 100755
--- a/src/tools/debug/sbe-debug.py
+++ b/src/tools/debug/sbe-debug.py
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -41,11 +41,11 @@ else:
baseAddr = 0xfffe8000
-def fillSymTable(sbeObjDir, target ):
+def fillSymTable(sbeObjDir, target, ddsuffix ):
if (target == 'AWAN'):
symFile = sbeObjDir + "/sim.sbe.syms"
else:
- symFile = sbeObjDir + "/sbe.syms"
+ symFile = sbeObjDir + "/sbe"+ddsuffix+".syms"
f = open( symFile, 'r' )
for line in f:
words = line.split()
@@ -58,7 +58,7 @@ def getOffset( symbol ):
offset = int(symAddr, base = 16) - baseAddr;
return hex(offset)
-def collectTrace( sbeObjDir, target, node, proc ):
+def collectTrace( sbeObjDir, target, node, proc, ddsuffix ):
offset = getOffset( 'g_pk_trace_buf' );
len = "0x" + syms['g_pk_trace_buf'][1];
cmd1 = ("p9_pibmem_dump_wrap.exe -quiet -start_byte " + \
@@ -67,7 +67,7 @@ def collectTrace( sbeObjDir, target, node, proc ):
" -n" + str(node) + " -p" + str(proc))
cmd2 = sbeObjDir + "/ppe2fsp DumpPIBMEM sbetrace.bin "
cmd3 = (sbeObjDir + "/fsp-trace -s " + sbeObjDir +\
- "/sbeStringFile sbetrace.bin > "+\
+ "/sbeStringFile"+ddsuffix+" sbetrace.bin > "+\
"sbe_"+str(proc)+"_tracMERG")
cmd4 = "mv DumpPIBMEM dumpPibMem_trace"
print "\ncollecting trace with commands -\n"
@@ -95,11 +95,11 @@ def collectTrace( sbeObjDir, target, node, proc ):
print "ERROR running %s: %d " % ( cmd4, rc )
return 1
-def collectAttr( sbeObjDir, target, node, proc ):
+def collectAttr( sbeObjDir, target, node, proc, ddsuffix ):
if (target == 'AWAN'):
sbeImgFile = "p9n_10.sim.sbe_seeprom.bin"
else:
- sbeImgFile = "sbe_seeprom.bin"
+ sbeImgFile = "sbe_seeprom"+ddsuffix+".bin"
offset = getOffset( 'G_sbe_attrs' );
len = "0x" + syms['G_sbe_attrs'][1];
cmd1 = ("p9_pibmem_dump_wrap.exe -quiet -start_byte " + \
@@ -210,7 +210,8 @@ optional arguments:\n\
-t {AWAN,HW,FILE}, --target {AWAN,HW,FILE}\n\
Target type\n\
-n NODE, --node NODE Node Number\n\
- -p PROC, --proc PROC Proc Number"
+ -p PROC, --proc PROC Proc Number\n\
+ -d DDLEVEL, --ddlevel DD Specific image identifier"
def main( argv ):
try:
@@ -225,6 +226,7 @@ def main( argv ):
target = 'HW'
node = 0
proc = 0
+ ddsuffix = 'DD1'
# Parse the command line arguments
for opt, arg in opts:
@@ -255,6 +257,12 @@ def main( argv ):
except:
print "proc should be an integer number"
exit(1)
+ elif opt in ('-d', '--ddlevel'):
+ if arg in ('DD1', 'DD2'):
+ ddsuffix = arg
+ else:
+ print "target should be one of {DD1, DD2}"
+ exit(1)
# On cronus, save the existing FIFO mode
cmdFifoLastState = subprocess.Popen(['getconfig','USE_SBE_FIFO'], stdout=subprocess.PIPE).communicate()[0]
@@ -273,11 +281,11 @@ def main( argv ):
sbeObjDir = SBE_TOOLS_PATH;
print "sbeObjDir", sbeObjDir
- fillSymTable(sbeObjDir, target)
+ fillSymTable(sbeObjDir, target, ddsuffix)
if ( level == 'all' ):
print "Parsing everything"
- collectTrace( sbeObjDir, target, node, proc )
- collectAttr( sbeObjDir, target, node, proc )
+ collectTrace( sbeObjDir, target, node, proc, ddsuffix )
+ collectAttr( sbeObjDir, target, node, proc, ddsuffix )
sbeStatus( node, proc )
elif ( level == 'trace' ):
collectTrace( sbeObjDir, target, node, proc )
diff --git a/src/tools/debug/simics-debug-framework.py b/src/tools/debug/simics-debug-framework.py
index c5966fa1..186f41d3 100755
--- a/src/tools/debug/simics-debug-framework.py
+++ b/src/tools/debug/simics-debug-framework.py
@@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -68,7 +68,9 @@ def register_sbe_debug_framework_tools():
def fillSymTable():
# symFile = os.environ['SBE_IMG_OUT_LOC'] + "/sbe.syms"
- symFile = SBE_TOOLS_PATH + "/sbe.syms"
+# TODO via RTC:168436 - figure out the DD level from simics flag,
+# as of now defaulting to DD1
+ symFile = SBE_TOOLS_PATH + "/sbe_DD1.syms"
# symFile = os.environ['sb'] + "/../obj/ppc/sbei/sbfw/simics/sbe.syms"
f = open( symFile, 'r')
for line in f:
@@ -112,7 +114,8 @@ def collectTrace ( procNr ):
fileName = "sbe_" + `procNr` + "_tracMERG"
cmd1 = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\""
cmd2 = "shell \"" + SBE_TOOLS_PATH + "/ppe2fsp ppetrace.bin sbetrace.bin \""
- cmd3 = "shell \"" + "fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile sbetrace.bin >" + fileName + "\""
+# TODO via RTC:168436 - figure out the DD level from simics flag, as of now defaulting to DD1
+ cmd3 = "shell \"" + "fsp-trace -s " + SBE_TOOLS_PATH + "/sbeStringFile_DD1 sbetrace.bin >" + fileName + "\""
cmd4 = "shell \"" + "cat " + fileName + "\""
( rc, out ) = quiet_run_command( cmd1, output_modes.regular )
diff --git a/src/tools/utils/sbePrime.py b/src/tools/utils/sbePrime.py
index 9afec66c..4499873a 100755
--- a/src/tools/utils/sbePrime.py
+++ b/src/tools/utils/sbePrime.py
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -51,9 +51,6 @@ import sbeCmvcConstants as errorcode
import sbeCmvcUtility as utilcode
import sbePatchUtility as utilpatch
-# Files to copy for sbe prime
-PRIME_FILE_LIST ="sbe_sp_intf.H,simics.tar,sbe_seeprom.bin"
-
#-------------------------
# Main Function
#-------------------------
@@ -82,6 +79,8 @@ def main():
print " \t sbe_sp_intf.H,simics.tar,sbe_seeprom.bin"
print " \t -r,--rc_file = [ Optional ] The RC file for the sandbox (with absolute path)"
print " \t -n,--no_build = [ Optional ] Flag to determine if sbei component should be compiled"
+ print " \t -l,--level = [ Optional ] Flag to determine ddlevel of the image, by default"
+ print " \t DD1 image is compiled"
print " \t -h,--help = Help"
print " ------------------------------------------------------------------------------------"
@@ -116,11 +115,12 @@ def main():
file_name = "None"
rc_file = "None"
build = "1"
+ ddlevel = "DD1"
#----------------------------
# Read command line args
#----------------------------
- opts, args = getopt.getopt(sys.argv[1:],"p:s:i:h:r:n",['patch=', 'sb=', 'files=', 'help', 'rc_file=', 'no_build'])
+ opts, args = getopt.getopt(sys.argv[1:],"p:s:i:hr:nl:",['patch=', 'sb=', 'files=', 'help', 'rc_file=', 'no_build', 'level='])
for opt, arg in opts:
if opt in ('-h', '--help'):
usage()
@@ -135,6 +135,8 @@ def main():
rc_file = arg
elif opt in ('--no_build'):
build = "0"
+ elif opt in ('-l', '--level'):
+ ddlevel = arg
else:
usage()
exit_main(errorcode.ERROR_EXIT)
@@ -238,6 +240,10 @@ def main():
print " postsimsetup [ ERROR ] : ",rc_shell
exit_main(rc_shell)
+ # Files to copy for sbe prime
+ # TODO via RTC:168436 - DD specific images to be updated in CMVC makefiles
+ # PRIME_FILE_LIST ="sbe_sp_intf.H,simics.tar,sbe_seeprom_"+ddlevel+".bin"
+ PRIME_FILE_LIST ="sbe_sp_intf.H,simics.tar,sbe_seeprom.bin"
#----------------------------------------
# 4) Copy the files from repo to sandbox
OpenPOWER on IntegriCloud