diff options
-rw-r--r-- | src/boot/Makefile | 13 | ||||
-rw-r--r-- | src/boot/bootfiles.mk | 12 | ||||
-rw-r--r-- | src/boot/loader_l1.S | 8 | ||||
-rw-r--r-- | src/boot/pibmem_repair/scom_repair_axone/pibmem_repair.S (renamed from src/boot/pibmem_repair.S) | 6 | ||||
-rw-r--r-- | src/boot/pibmem_repair/scom_repair_p9/pibmem_repair.S | 61 | ||||
-rw-r--r-- | src/build/Makefile | 2 | ||||
-rw-r--r-- | src/build/img_defs.mk | 7 | ||||
-rw-r--r-- | src/build/power_axone_defs.mk | 1 | ||||
-rw-r--r-- | src/build/power_defs.mk | 1 |
9 files changed, 98 insertions, 13 deletions
diff --git a/src/boot/Makefile b/src/boot/Makefile index cc6666c9..c1d1b808 100644 --- a/src/boot/Makefile +++ b/src/boot/Makefile @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016,2017 +# Contributors Listed Below - COPYRIGHT 2016,2018 # [+] International Business Machines Corp. # # @@ -30,7 +30,6 @@ include bootfiles.mk INCLUDES += -I$(BUILD_DIR) OBJS := $(addprefix $(OBJDIR)/, $(BOOT_OBJECTS)) -BOOTOBJS += $(OBJS) LINK_SCRIPT_LOADER = $(addprefix $(OBJDIR)/, linkscriptloader) LINK_SCRIPT_OTPROM = $(addprefix $(OBJDIR)/, linkscriptotprom) @@ -71,8 +70,16 @@ $(IMG_DIR)/$(IMAGE_LOADER_NAME).out: $(LOADER_OBJS) $(LINK_SCRIPT_LOADER) $(LINK_SCRIPT_LOADER): $(LINKER_DIR)/linkloader.cmd $(CPP) -I$(INCLUDES) -E -x c++ -P $(DEFS) $(LINKER_DIR)/linkloader.cmd -o $(LINK_SCRIPT_LOADER) +ifdef PIBMEM_REPAIR_SCOM_P9 +PIBMEM_REPAIR_OBJDIR = $(OBJDIR)/pibmem_repair/scom_repair_p9 +endif +ifdef PIBMEM_REPAIR_SCOM_AXONE +PIBMEM_REPAIR_OBJDIR = $(OBJDIR)/pibmem_repair/scom_repair_axone +endif + $(OBJDIR): mkdir -p $(OBJDIR) + mkdir -p $(PIBMEM_REPAIR_OBJDIR) .PHONY: clean all @@ -83,5 +90,3 @@ clean: ifneq ($(MAKECMDGOALS),clean) include $(OBJS:.o=.d) endif - - diff --git a/src/boot/bootfiles.mk b/src/boot/bootfiles.mk index d5658f63..238944d8 100644 --- a/src/boot/bootfiles.mk +++ b/src/boot/bootfiles.mk @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2018 # [+] International Business Machines Corp. # # @@ -22,9 +22,15 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG -BOOTTOP-S-SOURCES = loader_l1.S +ifdef PIBMEM_REPAIR_SCOM_P9 +BOOTTOP-S-SOURCES += pibmem_repair/scom_repair_p9/pibmem_repair.S +endif +ifdef PIBMEM_REPAIR_SCOM_AXONE +BOOTTOP-S-SOURCES += pibmem_repair/scom_repair_axone/pibmem_repair.S +endif +BOOTTOP-S-SOURCES += loader_l1.S -BOOT_OBJECTS += $(BOOTTOP-S-SOURCES:.S=.o) +BOOT_OBJECTS += $(BOOTTOP-C-SOURCES:.c=.o) $(BOOTTOP-S-SOURCES:.S=.o) BASE-LOADER-C-SOURCES = loader_l2.c BASE-LOADER-S-SOURCES = loader_l2_setup.S diff --git a/src/boot/loader_l1.S b/src/boot/loader_l1.S index 593b586d..0f7bca1a 100644 --- a/src/boot/loader_l1.S +++ b/src/boot/loader_l1.S @@ -129,4 +129,10 @@ jump_to_kernel: mtlr r6 blr -#include "pibmem_repair.S" +#ifdef PIBMEM_REPAIR_SCOM_P9 +#include "pibmem_repair/scom_repair_p9/pibmem_repair.S" +#endif + +#ifdef PIBMEM_REPAIR_SCOM_AXONE +#include "pibmem_repair/scom_repair_axone/pibmem_repair.S" +#endif diff --git a/src/boot/pibmem_repair.S b/src/boot/pibmem_repair/scom_repair_axone/pibmem_repair.S index 2b376950..986fbbf1 100644 --- a/src/boot/pibmem_repair.S +++ b/src/boot/pibmem_repair/scom_repair_axone/pibmem_repair.S @@ -1,12 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/boot/pibmem_repair.S $ */ +/* $Source: src/boot/pibmem_repair/scom_repair_axone/pibmem_repair.S $ */ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ -/* [+] International Business Machines Corp. */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -28,7 +27,6 @@ .set d0 , 0 .text .section .loader_text, "ax", @progbits - _pibmemRepair: _liw %r3, SBE_FIXED_SECTION # Fixed Section Location diff --git a/src/boot/pibmem_repair/scom_repair_p9/pibmem_repair.S b/src/boot/pibmem_repair/scom_repair_p9/pibmem_repair.S new file mode 100644 index 00000000..b32d5e91 --- /dev/null +++ b/src/boot/pibmem_repair/scom_repair_p9/pibmem_repair.S @@ -0,0 +1,61 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/boot/pibmem_repair/scom_repair_p9/pibmem_repair.S $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* */ +/* */ +/* 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" + +.set d0 , 0 + .text + .section .loader_text, "ax", @progbits +_pibmemRepair: + + _liw %r3, SBE_FIXED_SECTION # Fixed Section Location + _liw %r9, SBE_SEEPROM_BASE_ORIGIN + lwz r8, 0(r3) # offset of Fixed section + adde r8, r8, r9 # add base address to offset to get absolute address + lis r5, 0x8 + ori r5, r5 , 0x800B #point to repair reg 0 addr + lis r0, 0x4000 # load repair #0 with 0x4000_0000 --> enable fence and repr_mux_sel is disabled + stvd d0, 0(r5) + lvd d0, 0(r8) # r8 was pointing to attributes + stvd d0, 1(r5) # store repair reg 1 + lvd d0, 8(r8) # r8 was pointing to attributes + stvd d0, 2(r5) # store repair reg 2 + lvd d0, 16(r8) # r8 was pointing to attributes + stvd d0, 3(r5) # store repair reg 3 + lis r0, 0x8000 # load repair #0 with 0x8000_0000 --> disable fence and repr_mux_sel is enabled + stvd d0 , 0(r5) + +################################################################### +########### Update DBG_LCL_REG to enable trace #################### +################################################################### + + lis r5, 0xc000 # local_reg_addr (R5 = C0000120) + ori r5, r5, 0x0120 + andi. r0, r0, 0x0 + andi. r1, r1, 0x0 + oris r0, r0, 0x8A00 # set the bit 0 to enable the debug blot-on + stvd d0, 0(r5) # DBG_LCL_REG + + blr # back to l1_loader + diff --git a/src/build/Makefile b/src/build/Makefile index 61ed136a..d9c0c039 100644 --- a/src/build/Makefile +++ b/src/build/Makefile @@ -148,7 +148,7 @@ $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).dis: $(IMG #create a linked ELF executable $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out: ppe_trace_bin buildInfo $(SUBDIRS) $(SEEPROM_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)/$(IMAGE_BASE_PPE_HEADER).o $(OBJS) $(LIB_DIRS) \ + -Bstatic -o $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).out $(addprefix $(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 diff --git a/src/build/img_defs.mk b/src/build/img_defs.mk index cc22374e..5ce9cda1 100644 --- a/src/build/img_defs.mk +++ b/src/build/img_defs.mk @@ -509,6 +509,13 @@ include z_defs.mk endif ############################################################################ +ifeq ($(PIBMEM_REPAIR_SCOM_P9), 1) +PPE-CFLAGS += -DPIBMEM_REPAIR_SCOM_P9=1 +endif +ifeq ($(PIBMEM_REPAIR_SCOM_AXONE), 1) +PPE-CFLAGS += -DPIBMEM_REPAIR_SCOM_AXONE=1 +endif +########################################################################### #override the GNU Make implicit rule for going from a .C to a .o %.o: %.C diff --git a/src/build/power_axone_defs.mk b/src/build/power_axone_defs.mk index 172e185e..8721933b 100644 --- a/src/build/power_axone_defs.mk +++ b/src/build/power_axone_defs.mk @@ -35,6 +35,7 @@ HOST_INTERFACE_AVAILABLE = 1 PERIODIC_IO_TOGGLE_SUPPORTED = 1 export SBE_S0_SUPPORT = 1 +export PIBMEM_REPAIR_SCOM_AXONE = 1 ISTEP2_INFRA_DIR = $(IMPORT_HWP_MK_DIR)/istep2 ISTEP3_INFRA_DIR = $(IMPORT_HWP_MK_DIR)/istep3 diff --git a/src/build/power_defs.mk b/src/build/power_defs.mk index d9304180..609e809e 100644 --- a/src/build/power_defs.mk +++ b/src/build/power_defs.mk @@ -36,6 +36,7 @@ HOST_INTERFACE_AVAILABLE = 1 PERIODIC_IO_TOGGLE_SUPPORTED = 1 export SBE_S0_SUPPORT = 1 +export PIBMEM_REPAIR_SCOM_P9 = 1 ISTEP2_INFRA_DIR = $(IMPORT_HWP_MK_DIR)/istep2 ISTEP3_INFRA_DIR = $(IMPORT_HWP_MK_DIR)/istep3 |