diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2017-04-25 18:10:21 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 17:44:40 -0500 |
| commit | 619812e764473ffa1df44a4ae0a53dd57eeba2df (patch) | |
| tree | 2914a7c46094d165d41e0b9abef49c72cfb504c9 | |
| parent | 4f14a70178a030f1afd26873c0633fa4f80f757b (diff) | |
| download | talos-hcode-619812e764473ffa1df44a4ae0a53dd57eeba2df.tar.gz talos-hcode-619812e764473ffa1df44a4ae0a53dd57eeba2df.zip | |
Hcode: ekb build enhancements for CME, SGPE and PGPE Nimbus DD2 image creation
Change-Id: Icea65684bb06c5a3afb05a2f04fb71630f0226d2
RTC: 172517
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39764
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com>
Reviewed-by: YUE DU <daviddu@us.ibm.com>
Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
Reviewed-by: Juan R. Medina <jrmedina@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
21 files changed, 1160 insertions, 43 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/cme/cme_common.mk b/import/chips/p9/procedures/ppe_closed/cme/cme_common.mk new file mode 100644 index 00000000..f69c8fbe --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/cme/cme_common.mk @@ -0,0 +1,156 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/cme/cme_common.mk $ +# +# OpenPOWER HCODE Project +# +# COPYRIGHT 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 +ifdef IMAGE + +# common cme compile directives +IMAGE_EDITOR=cmeImgEdit.exe + +## Set _TARGET = PPC2PPE to use the 405 compiler with PPE backend or +# set _TARGET = PPE to use the new native compiler +$(IMAGE)_TARGET=PPE + +## PPE_TYPE can be std or gpe +_PPE_TYPE=std + +$(IMAGE)_LINK_SCRIPT=link.cmd + +$(IMAGE)_LDFLAGS=-e __system_reset -N -gc-sections -Bstatic + +include $(PK_SRCDIR)/trace/pktracefiles.mk +CME_OBJS := $(PKTRACE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/trace) +PKTRACE_OBJECTS:= + +include $(PK_SRCDIR)/kernel/pkkernelfiles.mk +CME_OBJS += $(PK_OBJECTS) +CME_OBJS += $(PK_TIMER_OBJECTS) +CME_OBJS += $(PK_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/kernel) + +include $(PK_SRCDIR)/ppe42/pkppe42files.mk +CME_OBJS += $(PPE42_OBJECTS) +CME_OBJS += $(PPE42_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/ppe42) + +include $(PK_SRCDIR)/$(_PPE_TYPE)/pk$(_PPE_TYPE)files.mk +CME_OBJS += $(STD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/$(_PPE_TYPE)) + +include $(PM_LIBDIR)/common/libcommonfiles.mk +CME_OBJS += $(LIBCOMMON_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PM_LIBDIR)/common) + +include $(HCODE_LIBDIR)/hcodelibfiles.mk +CME_OBJS += $(HCODE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(HCODE_LIBDIR)) + +include $(P2P_SRCDIR)/p2pfiles.mk +CME_OBJS += $(P2P_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(P2P_SRCDIR)) + +# It's important that the final included *.mk is in the $(CME_SCRDIR) +include $(CME_SRCDIR)/topfiles.mk +CME_OBJS+=$(TOP_OBJECTS) +CME_OBJS+=$(PSTATE_OBJECTS) +CME_OBJS+=$(UTILS_OBJECTS) +CME_OBJS+=$(STOP_OBJECTS) + +# add include paths +$(call ADD_PPEIMAGE_INCDIR,$(IMAGE),\ + $(CME_SRCDIR)/stop_cme \ + $(CME_SRCDIR)/pstate_cme \ + $(CME_SRCDIR)/utils \ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + + +$(IMAGE)_TRACE_HASH_PREFIX := $(shell echo $(IMAGE) | md5sum | cut -c1-4 \ + | xargs -i printf "%d" 0x{}) + +# Note: +# Don't build up COMMONFLAGS based on other local variables. +# The local variables won't be be available/assigned at the time +# they are resolved to build the COMMONFLAGS + +# Options for PK_TRACE +CME_COMMONFLAGS = -DPK_TRACE_LEVEL=0 +CME_COMMONFLAGS+= -DPK_TRACE_TIMER_OUTPUT=0 +CME_COMMONFLAGS+= -DDEV_DEBUG=0 + +# Options for Functions being skipped + +CME_COMMONFLAGS+= -DSPWU_AUTO=0 +CME_COMMONFLAGS+= -DSTOP_PRIME=0 + +CME_COMMONFLAGS+= -DSKIP_ABORT=0 +CME_COMMONFLAGS+= -DSKIP_L2_PURGE_ABORT=0 + +CME_COMMONFLAGS+= -DSKIP_ENTRY_CATCHUP=0 +CME_COMMONFLAGS+= -DSKIP_EXIT_CATCHUP=0 + +CME_COMMONFLAGS+= -DSKIP_ARRAYINIT=0 +CME_COMMONFLAGS+= -DSKIP_SCAN0=0 +CME_COMMONFLAGS+= -DSKIP_INITF=0 + +CME_COMMONFLAGS+= -DSKIP_SELF_RESTORE=0 +CME_COMMONFLAGS+= -DSKIP_RAM_HRMOR=0 + +CME_COMMONFLAGS+= -DSKIP_BCE_SCAN_RING=0 +CME_COMMONFLAGS+= -DSKIP_BCE_SCOM_RESTORE=0 + +# Options for Kernel configuration + +# Force CME tasks to use the unified interrupt handler +CME_COMMONFLAGS+= -DUNIFIED_IRQ_HANDLER_CME + +# This application will statically initialize +# it's external interrupt table using +# the table defined in p9_cme_main.c +CME_COMMONFLAGS+= -DSTATIC_IRQ_TABLE + +# This application will use the external timebase register +# (comment this line out to use the decrementer as timebase) +CME_COMMONFLAGS+= -DAPPCFG_USE_EXT_TIMEBASE + +CME_COMMONFLAGS+= -DPK_TIMER_SUPPORT=1 +CME_COMMONFLAGS+= -DPK_THREAD_SUPPORT=1 +CME_COMMONFLAGS+= -DPK_TRACE_SUPPORT=1 +CME_COMMONFLAGS+= -DUSE_PK_APP_CFG_H=1 +CME_COMMONFLAGS+= -D__PK__=1 +CME_COMMONFLAGS+= -D__PPE_PLAT +CME_COMMONFLAGS+= -D__PPE_CME + +## end ifdef IMAGE +endif diff --git a/import/chips/p9/procedures/ppe_closed/cme/cme_p9c10.mk b/import/chips/p9/procedures/ppe_closed/cme/cme_p9c10.mk new file mode 100644 index 00000000..167a169c --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/cme/cme_p9c10.mk @@ -0,0 +1,76 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/cme/cme_p9c10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 + +CME_TARGET := cme_p9c10 +IMAGE := $(CME_TARGET) + +# Options for Platforms specific +$(IMAGE)_COMMONFLAGS = -DNIMBUS_DD_LEVEL=0 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=1 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 + +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + +include $(CME_SRCDIR)/cme_common.mk +$(IMAGE)_COMMONFLAGS+=$(CME_COMMONFLAGS) +OBJS := $(CME_OBJS) + +$(call BUILD_PPEIMAGE) + + + +## ## Bin header + IMAGE=cpmr_header_p9c10 + IMAGE_EDITOR=cmeImgEdit.exe +## +## # Target tool chain + $(IMAGE)_TARGET=PPE +## +## #linkscript to use + $(IMAGE)_LINK_SCRIPT=linkcpmr.cmd +## + OBJS = stop_cme/p9_cme_cpmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(CME_SRCDIR)/stop_cme \ + $(CME_SRCDIR)/pstate_cme \ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + + $(call BUILD_BINHEADER,$(IMAGEPATH)/$(CME_TARGET)/$(CME_TARGET).bin,$(ROOTPATH)/chips/p9/procedures/utils/stopreg/selfRest.bin) diff --git a/import/chips/p9/procedures/ppe_closed/cme/cme_p9n10.mk b/import/chips/p9/procedures/ppe_closed/cme/cme_p9n10.mk new file mode 100644 index 00000000..5f32d2ba --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/cme/cme_p9n10.mk @@ -0,0 +1,75 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/cme/cme_p9n10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 + +CME_TARGET := cme_p9n10 +IMAGE:=$(CME_TARGET) + +# Options for Platforms specific DD lvl + +$(IMAGE)_COMMONFLAGS = -DNIMBUS_DD_LEVEL=1 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 + +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + +include $(CME_SRCDIR)/cme_common.mk +$(IMAGE)_COMMONFLAGS+=$(CME_COMMONFLAGS) +OBJS := $(CME_OBJS) + +$(call BUILD_PPEIMAGE) + +## ## Bin header + IMAGE=cpmr_header_p9n10 + IMAGE_EDITOR=cmeImgEdit.exe +## +## # Target tool chain + $(IMAGE)_TARGET=PPE +## +## #linkscript to use + $(IMAGE)_LINK_SCRIPT=linkcpmr.cmd +## + OBJS := stop_cme/p9_cme_cpmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(CME_SRCDIR)/stop_cme \ + $(CME_SRCDIR)/pstate_cme \ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + + $(call BUILD_BINHEADER,$(IMAGEPATH)/$(CME_TARGET)/$(CME_TARGET).bin,$(ROOTPATH)/chips/p9/procedures/utils/stopreg/selfRest.bin) diff --git a/import/chips/p9/procedures/ppe_closed/cme/cme_p9n20.mk b/import/chips/p9/procedures/ppe_closed/cme/cme_p9n20.mk new file mode 100644 index 00000000..aa709503 --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/cme/cme_p9n20.mk @@ -0,0 +1,75 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/cme/cme_p9n20.mk $ +# +# OpenPOWER HCODE Project +# +# 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 + +CME_IMAGE:=cme_p9n20 +IMAGE:=$(CME_IMAGE) +IMAGE_EDITOR:=cmeImgEdit.exe + +# Options for Platforms specific tuning + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=2 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + +include $(CME_SRCDIR)/cme_common.mk +$(IMAGE)_COMMONFLAGS+=$(CME_COMMONFLAGS) +OBJS := $(CME_OBJS) + +$(call BUILD_PPEIMAGE) + +## ## Bin header + IMAGE=cpmr_header_p9n20 + IMAGE_EDITOR=cmeImgEdit.exe +## +## # Target tool chain + $(IMAGE)_TARGET=PPE +## +## #linkscript to use + $(IMAGE)_LINK_SCRIPT=linkcpmr.cmd +## + OBJS = stop_cme/p9_cme_cpmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(CME_SRCDIR)/stop_cme \ + $(CME_SRCDIR)/pstate_cme \ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + + $(call BUILD_BINHEADER,$(IMAGEPATH)/$(CME_IMAGE)/$(CME_IMAGE).bin,$(ROOTPATH)/chips/p9/procedures/utils/stopreg/selfRest.bin) diff --git a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_edit.mk b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_edit.mk index 31b3040a..4b676117 100644 --- a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_edit.mk +++ b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_edit.mk @@ -37,19 +37,3 @@ $(call ADD_EXE_INCDIR, $(EXE), \ IMAGE_DEPS+=cmeImgEdit OBJS=p9_cme_img_edit.o $(call BUILD_EXE) - -EXE=cpmr_headerImgEdit - -$(EXE)_COMMONFLAGS+= -D__PPE_PLAT - -$(call ADD_EXE_INCDIR, $(EXE), \ - $(CME_SRCDIR) \ - $(PK_SRCDIR)/kernel \ - $(HCODE_COMMON_LIBDIR) \ - $(HCODE_LIBDIR) \ - ) - - -IMAGE_DEPS+=cpmr_headerImgEdit -OBJS=p9_cme_img_edit.o -$(call BUILD_EXE) diff --git a/import/chips/p9/procedures/ppe_closed/cme/topfiles.mk b/import/chips/p9/procedures/ppe_closed/cme/topfiles.mk index 54d8ec69..86ea038c 100644 --- a/import/chips/p9/procedures/ppe_closed/cme/topfiles.mk +++ b/import/chips/p9/procedures/ppe_closed/cme/topfiles.mk @@ -23,6 +23,7 @@ # # IBM_PROLOG_END_TAG +ifdef IMAGE TOP-C-SOURCES = p9_cme_main.c \ @@ -65,3 +66,5 @@ PSTATE_OBJECTS = $(PSTATE-C-SOURCES:.c=.o) STOP_OBJECTS = $(STOP-C-SOURCES:.c=.o) UTILS_OBJECTS = $(UTILS-C-SOURCES:.c=.o) IMG_OBJECTS = $(IMG-C-SOURCES:.c=.o) $(IMG-S-SOURCES:.S=.o) + +endif diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_edit.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_edit.mk index fd558fa8..edc9aaa3 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_edit.mk +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_edit.mk @@ -27,10 +27,3 @@ IMAGE_DEPS+=pstate_gpeImgEdit OBJS=p9_pgpe_img_edit.o $(call ADD_EXE_INCDIR,$(EXE),$(ROOTPATH)/chips/p9/procedures/hwp/lib) $(call BUILD_EXE) - - -EXE=ppmr_headerImgEdit -IMAGE_DEPS+=ppmr_headerImgEdit -OBJS=p9_pgpe_img_edit.o -$(call ADD_EXE_INCDIR,$(EXE),$(ROOTPATH)/chips/p9/procedures/hwp/lib) -$(call BUILD_EXE) diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_common.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_common.mk new file mode 100644 index 00000000..163b1f1a --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_common.mk @@ -0,0 +1,115 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_common.mk $ +# +# OpenPOWER HCODE Project +# +# COPYRIGHT 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 +ifdef IMAGE + +IMAGE_EDITOR=pstate_gpeImgEdit.exe + +## Set _TARGET = PPC2PPE to use the 405 compiler with PPE backend or +# set _TARGET = PPE to use the new native compiler +$(IMAGE)_TARGET=PPE + +## PPE_TYPE can be std or gpe +_PPE_TYPE=gpe + +$(IMAGE)_LINK_SCRIPT=link.cmd + +include $(PK_SRCDIR)/trace/pktracefiles.mk +PSTATE_OBJS := $(PKTRACE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/trace) + +include $(PK_SRCDIR)/kernel/pkkernelfiles.mk +PSTATE_OBJS += $(PK_OBJECTS) +PSTATE_OBJS += $(PK_TIMER_OBJECTS) +PSTATE_OBJS += $(PK_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/kernel) + +include $(PK_SRCDIR)/ppe42/pkppe42files.mk +PSTATE_OBJS += $(PPE42_OBJECTS) +PSTATE_OBJS += $(PPE42_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/ppe42) + +include $(PK_SRCDIR)/$(_PPE_TYPE)/pk$(_PPE_TYPE)files.mk +PSTATE_OBJS += $(GPE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/$(_PPE_TYPE)) + +include $(PM_LIBDIR)/common/libcommonfiles.mk +PSTATE_OBJS += $(LIBCOMMON_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PM_LIBDIR)/common) + +include $(PM_LIBDIR)/occlib/liboccfiles.mk +PSTATE_OBJS += $(LIBOCC_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PM_LIBDIR)/occlib) + +include $(HCODE_LIBDIR)/hcodelibfiles.mk +PSTATE_OBJS += $(HCODE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(HCODE_LIBDIR)) + +include $(P2P_SRCDIR)/p2pfiles.mk +PSTATE_OBJS += $(P2P_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(P2P_SRCDIR)) + +# It's important that the final included *.mk is in the $(CME_SCRDIR) +include $(PGPE_SRCDIR)/pstate_gpe/topfiles.mk +PSTATE_OBJS+=$(TOP_OBJECTS) + +$(IMAGE)_TRACE_HASH_PREFIX := $(shell echo $(IMAGE) | md5sum | cut -c1-4 \ + | xargs -i printf "%d" 0x{}) + + +# Options for PK_TRACE +PSTATE_COMMONFLAGS+= -DPK_TRACE_LEVEL=2 +PSTATE_COMMONFLAGS+= -DPK_TRACE_TIMER_OUTPUT=0 + + +#Note: Flags are resolved very late - so local variables can't be +# used to build them +PSTATE_COMMONFLAGS+= -DPK_TIMER_SUPPORT=1 +PSTATE_COMMONFLAGS+= -DPK_THREAD_SUPPORT=1 +PSTATE_COMMONFLAGS+= -DPK_TRACE_SUPPORT=1 +PSTATE_COMMONFLAGS+= -DUSE_PK_APP_CFG_H=1 +PSTATE_COMMONFLAGS+= -D__PPE_PLAT +PSTATE_COMMONFLAGS+= -D__PK__=1 +PSTATE_COMMONFLAGS+= -DPK_TRACE_SZ=1024 + + +# add include paths +$(call ADD_PPEIMAGE_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(PGPE_SRCDIR) \ + ) + +$(IMAGE)_LDFLAGS=-e __system_reset -N -gc-sections -Bstatic + + +endif diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe.mk index 3d28de77..ce2c30e8 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe.mk +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe.mk @@ -23,6 +23,7 @@ # # IBM_PROLOG_END_TAG IMAGE=pstate_gpe +IMAGE_EDITOR=pstate_gpeImgEdit.exe # Indicates we are doing an EKB build as opposed to a local build. # Allow control of which rules to consider. @@ -116,6 +117,7 @@ $(call BUILD_PPEIMAGE) # PPMR header edit: IMAGE=ppmr_header +IMAGE_EDITOR=pstate_gpeImgEdit.exe # Target tool chain $(IMAGE)_TARGET=PPE diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9c10.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9c10.mk new file mode 100644 index 00000000..d1bb64e6 --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9c10.mk @@ -0,0 +1,67 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9c10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +PSTATE_TARGET:=pstate_gpe_p9c10 +IMAGE:=$(PSTATE_TARGET) + +#Note: Flags are resolved later - so local variables can't be +# used to build them +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=0 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=1 +#$(IMAGE)_COMMONFLAGS+= -fstack-usage + +include $(PGPE_SRCDIR)/pstate_gpe/pstate_common.mk +$(IMAGE)_COMMONFLAGS += $(PSTATE_COMMONFLAGS) +OBJS := $(PSTATE_OBJS) + +$(call BUILD_PPEIMAGE) + +# PPMR header edit: +IMAGE=ppmr_header_p9c10 +IMAGE_EDITOR=pstate_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkppmr.cmd + +OBJS = p9_pgpe_ppmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(PSTATE_TARGET)/$(PSTATE_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n10.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n10.mk new file mode 100644 index 00000000..597bd5b5 --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n10.mk @@ -0,0 +1,64 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +PSTATE_TARGET := pstate_gpe_p9n10 +IMAGE := $(PSTATE_TARGET) + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=1 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +include $(PGPE_SRCDIR)/pstate_gpe/pstate_common.mk +$(IMAGE)_COMMONFLAGS += $(PSTATE_COMMONFLAGS) +OBJS := $(PSTATE_OBJS) + +$(call BUILD_PPEIMAGE) + +# PPMR header edit: +IMAGE=ppmr_header_p9n10 +IMAGE_EDITOR=pstate_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkppmr.cmd + +OBJS = p9_pgpe_ppmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(PSTATE_TARGET)/$(PSTATE_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n20.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n20.mk new file mode 100644 index 00000000..d1bc040a --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n20.mk @@ -0,0 +1,64 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/pstate_gpe_p9n20.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +PSTATE_TARGET:=pstate_gpe_p9n20 +IMAGE := $(PSTATE_TARGET) + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=2 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +include $(PGPE_SRCDIR)/pstate_gpe/pstate_common.mk +$(IMAGE)_COMMONFLAGS += $(PSTATE_COMMONFLAGS) +OBJS := $(PSTATE_OBJS) + +$(call BUILD_PPEIMAGE) + +# PPMR header edit: +IMAGE=ppmr_header_p9n20 +IMAGE_EDITOR=pstate_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkppmr.cmd + +OBJS = p9_pgpe_ppmr.o + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(PSTATE_TARGET)/$(PSTATE_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/topfiles.mk b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/topfiles.mk index 21a48576..44457780 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/topfiles.mk +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/topfiles.mk @@ -22,6 +22,7 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG +ifdef IMAGE TOP-C-SOURCES = p9_pgpe_pstate.c \ p9_pgpe_main.c \ p9_pgpe_irq.c \ @@ -41,3 +42,4 @@ TOP-S-SOURCES = p9_pgpe_image_header.S \ p9_pgpe_ppmr.S TOP_OBJECTS = $(TOP-C-SOURCES:.c=.o) $(TOP-S-SOURCES:.S=.o) +endif diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_edit.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_edit.mk index 8dd79344..d630f57d 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_edit.mk +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_edit.mk @@ -36,19 +36,3 @@ $(call ADD_EXE_INCDIR, $(EXE), \ IMAGE_DEPS+=stop_gpeImgEdit OBJS=p9_sgpe_img_edit.o $(call BUILD_EXE) - - -EXE=qpmr_headerImgEdit - -$(EXE)_COMMONFLAGS+= -D__PPE_PLAT - -$(call ADD_EXE_INCDIR, $(EXE), \ - $(CME_SRCDIR) \ - $(PK_SRCDIR)/kernel \ - $(HCODE_COMMON_LIBDIR) \ - $(HCODE_LIBDIR) \ - ) - -IMAGE_DEPS+=qpmr_headerImgEdit -OBJS=p9_sgpe_img_edit.o -$(call BUILD_EXE) diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_exit.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_exit.c index 735ca59a..a63ccca3 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_exit.c +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_exit.c @@ -635,9 +635,9 @@ p9_sgpe_stop_exit() #if NIMBUS_DD_LEVEL == 1 -// EPM only: -// EPM doesnt have real homer images and pba setup to access homer -// EPM needs to figure out a fused core mode hack to replace these + // EPM only: + // EPM doesnt have real homer images and pba setup to access homer + // EPM needs to figure out a fused core mode hack to replace these #if !SKIP_HOMER_ACCESS // Reading fused core mode flag in cpmr header diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_common.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_common.mk new file mode 100644 index 00000000..5a49586a --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_common.mk @@ -0,0 +1,178 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_common.mk $ +# +# OpenPOWER HCODE Project +# +# COPYRIGHT 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 +ifdef IMAGE + +IMAGE_EDITOR=stop_gpeImgEdit.exe + + +## Set _TARGET = PPC2PPE to use the 405 compiler with PPE backend or +# set _TARGET = PPE to use the new native compiler +$(IMAGE)_TARGET=PPE + +## PPE_TYPE can be std or gpe +_PPE_TYPE=gpe + +$(IMAGE)_LINK_SCRIPT=link.cmd + +include $(PK_SRCDIR)/trace/pktracefiles.mk +STOP_OBJS := $(PKTRACE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/trace) + +include $(PK_SRCDIR)/kernel/pkkernelfiles.mk +STOP_OBJS += $(PK_OBJECTS) +STOP_OBJS += $(PK_TIMER_OBJECTS) +STOP_OBJS += $(PK_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/kernel) + +include $(PK_SRCDIR)/ppe42/pkppe42files.mk +STOP_OBJS += $(PPE42_OBJECTS) +STOP_OBJS += $(PPE42_THREAD_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/ppe42) + +include $(PK_SRCDIR)/$(_PPE_TYPE)/pk$(_PPE_TYPE)files.mk +STOP_OBJS += $(GPE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PK_SRCDIR)/$(_PPE_TYPE)) + +include $(PM_LIBDIR)/common/libcommonfiles.mk +STOP_OBJS += $(LIBCOMMON_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PM_LIBDIR)/common) + +include $(PM_LIBDIR)/occlib/liboccfiles.mk +STOP_OBJS += $(LIBOCC_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(PM_LIBDIR)/occlib) + +include $(HCODE_LIBDIR)/hcodelibfiles.mk +STOP_OBJS += $(HCODE_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(HCODE_LIBDIR)) + +include $(P2P_SRCDIR)/p2pfiles.mk +STOP_OBJS += $(P2P_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(P2P_SRCDIR)) + + +#include $(FAPI2_SRCDIR)/fapi2ppefiles.mk +#STOP_OBJS += $(FAPI2LIB_OBJECTS) +#$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(FAPI2_SRCDIR)) + +include $(FAPI2_PLAT_SRCDIR)/fapi2ppeplatfiles.mk +STOP_OBJS += $(FAPI2PLATLIB_OBJECTS) +$(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(FAPI2_PLAT_SRCDIR)) +FAPI2PLATLIB_OBJECTS= +FAPI2PLAT-CPP-SOURCES= + +# It's important that the final included *.mk is in the $(CME_SCRDIR) +include $(SGPE_SRCDIR)/stop_gpe/topfiles.mk +STOP_OBJS+=$(TOP_OBJECTS) +STOP_OBJS+=$(UTILS_OBJECTS) + +$(IMAGE)_TRACE_HASH_PREFIX := $(shell echo $(IMAGE) | md5sum | cut -c1-4 \ + | xargs -i printf "%d" 0x{}) + + +# Options for PK_TRACE + +STOP_COMMONFLAGS+= -DPK_TRACE_LEVEL=1 +STOP_COMMONFLAGS+= -DPK_TRACE_TIMER_OUTPUT=0 +STOP_COMMONFLAGS+= -DDEV_DEBUG=0 + +# Options for Functions being skipped + +STOP_COMMONFLAGS+= -DSTOP_PRIME=0 +STOP_COMMONFLAGS+= -DSKIP_HOMER_ACCESS=0 +STOP_COMMONFLAGS+= -DSKIP_IPC=0 + +STOP_COMMONFLAGS+= -DSKIP_L3_PURGE=0 +STOP_COMMONFLAGS+= -DSKIP_L3_PURGE_ABORT=0 + +STOP_COMMONFLAGS+= -DSKIP_ARRAYINIT=0 +STOP_COMMONFLAGS+= -DSKIP_SCAN0=0 +STOP_COMMONFLAGS+= -DSKIP_INITF=0 + +STOP_COMMONFLAGS+= -DSKIP_CME_BOOT_STOP11=0 +STOP_COMMONFLAGS+= -DSKIP_CME_BOOT_IPL_HB=0 + +# Options for Kernel support + +# The Instance ID of the OCC processor +# that this application is intended to run on +# 0-3 -> GPE, 4 -> 405 +STOP_COMMONFLAGS+= -DAPPCFG_OCC_INSTANCE_ID=3 + +# GPE3 is the SGPE and is the route owner +STOP_COMMONFLAGS+= -DOCCHW_IRQ_ROUTE_OWNER=3 + +# Force SGPE tasks to use the unified interrupt handler. +STOP_COMMONFLAGS+= -DUNIFIED_IRQ_HANDLER_GPE + +# This application will statically initialize +# it's external interrupt table using +# the table defined in p9_sgpe_main.c +STOP_COMMONFLAGS+= -DSTATIC_IRQ_TABLE + +# This application will use the external timebase register +# (comment this line out to use the decrementer as timebase) +STOP_COMMONFLAGS+= -DAPPCFG_USE_EXT_TIMEBASE + +STOP_COMMONFLAGS+= -DPK_TIMER_SUPPORT=1 +STOP_COMMONFLAGS+= -DPK_THREAD_SUPPORT=1 +STOP_COMMONFLAGS+= -DPK_TRACE_SUPPORT=1 +STOP_COMMONFLAGS+= -DUSE_PK_APP_CFG_H=1 +STOP_COMMONFLAGS+= -D__PK__=1 +STOP_COMMONFLAGS+= -D__PPE_PLAT +STOP_COMMONFLAGS+= -D__PPE_SGPE +STOP_COMMONFLAGS+= -D__PPE__ + +# Options for FAPI2 +STOP_COMMONFLAGS+= -DFAPI2_NO_FFDC=1 +##STOP_COMMONFLAGS+= -DFAPI_TRACE_LEVEL_DEF=3 +$($(IMAGE)_TARGET)_CXXFLAGS += -Wno-unused-label + +# add include paths +$(call ADD_PPEIMAGE_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(FAPI2_SRCDIR) \ + $(FAPI2_PLAT_SRCDIR) \ + $(SGPE_FAPI2_INC) \ + $(FAPI2_INC) \ + $(STD_INC) \ + $(COMMON_INCDIR) \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + +$(IMAGE)_LDFLAGS=-e __system_reset -N -gc-sections -Bstatic +#$(IMAGE)_LDFLAGS=-e __system_reset -N -Bstatic + +endif diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe.mk index 2bdb1f64..30fdc996 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe.mk +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe.mk @@ -35,6 +35,7 @@ ## $(call BUILD_BINHEADER) IMAGE=stop_gpe +IMAGE_EDITOR=stop_gpeImgEdit.exe # Indicates we are doing an EKB build as opposed to a local build. # Allow control of which rules to consider. @@ -92,7 +93,8 @@ $(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(P2P_SRCDIR)) include $(FAPI2_PLAT_SRCDIR)/fapi2ppeplatfiles.mk OBJS += $(FAPI2PLATLIB_OBJECTS) $(call ADD_PPEIMAGE_SRCDIR,$(IMAGE),$(FAPI2_PLAT_SRCDIR)) - +FAPI2PLATLIB_OBJECTS= +FAPI2PLAT-CPP-SOURCES= # It's important that the final included *.mk is in the $(CME_SCRDIR) include $(SGPE_SRCDIR)/stop_gpe/topfiles.mk @@ -207,6 +209,7 @@ $(call BUILD_PPEIMAGE) # QPMR header edit: IMAGE=qpmr_header +IMAGE_EDITOR=stop_gpeImgEdit.exe # Target tool chain $(IMAGE)_TARGET=PPE diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9c10.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9c10.mk new file mode 100644 index 00000000..7766eb7d --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9c10.mk @@ -0,0 +1,93 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9c10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +# +## IMAGE=qpmr_header +## +## # Target tool chain +## $(IMAGE)_TARGET=PPE +## +## #linkscript to use +## $(IMAGE)_LINK_SCRIPT=linkqpmr.cmd +## +## OBJS = p9_sgpe_qpmr.o +## $(call BUILD_BINHEADER) + +STOP_TARGET := stop_gpe_p9c10 +IMAGE := $(STOP_TARGET) + + +# Note: Flags are resolved very late, +# so local variables can't be used to build them + +# Options for Platforms specific tuning + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=0 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=1 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 + +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 + +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + + +include $(SGPE_SRCDIR)/stop_gpe/stop_common.mk +$(IMAGE)_COMMONFLAGS += $(STOP_COMMONFLAGS) +OBJS := $(STOP_OBJS) + +$(call BUILD_PPEIMAGE) + +# QPMR header edit: +IMAGE=qpmr_header_p9c10 +IMAGE_EDITOR=stop_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkqpmr.cmd + +OBJS = p9_sgpe_qpmr.o + + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(STOP_TARGET)/$(STOP_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n10.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n10.mk new file mode 100644 index 00000000..29ea0fc8 --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n10.mk @@ -0,0 +1,88 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n10.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +# +## IMAGE=qpmr_header +## +## # Target tool chain +## $(IMAGE)_TARGET=PPE +## +## #linkscript to use +## $(IMAGE)_LINK_SCRIPT=linkqpmr.cmd +## +## OBJS = p9_sgpe_qpmr.o +## $(call BUILD_BINHEADER) + +STOP_TARGET := stop_gpe_p9n10 +IMAGE := $(STOP_TARGET) + +# Options for Platforms specific tuning + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=1 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 + +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 + +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + +include $(SGPE_SRCDIR)/stop_gpe/stop_common.mk +$(IMAGE)_COMMONFLAGS += $(STOP_COMMONFLAGS) +OBJS := $(STOP_OBJS) + +$(call BUILD_PPEIMAGE) + +# QPMR header edit: +IMAGE=qpmr_header_p9n10 +IMAGE_EDITOR=stop_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkqpmr.cmd + +OBJS = p9_sgpe_qpmr.o + + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(STOP_TARGET)/$(STOP_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n20.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n20.mk new file mode 100644 index 00000000..dd56ceec --- /dev/null +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n20.mk @@ -0,0 +1,92 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/stop_gpe_p9n20.mk $ +# +# OpenPOWER HCODE Project +# +# 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 +# +## IMAGE=qpmr_header +## +## # Target tool chain +## $(IMAGE)_TARGET=PPE +## +## #linkscript to use +## $(IMAGE)_LINK_SCRIPT=linkqpmr.cmd +## +## OBJS = p9_sgpe_qpmr.o +## $(call BUILD_BINHEADER) + + +STOP_TARGET := stop_gpe_p9n20 +IMAGE := $(STOP_TARGET) + +# Options for Platforms specific tuning + +$(IMAGE)_COMMONFLAGS+= -DNIMBUS_DD_LEVEL=2 +$(IMAGE)_COMMONFLAGS+= -DCUMULUS_DD_LEVEL=0 + +$(IMAGE)_COMMONFLAGS+= -DLAB_P9_TUNING=0 + +$(IMAGE)_COMMONFLAGS+= -DEPM_P9_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DEPM_BROADSIDE_SCAN0=0 + +$(IMAGE)_COMMONFLAGS+= -DSIMICS_TUNING=0 +$(IMAGE)_COMMONFLAGS+= -DUSE_SIMICS_IO=0 + + +include $(SGPE_SRCDIR)/stop_gpe/stop_common.mk +$(IMAGE)_COMMONFLAGS += $(STOP_COMMONFLAGS) +OBJS := $(STOP_OBJS) + +$(call BUILD_PPEIMAGE) + + + +# QPMR header edit: +IMAGE=qpmr_header_p9n20 +IMAGE_EDITOR=stop_gpeImgEdit.exe + +# Target tool chain +$(IMAGE)_TARGET=PPE + +#linkscript to use +$(IMAGE)_LINK_SCRIPT=linkqpmr.cmd + +OBJS = p9_sgpe_qpmr.o + + +$(call ADD_BINHEADER_INCDIR,$(IMAGE),\ + $(PK_SRCDIR)/kernel \ + $(PK_SRCDIR)/ppe42 \ + $(PK_SRCDIR)/trace \ + $(PK_SRCDIR)/$(_PPE_TYPE) \ + $(PM_LIBDIR)/include \ + $(PM_LIBDIR)/include/registers \ + $(PM_LIBDIR)/common \ + $(PM_LIBDIR)/occlib \ + $(HCODE_LIBDIR) \ + $(HCODE_COMMON_LIBDIR) \ + $(HCODE_UTILS_INCDIR) \ + $(ROOTPATH)/chips/p9/procedures/hwp/lib/ \ + $(ROOTPATH)/chips/p9/utils/imageProcs/ \ + ) + +$(call BUILD_BINHEADER,$(IMAGEPATH)/$(STOP_TARGET)/$(STOP_TARGET).bin) diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/topfiles.mk b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/topfiles.mk index b57a9bcc..909f6ae8 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/topfiles.mk +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/topfiles.mk @@ -22,6 +22,8 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG +ifdef IMAGE + TOP-C-SOURCES = p9_sgpe_stop_entry.c \ p9_sgpe_stop_exit.c \ p9_sgpe_stop_irq_handlers.c \ @@ -59,3 +61,4 @@ TOP-CPP-SOURCES += p9_hcd_cache_gptr_time_initf.C UTILS_OBJECTS = $(UTILS-SRC:.C=.o) TOP_OBJECTS = $(TOP-C-SOURCES:.c=.o) $(TOP-S-SOURCES:.S=.o) $(TOP-CPP-SOURCES:.C=.o) +endif |

