summaryrefslogtreecommitdiffstats
path: root/sbe
diff options
context:
space:
mode:
authorShakeeb <shakeebbk@in.ibm.com>2016-08-26 00:28:41 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-08-26 12:03:22 -0400
commit64e062776e5df2fecfae5516fc699485679f349b (patch)
treec665322b2cb08e102c001ba43b7229af50dac97b /sbe
parent301e127c5c436dbdd1fc405d5f97ede495c2bf07 (diff)
downloadtalos-sbe-64e062776e5df2fecfae5516fc699485679f349b.tar.gz
talos-sbe-64e062776e5df2fecfae5516fc699485679f349b.zip
Introducing boot folder in SBE repo
Change-Id: I94cc46c5deccf9376d7919e589d1334e1f0cce22 RTC:159709 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28826 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 'sbe')
-rw-r--r--sbe/boot/Makefile86
-rw-r--r--sbe/boot/bootfiles.mk34
-rw-r--r--sbe/boot/loader_l1.S (renamed from sbe/image/pm_loader.S)25
-rw-r--r--sbe/boot/loader_l2.c (renamed from sbe/image/base_loader.c)3
-rw-r--r--sbe/boot/loader_l2_setup.S57
-rw-r--r--sbe/boot/otprom_init.S (renamed from sbe/image/pm_otprom_loader.S)23
-rw-r--r--sbe/boot/pibmem_repair.S (renamed from sbe/image/pm_pibmem_repair.S)23
-rw-r--r--sbe/image/Makefile60
-rw-r--r--sbe/image/base_loader_setup.S34
-rw-r--r--sbe/image/base_main.C66
-rw-r--r--sbe/image/base_ppe_main.c15
-rw-r--r--sbe/image/base_ppe_main.h15
-rw-r--r--sbe/image/img_defs.mk13
-rwxr-xr-x[-rw-r--r--]sbe/image/linkloader.cmd26
-rw-r--r--sbe/image/linkotprom.cmd26
-rw-r--r--sbe/image/sbe_main.C418
-rw-r--r--sbe/image/topfiles.mk11
17 files changed, 325 insertions, 610 deletions
diff --git a/sbe/boot/Makefile b/sbe/boot/Makefile
new file mode 100644
index 00000000..c4753aa7
--- /dev/null
+++ b/sbe/boot/Makefile
@@ -0,0 +1,86 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: sbe/boot/Makefile $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+#
+#
+# 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 SUB_OBJDIR = /boot
+
+include img_defs.mk
+include bootfiles.mk
+
+INCLUDES += -I$(IMAGE_SRCDIR)
+
+OBJS := $(addprefix $(OBJDIR)/, $(BOOT_OBJECTS))
+BOOTOBJS += $(OBJS)
+LINK_SCRIPT_LOADER = $(addprefix $(OBJDIR)/, linkscriptloader)
+LINK_SCRIPT_OTPROM = $(addprefix $(OBJDIR)/, linkscriptotprom)
+
+all: $(OBJS) \
+ $(OBJDIR)/$(IMAGE_LOADER_NAME).bin $(OBJDIR)/$(IMAGE_OTPROM_NAME).bin
+
+$(OBJS) $(OBJS:.o=.d): | $(OBJDIR)
+
+# Loader Objects
+LOADER_OBJS := $(addprefix $(OBJDIR)/, $(BASE_LOADER_OBJECTS))
+#Otprom Loader Objects
+OTPROM_LOADER_OBJS := $(addprefix $(OBJDIR)/, $(OTPROM_LOADER_OBJECTS))
+# ---- Otprom Image ------
+$(OBJDIR)/$(IMAGE_OTPROM_NAME).bin $(OBJDIR)/$(IMAGE_OTPROM_NAME).dis: $(OBJDIR)/$(IMAGE_OTPROM_NAME).out
+ $(OBJCOPY) -O binary $< $(OBJDIR)/$(IMAGE_OTPROM_NAME).bin `/usr/bin/nm $(OBJDIR)/$(IMAGE_OTPROM_NAME).out | grep "A _loader_end" | cut -d " " -f 1`
+ $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_OTPROM_NAME).dis
+
+#create a linked ELF executable
+$(OBJDIR)/$(IMAGE_OTPROM_NAME).out: $(OTPROM_LOADER_OBJS) $(LINK_SCRIPT_OTPROM)
+ $(LD) -e base_loader -T$(LINK_SCRIPT_OTPROM) -Map $(OBJDIR)/$(IMAGE_OTPROM_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_OTPROM_NAME).out $(OTPROM_LOADER_OBJS)
+
+# pass the link command file through the C preprocessor to evaluate macros
+# and remove comments
+$(LINK_SCRIPT_OTPROM): $(IMAGE_SRCDIR)/linkotprom.cmd
+ $(CPP) -I. -E -x c++ -P $(DEFS) $(IMAGE_SRCDIR)/linkotprom.cmd -o $(LINK_SCRIPT_OTPROM)
+
+# ---- Loader Image ------
+$(OBJDIR)/$(IMAGE_LOADER_NAME).bin $(OBJDIR)/$(IMAGE_LOADER_NAME).dis: $(OBJDIR)/$(IMAGE_LOADER_NAME).out
+ $(OBJCOPY) -O binary $< $(OBJDIR)/$(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
+
+#create a linked ELF executable
+$(OBJDIR)/$(IMAGE_LOADER_NAME).out: $(LOADER_OBJS) $(LINK_SCRIPT_LOADER)
+ $(LD) -e base_loader -T$(LINK_SCRIPT_LOADER) -Map $(OBJDIR)/$(IMAGE_LOADER_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_LOADER_NAME).out $(LOADER_OBJS)
+
+# pass the link command file through the C preprocessor to evaluate macros
+# and remove comments
+$(LINK_SCRIPT_LOADER): $(IMAGE_SRCDIR)/linkloader.cmd
+ $(CPP) -I. -E -x c++ -P $(DEFS) $(IMAGE_SRCDIR)/linkloader.cmd -o $(LINK_SCRIPT_LOADER)
+
+$(OBJDIR):
+ mkdir -p $(OBJDIR)
+
+.PHONY: clean all
+
+#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/sbe/boot/bootfiles.mk b/sbe/boot/bootfiles.mk
new file mode 100644
index 00000000..3e524155
--- /dev/null
+++ b/sbe/boot/bootfiles.mk
@@ -0,0 +1,34 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: sbe/boot/bootfiles.mk $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+#
+#
+# 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
+BOOTTOP-S-SOURCES = loader_l1.S
+
+BOOT_OBJECTS += $(BOOTTOP-S-SOURCES:.S=.o)
+
+BASE-LOADER-C-SOURCES = loader_l2.c
+BASE-LOADER-S-SOURCES = loader_l2_setup.S
+
+BASE_LOADER_OBJECTS = $(BASE-LOADER-C-SOURCES:.c=.o) $(BASE-LOADER-S-SOURCES:.S=.o)
+
+OTPROM-LOADER-S-SOURCES = otprom_init.S
+OTPROM_LOADER_OBJECTS = $(OTPROM-LOADER-S-SOURCES:.S=.o)
diff --git a/sbe/image/pm_loader.S b/sbe/boot/loader_l1.S
index db228f12..d6fecf63 100644
--- a/sbe/image/pm_loader.S
+++ b/sbe/boot/loader_l1.S
@@ -1,3 +1,26 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/boot/loader_l1.S $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* */
+/* */
+/* 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 */
.nolist
#include "pk.h"
@@ -56,4 +79,4 @@ copy_loop:
.epilogue __pmLoader
-#include "pm_pibmem_repair.S"
+#include "pibmem_repair.S"
diff --git a/sbe/image/base_loader.c b/sbe/boot/loader_l2.c
index bcb76794..b08a2278 100644
--- a/sbe/image/base_loader.c
+++ b/sbe/boot/loader_l2.c
@@ -1,12 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: sbe/image/base_loader.c $ */
+/* $Source: sbe/boot/loader_l2.c $ */
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
-/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
diff --git a/sbe/boot/loader_l2_setup.S b/sbe/boot/loader_l2_setup.S
new file mode 100644
index 00000000..2bfc7474
--- /dev/null
+++ b/sbe/boot/loader_l2_setup.S
@@ -0,0 +1,57 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/boot/loader_l2_setup.S $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* */
+/* */
+/* 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 */
+ .nolist
+#include "pk.h"
+ .list
+
+### ****************************************************************************
+### Do the initial setup for base loader
+###
+### ****************************************************************************
+
+__base_loader_setup:
+
+ ## Set up PowerPC EABI constant registers.
+
+ _liw %r2, _SDA2_BASE_
+ _liw %r13, _SDA_BASE_
+
+ ## The stack pointer is initialized for use by the remainder of the
+ ## initialization. The linker script defines the initial stack area.
+ ##
+ ## Stacks are always 8-byte aligned. A '0' is stored at the
+ ## stack pointer to indicate the end of the stack chain. Stack frames
+ ## always consist of at least 8 bytes - the backchain pointer and the
+ ## slot above the backchain pointer for the callee's LR.
+
+ _liw %r1, _BASE_LOADER_STACK_LIMIT
+ _clrfield %r1, %r1, 3, 29 # 8-byte align
+ li %r3, 0
+ li %r4, 0
+ stvd %r3, -8(%r1)
+
+ ## Call the base loader
+ bl base_loader
+
+ .epilogue __base_loader_setup
diff --git a/sbe/image/pm_otprom_loader.S b/sbe/boot/otprom_init.S
index c2f9ad0b..8d7c9979 100644
--- a/sbe/image/pm_otprom_loader.S
+++ b/sbe/boot/otprom_init.S
@@ -1,3 +1,26 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: sbe/boot/otprom_init.S $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+#
+#
+# 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
# # include "pk.h"
.set r0 , 0
.set r1 , 1
diff --git a/sbe/image/pm_pibmem_repair.S b/sbe/boot/pibmem_repair.S
index 26cca971..6e8fab19 100644
--- a/sbe/image/pm_pibmem_repair.S
+++ b/sbe/boot/pibmem_repair.S
@@ -1,3 +1,26 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/boot/pibmem_repair.S $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* */
+/* */
+/* 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 */
#include "sbe_link.H"
#include "pk.h"
diff --git a/sbe/image/Makefile b/sbe/image/Makefile
index f09bffbe..4de46a23 100644
--- a/sbe/image/Makefile
+++ b/sbe/image/Makefile
@@ -27,6 +27,8 @@
#Pull in the definitions that affect all makefiles for this image
include img_defs.mk
+include ../boot/bootfiles.mk
+
#Pull in object file names for the top directory
include topfiles.mk
@@ -35,6 +37,8 @@ LIB_DIRS += -L$(OBJDIR)/pk
PKLIB := $(OBJDIR)/pk/libpk.a
LLIBS += -lpk
+SUBDIRS += $(BOOT_SRCDIR)
+
SUBDIRS += ../sbefw
LIB_DIRS += -L$(OBJDIR)/sbefw
SBEFWLIB := $(OBJDIR)/sbefw/libsbefw.a
@@ -101,9 +105,9 @@ LLIBS += -lpm
SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).out
SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).map
SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SBE_NAME).dis
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_LOADER_NAME).out
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_LOADER_NAME).map
-SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_LOADER_NAME).dis
+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 += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out
SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).map
SIMICS_PPE_TAR_FILES += $(OBJDIR)/$(IMAGE_SEEPROM_NAME).dis
@@ -133,16 +137,8 @@ LINK_OBJS = $(OBJS)
OBJS := $(addprefix $(OBJDIR)/, $(TOP_OBJECTS))
LINK_OBJS += $(OBJS) $(GCCLIBS)
-# Loader Objects
-LOADER_OBJS := $(addprefix $(OBJDIR)/, $(BASE_LOADER_OBJECTS))
-
-#Otprom Loader Objects
-OTPROM_LOADER_OBJS := $(addprefix $(OBJDIR)/, $(OTPROM_LOADER_OBJECTS))
-
LINK_SCRIPT_SEEPROM = $(addprefix $(OBJDIR)/, linkscriptseeprom)
LINK_SCRIPT_SBE = $(addprefix $(OBJDIR)/, linkscriptsbe)
-LINK_SCRIPT_LOADER = $(addprefix $(OBJDIR)/, linkscriptloader)
-LINK_SCRIPT_OTPROM = $(addprefix $(OBJDIR)/, linkscriptotprom)
# ---- SEEPROM Image ------
# This removes all unecessary headers from the ELF executable
@@ -153,7 +149,7 @@ $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(OBJDIR)/$(IMAGE_SEEPROM_NAME).dis: $(OBJDI
#create a linked ELF executable
$(OBJDIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) $(LINK_OBJS) $(LINK_SCRIPT_SEEPROM)
$(LD) -n -T$(LINK_SCRIPT_SEEPROM) -Map $(OBJDIR)/$(IMAGE_SEEPROM_NAME).map \
- -Bstatic -o $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(OBJS) $(LIB_DIRS) \
+ -Bstatic -o $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(BOOT_OBJECTS) $(OBJS) $(LIB_DIRS) \
--start-group $(LLIBS) --end-group -leabi -lmath -lc
# pass the link command file through the C preprocessor to evaluate macros
@@ -178,37 +174,7 @@ $(OBJDIR)/$(IMAGE_SBE_NAME).out: ppe_trace_bin buildInfo $(OBJDIR)/base_sbe_fix
$(LINK_SCRIPT_SBE): linksbe.cmd
$(CPP) -E -x c++ -I. -P $(DEFS) linksbe.cmd -o $(LINK_SCRIPT_SBE)
-# ---- Otprom Image ------
-$(OBJDIR)/$(IMAGE_OTPROM_NAME).bin $(OBJDIR)/$(IMAGE_OTPROM_NAME).dis: $(OBJDIR)/$(IMAGE_OTPROM_NAME).out
- $(OBJCOPY) -O binary $< $(OBJDIR)/$(IMAGE_OTPROM_NAME).bin `/usr/bin/nm $(OBJDIR)/$(IMAGE_OTPROM_NAME).out | grep "A _loader_end" | cut -d " " -f 1`
- $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_OTPROM_NAME).dis
-
-#create a linked ELF executable
-$(OBJDIR)/$(IMAGE_OTPROM_NAME).out: $(OTPROM_LOADER_OBJS) $(LINK_SCRIPT_OTPROM)
- $(LD) -e base_loader -T$(LINK_SCRIPT_OTPROM) -Map $(OBJDIR)/$(IMAGE_OTPROM_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_OTPROM_NAME).out $(OTPROM_LOADER_OBJS)
-
-# pass the link command file through the C preprocessor to evaluate macros
-# and remove comments
-$(LINK_SCRIPT_OTPROM): linkotprom.cmd
- $(CPP) -I. -E -x c++ -P $(DEFS) linkotprom.cmd -o $(LINK_SCRIPT_OTPROM)
-
-
-# ---- Loader Image ------
-$(OBJDIR)/$(IMAGE_LOADER_NAME).bin $(OBJDIR)/$(IMAGE_LOADER_NAME).dis: $(OBJDIR)/$(IMAGE_LOADER_NAME).out
- $(OBJCOPY) -O binary $< $(OBJDIR)/$(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
-
-#create a linked ELF executable
-$(OBJDIR)/$(IMAGE_LOADER_NAME).out: $(LOADER_OBJS) $(LINK_SCRIPT_LOADER)
- $(LD) -e base_loader -T$(LINK_SCRIPT_LOADER) -Map $(OBJDIR)/$(IMAGE_LOADER_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_LOADER_NAME).out $(LOADER_OBJS)
-
-# pass the link command file through the C preprocessor to evaluate macros
-# and remove comments
-$(LINK_SCRIPT_LOADER): linkloader.cmd
- $(CPP) -I. -E -x c++ -P $(DEFS) linkloader.cmd -o $(LINK_SCRIPT_LOADER)
-
all: $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(OBJDIR)/$(IMAGE_SBE_NAME).bin \
- $(OBJDIR)/$(IMAGE_LOADER_NAME).bin $(OBJDIR)/$(IMAGE_OTPROM_NAME).bin \
$(SBE_TOOLS) normalize defaultset $(OBJDIR)/fixed.bin appendloader \
appendoverrides add_LoaderAddr symbols tracehash buildinfo report
@@ -237,12 +203,12 @@ buildinfo: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin
add_LoaderAddr: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out
$(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin set L1_LoaderAddr 0x`nm $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out | grep __pmLoader | cut -f 1 -d " "`
- $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin set L2_LoaderAddr 0x`nm $(OBJDIR)/$(IMAGE_LOADER_NAME).out | grep __base_loader_setup | cut -f 1 -d " "`
+ $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin set L2_LoaderAddr 0x`nm $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out | grep __base_loader_setup | cut -f 1 -d " "`
$(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin set kernelAddr 0x`nm $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out | grep __pk_boot | cut -f 1 -d " "`
-symbols: $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(OBJDIR)/$(IMAGE_LOADER_NAME).out $(OBJDIR)/$(IMAGE_SBE_NAME).out
+symbols: $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out $(OBJDIR)/$(IMAGE_SBE_NAME).out
$(NM) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).out > $(OBJDIR)/$(SBE_SYMBOLS_NAME)
- $(NM) $(OBJDIR)/$(IMAGE_LOADER_NAME).out >> $(OBJDIR)/$(SBE_SYMBOLS_NAME)
+ $(NM) $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).out >> $(OBJDIR)/$(SBE_SYMBOLS_NAME)
report: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin
$(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin report > $(OBJDIR)/$(IMAGE_SEEPROM_NAME).rpt
@@ -327,8 +293,8 @@ $(OBJDIR)/fixed.bin: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin
$(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin extract .fixed $(BASE_OBJDIR)/fixed.bin
-appendloader: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(OBJDIR)/$(IMAGE_LOADER_NAME).bin
- $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin append .baseloader $(OBJDIR)/$(IMAGE_LOADER_NAME).bin
+appendloader: $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).bin
+ $(P9_XIP_TOOL) $(OBJDIR)/$(IMAGE_SEEPROM_NAME).bin append .baseloader $(BOOT_OBJDIR)/$(IMAGE_LOADER_NAME).bin
# collect all of the trace hash files for this image into a single sbeStringFile
tracehash:
diff --git a/sbe/image/base_loader_setup.S b/sbe/image/base_loader_setup.S
deleted file mode 100644
index 7c24349c..00000000
--- a/sbe/image/base_loader_setup.S
+++ /dev/null
@@ -1,34 +0,0 @@
- .nolist
-#include "pk.h"
- .list
-
-### ****************************************************************************
-### Do the initial setup for base loader
-###
-### ****************************************************************************
-
-__base_loader_setup:
-
- ## Set up PowerPC EABI constant registers.
-
- _liw %r2, _SDA2_BASE_
- _liw %r13, _SDA_BASE_
-
- ## The stack pointer is initialized for use by the remainder of the
- ## initialization. The linker script defines the initial stack area.
- ##
- ## Stacks are always 8-byte aligned. A '0' is stored at the
- ## stack pointer to indicate the end of the stack chain. Stack frames
- ## always consist of at least 8 bytes - the backchain pointer and the
- ## slot above the backchain pointer for the callee's LR.
-
- _liw %r1, _BASE_LOADER_STACK_LIMIT
- _clrfield %r1, %r1, 3, 29 # 8-byte align
- li %r3, 0
- li %r4, 0
- stvd %r3, -8(%r1)
-
- ## Call the base loader
- bl base_loader
-
- .epilogue __base_loader_setup
diff --git a/sbe/image/base_main.C b/sbe/image/base_main.C
deleted file mode 100644
index 97a9633b..00000000
--- a/sbe/image/base_main.C
+++ /dev/null
@@ -1,66 +0,0 @@
-//-----------------------------------------------------------------------------
-// *! (C) Copyright International Business Machines Corp. 2014
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-//-----------------------------------------------------------------------------
-
-/// \file base_main.c
-/// \brief base program that creates and starts a thread
-///
-/// This file is a placeholder code in order to compile. I will be replaced in future by the code placed into the .text section.
-
-extern "C" {
-#include "pk.h"
-#include "pk_trace.h"
-#include "base_ppe_main.h"
-}
-#define KERNEL_STACK_SIZE 256
-#define MAIN_THREAD_STACK_SIZE 256
-
-uint8_t G_kernel_stack[KERNEL_STACK_SIZE];
-uint8_t G_main_thread_stack[MAIN_THREAD_STACK_SIZE];
-PkThread G_main_thread;
-
-// A simple thread that just increments a local variable and sleeps
-void main_thread(void* arg)
-{
-
- while(1)
- {
-
- pk_sleep(PK_SECONDS(1));
-
- }
-}
-
-
-// The main function is called by the boot code (after initializing some
-// registers)
-int main(int argc, char **argv)
-{
- // initializes kernel data (stack, threads, timebase, timers, etc.)
- pk_initialize((PkAddress)G_kernel_stack,
- KERNEL_STACK_SIZE,
- 0,
- 500000000);
-
-
- //Initialize the thread control block for G_main_thread
- pk_thread_create(&G_main_thread,
- (PkThreadRoutine)main_thread,
- (void*)NULL,
- (PkAddress)G_main_thread_stack,
- (size_t)MAIN_THREAD_STACK_SIZE,
- (PkThreadPriority)1);
-
-
-
- //Make G_main_thread runnable
- pk_thread_resume(&G_main_thread);
-
- // Start running the highest priority thread.
- // This function never returns
- pk_start_threads();
-
- return 0;
-}
diff --git a/sbe/image/base_ppe_main.c b/sbe/image/base_ppe_main.c
deleted file mode 100644
index 0752c0c6..00000000
--- a/sbe/image/base_ppe_main.c
+++ /dev/null
@@ -1,15 +0,0 @@
-//-----------------------------------------------------------------------------
-// *! (C) Copyright International Business Machines Corp. 2014
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-//-----------------------------------------------------------------------------
-
-/// \file base_ppe_main.c
-/// \brief example code to include into fixed section
-///
-/// main function to include into fixed section. Can be replaced as soon as
-/// real functions are available
-
-void main()
-{
-}
diff --git a/sbe/image/base_ppe_main.h b/sbe/image/base_ppe_main.h
deleted file mode 100644
index 4eaf0d45..00000000
--- a/sbe/image/base_ppe_main.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//-----------------------------------------------------------------------------
-// *! (C) Copyright International Business Machines Corp. 2014
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-//-----------------------------------------------------------------------------
-
-/// \file base_ppe_main.h
-/// \brief routine to be placed into the fixed section.
-///
-/// this routing is a demonstration for functions to be placed into the fixed
-/// fixed section
-#ifndef __BASE_PPE_MAIN_H__
-#define __BASE_PPE_MAIN_H__
-
-#endif // __BASE_PPE_MAIN_H__
diff --git a/sbe/image/img_defs.mk b/sbe/image/img_defs.mk
index da8008d3..de1be314 100644
--- a/sbe/image/img_defs.mk
+++ b/sbe/image/img_defs.mk
@@ -83,6 +83,10 @@ ifndef IMAGE_SRCDIR
export IMAGE_SRCDIR = $(SBE_SRC_DIR)/image
endif
+ifndef BOOT_SRCDIR
+export BOOT_SRCDIR = $(SBE_SRC_DIR)/boot
+endif
+
ifndef IMPORT_SRCDIR
export IMPORT_SRCDIR = $(SBE_ROOT_DIR)/import
endif
@@ -147,6 +151,14 @@ ifndef IMG_INCLUDES
export IMG_INCLUDES = -I$(IMAGEPROCS_SRCDIR) -I$(P9_XIP_SRCDIR) -I$(IMAGE_SRCDIR) -I$(CACHE_SRCDIR) -I$(UTILS_SRCDIR) -I$(CORE_SRCDIR) -I$(PERV_SRCDIR) -I$(NEST_SRCDIR) -I$(PM_SRCDIR) -I$(INITFILES_SRCDIR)
endif
+ifndef BASE_OBJDIR
+export BASE_OBJDIR = $(SBE_SRC_DIR)/obj
+endif
+
+ifndef BOOT_OBJDIR
+export BOOT_OBJDIR = $(BASE_OBJDIR)/boot
+endif
+
export IMG_OBJDIR = $(BASE_OBJDIR)/$(IMAGE_SEEPROM_NAME)
ifndef PK_SRCDIR
@@ -331,6 +343,7 @@ INCLUDES += -I$(PK_SRCDIR)/kernel
INCLUDES += -I$(PK_SRCDIR)/ppe
INCLUDES += -I$(PK_SRCDIR)/ppe42
INCLUDES += -I$(SBE_FW_DIR)
+INCLUDES += -I$(BOOT_SRCDIR)
INCLUDES += -I$(PK_SRCDIR)/trace
INCLUDES += -I$(SBE_ROOT_DIR)/tools/ppetracepp
INCLUDES += -I$(IMPORT_COMMON_DIR)/include
diff --git a/sbe/image/linkloader.cmd b/sbe/image/linkloader.cmd
index e3df600e..66cad93e 100644..100755
--- a/sbe/image/linkloader.cmd
+++ b/sbe/image/linkloader.cmd
@@ -1,3 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/image/linkloader.cmd $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] 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 */
// Need to do this so that elf32-powerpc is not modified!
#undef powerpc
@@ -5,7 +29,7 @@
#ifndef BASE_LOADER_STACK_SIZE
#define BASE_LOADER_STACK_SIZE 128
#endif
-#include <sbe_link.H>
+#include "sbe_link.H"
OUTPUT_FORMAT(elf32-powerpc);
diff --git a/sbe/image/linkotprom.cmd b/sbe/image/linkotprom.cmd
index 2d7324ac..2eb6d391 100644
--- a/sbe/image/linkotprom.cmd
+++ b/sbe/image/linkotprom.cmd
@@ -1,8 +1,32 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/image/linkotprom.cmd $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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 */
// Need to do this so that elf32-powerpc is not modified!
#undef powerpc
-#include <sbe_link.H>
+#include "sbe_link.H"
OUTPUT_FORMAT(elf32-powerpc);
diff --git a/sbe/image/sbe_main.C b/sbe/image/sbe_main.C
deleted file mode 100644
index 0e6ae382..00000000
--- a/sbe/image/sbe_main.C
+++ /dev/null
@@ -1,418 +0,0 @@
-//-----------------------------------------------------------------------------
-// *! (C) Copyright International Business Machines Corp. 2014
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-//-----------------------------------------------------------------------------
-
-/// \file sample_main.c
-/// \brief Sample program that creates and starts a thread
-///
-/// This file demonstrates how to create a thread and run it. It also provides
-/// an example of how to add traces to the code.
-#include <fapi2.H>
-//#include <p9_sbe_perv.H>
-
-#include <vector>
-
-
-
-
-extern "C"
-{
-
-#include "pk.h"
-#include "pk_trace.h"
-//#include "pk_trace_wrap.h"
-//#include "common_scom_addresses.H"
-//#include "p9_sbe_perv.H"
-#include "p9_hcd_cache.H"
-#include "p9_hcd_core.H"
-#include "proc_sbe_fixed.H"
-#include "trac_interface.h"
-
-}
-
-namespace fapi2attr
-{
-
-extern ProcChipAttributes_t G_proc_chip_attributes asm("G_proc_chip_attributes") __attribute__ ((section (".fixed")));
-extern PervAttributes_t G_perv_attributes asm("G_perv_attributes") __attribute__ ((section (".fixed")));
-extern CoreAttributes_t G_core_attributes asm("G_core_attributes") __attribute__ ((section (".fixed")));
-extern EQAttributes_t G_eq_attributes asm("G_eq_attributes") __attribute__ ((section (".fixed")));
-extern EXAttributes_t G_ex_attributes asm("G_ex_attributes") __attribute__ ((section (".fixed")));
-
-
-}
-
-extern "C" {
-
-
-#define KERNEL_STACK_SIZE 256
-#define MAIN_THREAD_STACK_SIZE 256
-
-// Necessary Kernel Structures
-uint8_t G_kernel_stack[KERNEL_STACK_SIZE];
-uint8_t G_main_thread_stack[MAIN_THREAD_STACK_SIZE];
-PkThread G_main_thread;
-
-
-fapi2::ReturnCode
-hwp_chip_present(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target);
-
-fapi2::ReturnCode
-hwp_chip_functional(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target);
-
-
-fapi2::ReturnCode
-hwp_chip2(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target);
-
-
-fapi2::ReturnCode
-hwp_core(const fapi2::Target<fapi2::TARGET_TYPE_CORE> & i_target);
-
-fapi2::ReturnCode
-hwp_eq(const fapi2::Target<fapi2::TARGET_TYPE_EQ> & i_target);
-
-fapi2::ReturnCode
-hwp_perv(const fapi2::Target<fapi2::TARGET_TYPE_PERV> & i_target);
-
-
-//---------------------------------------------------------------------------
-
-
-void main_thread(void* arg)
-{
-
- // This is workaround. Currently we do not have code to initialise
- // global objects. So initializing global objects against using local
- // initialized object
- FAPI_DBG("Workaround temporary allocation of Global Vector");
- std::vector<fapi2::plat_target_handle_t> targets1;
- G_vec_targets = std::move(targets1);
-
- // Intialize the targets
- fapi2::plat_TargetsInit();
-
- // Get a specific target
- fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>chip_target_new =
- fapi2::plat_getChipTarget();
-
- FAPI_DBG("chip_target_new = 0x%08X", (uint32_t)(chip_target_new.get()>>32));
-
-// FAPI_TRY(hwp_chip_present(chip_target_new));
- FAPI_TRY(hwp_chip_functional(chip_target_new));
-
- FAPI_TRY(hwp_chip2(chip_target_new));
-
- ///
-#ifndef __noRC__
- // PIB Errors are masked for platforms like SBE where
- // explict error code checking is to occur
- fapi2::setPIBErrorMask(0b11111111);
-#else
- // PIB Errors are unmaskd for platforms that desire to take machine
- // check interrupts
- fapi2::setPIBErrorMask(0b00000000);
-#endif
-
-// FAPI_TRY(hwp_chip(chip_target_new));
-
-// FAPI_TRY(p9_sbe_attr_setup(chip_target));
-// FAPI_TRY(p9_sbe_check_master(chip_target));
-// FAPI_TRY(p9_sbe_setup_evid(chip_target));
-
-
-fapi_try_exit:
- return;
-
-}
-
-// A Chip try
-fapi2::ReturnCode
-hwp_chip_present(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target)
-{
-
- FAPI_DBG("i_target = 0x%08X", (uint32_t)(i_target.get()>>32));
-
- auto l_perv_present_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_PERV>
- (fapi2::TARGET_STATE_PRESENT);
-
- // Get the TPChiplet target
- uint32_t i = 0;
- for (auto it: l_perv_present_vector)
- {
-
- FAPI_DBG("Perv Present Target %u value=%08X chiplet %02X",
- i,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++i;
- }
-
- auto l_core_present_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_CORE>
- (fapi2::TARGET_STATE_PRESENT);
-
- // Get the Core Chiplet targets
- uint32_t j = 0;
- for (auto it: l_core_present_vector)
- {
-
- FAPI_DBG("Core Present Target %u value=%08X chiplet %02X",
- j,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++j;
- }
-
-
- fapi2::buffer<uint64_t> data = 0;
- const uint32_t address = 0x0006d010;
-
- FAPI_INF("hwp_chip %u", address);
-
- uint64_t databuffer;
- getscom_abs(address, &databuffer);
-
- databuffer = 0xDEAD000000000000ull;
-
- putscom_abs(address, databuffer);
-
- data = 0xBADC0DE800000000ull;
- FAPI_TRY(fapi2::putScom(i_target, address, data));
-
-
- FAPI_TRY(fapi2::getScom(i_target, address, data));
-// FAPI_DBG("The First getSCOM: data = %016llX", revle64(data));
-
- data.setBit<0, 16>();
- FAPI_TRY(fapi2::putScom(i_target, 0x0006d010, data));
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-// A Chip try
-fapi2::ReturnCode
-hwp_chip_functional(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target)
-{
-
- FAPI_DBG("i_target = 0x%08X", (uint32_t)(i_target.get()>>32));
-
- auto l_perv_functional_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_PERV>
- (fapi2::TARGET_STATE_FUNCTIONAL);
-
- // Get the TPChiplet target
- uint32_t i = 0;
- for (auto it: l_perv_functional_vector)
- {
-
- FAPI_DBG("Perv Functional Target %u value=%08X chiplet %02X",
- i,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++i;
- }
-
- auto l_core_functional_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_CORE>
- (fapi2::TARGET_STATE_FUNCTIONAL);
-
- // Get the Core Chiplet targets
- uint32_t j = 0;
- for (auto it: l_core_functional_vector)
- {
-
- FAPI_DBG("Core Functional Target %u value=%08X chiplet %02X",
- j,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++j;
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-
-// A Chip try
-fapi2::ReturnCode
-hwp_chip2(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> & i_target)
-{
-
- FAPI_DBG("i_target = 0x%08X", (uint32_t)(i_target.get()>>32));
-
-
- auto l_eq_functional_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_EQ>
- (fapi2::TARGET_STATE_PRESENT);
-
- // Get the EQ Chiplet target
- uint32_t k = 0;
- for (auto it: l_eq_functional_vector)
- {
-
- FAPI_DBG("EQ Functional Target %u value=%08X chiplet %02X",
- k,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++k;
- }
-
-
- auto l_mcs_functional_vector =
- i_target.getChildren<fapi2::TARGET_TYPE_MCS>
- (fapi2::TARGET_STATE_PRESENT);
-
- // Get the MCS Chiplet target
- uint32_t m = 0;
- for (auto it: l_mcs_functional_vector)
- {
-
- FAPI_DBG("MCS Functional Target %u value=%08X chiplet %02X",
- m,
- (uint32_t)(it.get()>>32),
- (uint32_t)(it.getChipletNumber()));
-
- ++m;
- }
-
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-// A Core try
-fapi2::ReturnCode
-hwp_core(const fapi2::Target<fapi2::TARGET_TYPE_CORE> & i_target)
-{
-
- // Temporary target that pulls out only the chiplet overly. This keeps
- // from having to compute this for each SCOM operation.
-// fapi2::Target<fapi2::TARGET_TYPE_ADDRESS> iv_target (i_target.getAddressOverlay());
-
- fapi2::buffer<uint64_t> data = 0;
- fapi2::buffer<uint64_t> mask;
-
- uint32_t address = 0x200F5678;
- FAPI_TRY(fapi2::getScom(i_target, address, data));
-
- FAPI_TRY(fapi2::putScom(i_target, 0x20006789, data));
-
- data = 0xBADC0DEBADC0DEBAull;
- FAPI_TRY(fapi2::putScom(i_target, 0x0000AAAA, data));
-
- FAPI_TRY(fapi2::getScom(i_target, address, data));
-
- FAPI_TRY(fapi2::modifyScom(i_target, address, data, fapi2::CHIP_OP_MODIFY_MODE_OR));
-
-
- mask = BITS(4,4);
- FAPI_TRY(fapi2::putScomUnderMask(i_target, address, data, mask));
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
-
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-// An EQ try
-fapi2::ReturnCode
-hwp_eq(const fapi2::Target<fapi2::TARGET_TYPE_EQ> & i_target)
-{
- fapi2::buffer<uint64_t> data = 0;
-
- uint64_t address = 0x1000F2222;
- FAPI_TRY(fapi2::getScom(i_target, address, data));
-
-
- FAPI_TRY(fapi2::putScom(i_target, 0x10006789, data));
-
- data = 0xDEADBEEFDEADBEEFull;
- FAPI_TRY(fapi2::putScom(i_target, 0x1000ABCD, data));
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
-
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-// A Perv try
-fapi2::ReturnCode
-hwp_perv(const fapi2::Target<fapi2::TARGET_TYPE_PERV> & i_target)
-{
- fapi2::buffer<uint64_t> data = 0;;
-
- uint64_t address = 0x00005678;
-
- for (uint32_t i = 0; i < 5; i++)
- {
- FAPI_TRY(fapi2::getScom(i_target, address+i, data));
-
- data.setBit<4>();
-
- FAPI_TRY(fapi2::putScom(i_target, address+i, data));
-
- data = 0xDEADBEEFDEADBEEFull;
- FAPI_TRY(fapi2::putScom(i_target, address+(2*i), data));
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
-
- return fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
-}
-
-
-
-// The main function is called by the boot code (after initializing some
-// registers)
-int main(int argc, char **argv)
-{
- // initializes kernel data (stack, threads, timebase, timers, etc.)
- pk_initialize((PkAddress)G_kernel_stack,
- KERNEL_STACK_SIZE,
- 0,
- 500000000);
-
- PK_TRACE("Kernel init completed");
-
- //Initialize the thread control block for G_main_thread
- pk_thread_create(&G_main_thread,
- (PkThreadRoutine)main_thread,
- (void*)NULL,
- (PkAddress)G_main_thread_stack,
- (size_t)MAIN_THREAD_STACK_SIZE,
- (PkThreadPriority)1);
-
- PK_TRACE_BIN("G_main_thread", &G_main_thread, sizeof(G_main_thread));
-
- //Make G_main_thread runnable
- pk_thread_resume(&G_main_thread);
-
- PK_TRACE("Starting thread(s)");
-
- // Start running the highest priority thread.
- // This function never returns
- pk_start_threads();
-
- return 0;
-}
-
-} // extern C
diff --git a/sbe/image/topfiles.mk b/sbe/image/topfiles.mk
index 725a0e07..9da6d34d 100644
--- a/sbe/image/topfiles.mk
+++ b/sbe/image/topfiles.mk
@@ -24,7 +24,7 @@
# IBM_PROLOG_END_TAG
TOP-C-SOURCES =
TOP-CPP-SOURCES =
-TOP-S-SOURCES = base_ppe_header.S pm_loader.S
+TOP-S-SOURCES = base_ppe_header.S
# generated by ppeParseProcSbeFixed.pl
TOP-FIXED-HEADERS += $(IMAGE_SRCDIR)/proc_sbe_fixed_system.H
@@ -35,15 +35,6 @@ TOP-FIXED-HEADERS += $(IMAGE_SRCDIR)/proc_sbe_fixed_ex.H
TOP-FIXED-HEADERS += $(IMAGE_SRCDIR)/proc_sbe_fixed_eq.H
TOP_OBJECTS = $(TOP-C-SOURCES:.c=.o) $(TOP-CPP-SOURCES:.C=.o) $(TOP-S-SOURCES:.S=.o)
-
-BASE-LOADER-C-SOURCES = base_loader.c
-BASE-LOADER-S-SOURCES = base_loader_setup.S
-
-BASE_LOADER_OBJECTS = $(BASE-LOADER-C-SOURCES:.c=.o) $(BASE-LOADER-S-SOURCES:.S=.o)
-
-OTPROM-LOADER-S-SOURCES = pm_otprom_loader.S
-OTPROM_LOADER_OBJECTS = $(OTPROM-LOADER-S-SOURCES:.S=.o)
-
PLAT_FAPI2_DIR_INCL = $(PLAT_FAPI2_DIR)/include
# generated by ppeParseAttributeInfo.pl
GEN-PARSEATTRIBUTEINFO += $(PLAT_FAPI2_DIR_INCL)/fapi2AttributeIds.H
OpenPOWER on IntegriCloud