Skip to content

Commit

Permalink
GPU OpenPOWER Build Path
Browse files Browse the repository at this point in the history
Change-Id: I9803c93ff2b640f9f5f782d4f5506e5a53a586fd
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45709
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
  • Loading branch information
wilbryan committed Sep 6, 2017
1 parent 6f77ee7 commit 261681f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
34 changes: 32 additions & 2 deletions src/Makefile
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER OnChipController Project
#
# Contributors Listed Below - COPYRIGHT 2014,2016
# Contributors Listed Below - COPYRIGHT 2014,2017
# [+] International Business Machines Corp.
#
#
Expand All @@ -30,6 +30,10 @@ ifndef BASE_SRCDIR
BASE_SRCDIR = $(abspath ./)
endif

ifndef BASE_BINDIR
BASE_BINDIR = $(abspath ../bin)
endif

OBJDIR = $(BASE_OBJDIR)$(SUB_OBJDIR)
SRCDIR = $(BASE_SRCDIR)$(SUB_SRCDIR)

Expand All @@ -53,7 +57,11 @@ THASH = $(PPETRACEPP_DIR)/tracehash.pl

OCC_405_IMAGE_NAME = occ_405
OCC_GPE0_IMAGE_NAME = occ_gpe0
ifndef OPOCC_GPU_SUPPORT
OCC_GPE1_IMAGE_NAME = occ_gpe1
else
OCC_GPE1_IMAGE_NAME = gpu_gpe1
endif
OCC_BOOTLOADER_DIR_NAME = occBootLoader
OCC_BOOTLOADER_NAME = bootloader
IMAGE_HDR_SCRIPT = imageHdrScript
Expand All @@ -62,12 +70,21 @@ COMBINE_IMAGE_SUBDIRS = occBootLoader occ_405 occ_gpe0 occ_gpe1
COMBINEIMAGE = $(MAKE) combineImage -C $(dir)
IMAGEFILE = $(OBJDIR)/image.bin


ifndef OPOCC_GPU_SUPPORT
NEEDED_IMAGES = \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(IMAGE_HDR_SCRIPT) \
$(OBJDIR)/$(OCC_405_IMAGE_NAME)/$(OCC_405_IMAGE_NAME).out \
$(OBJDIR)/$(OCC_GPE0_IMAGE_NAME)/$(OCC_GPE0_IMAGE_NAME).out \
$(OBJDIR)/$(OCC_GPE1_IMAGE_NAME)/$(OCC_GPE1_IMAGE_NAME).out \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(OCC_BOOTLOADER_NAME).out \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(OCC_BOOTLOADER_NAME).out
else
NEEDED_IMAGES = \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(IMAGE_HDR_SCRIPT) \
$(OBJDIR)/$(OCC_405_IMAGE_NAME)/$(OCC_405_IMAGE_NAME).out \
$(OBJDIR)/$(OCC_GPE0_IMAGE_NAME)/$(OCC_GPE0_IMAGE_NAME).out \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(OCC_BOOTLOADER_NAME).out
endif

.PHONY : all
all: ppetools $(NEEDED_IMAGES) combineImage tracehash
Expand All @@ -87,6 +104,7 @@ $(PPETOOLS_OBJDIR):
.PHONY : needed_images
needed_images: $(NEEDED_IMAGES)

ifndef OPOCC_GPU_SUPPORT
.PHONY : combineImage
combineImage: $(NEEDED_IMAGES)
rm -rf $(IMAGEFILE)
Expand All @@ -97,6 +115,18 @@ combineImage: $(NEEDED_IMAGES)
$(OBJDIR)/$(OCC_GPE1_IMAGE_NAME)/$(OCC_GPE1_IMAGE_NAME).bin \
t2 \
`md5sum $(OBJDIR)/$(OCC_405_IMAGE_NAME)/$(OCC_405_IMAGE_NAME).bin | cut -c 1-4`
else
.PHONY : combineImage
combineImage: $(NEEDED_IMAGES)
rm -rf $(IMAGEFILE)
BASE_OBJDIR=$(BASE_OBJDIR) $(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(IMAGE_HDR_SCRIPT) \
$(OBJDIR)/$(OCC_BOOTLOADER_DIR_NAME)/$(OCC_BOOTLOADER_NAME).bin \
$(OBJDIR)/$(OCC_405_IMAGE_NAME)/$(OCC_405_IMAGE_NAME).bin \
$(OBJDIR)/$(OCC_GPE0_IMAGE_NAME)/$(OCC_GPE0_IMAGE_NAME).bin \
$(BASE_BINDIR)/$(OCC_GPE1_IMAGE_NAME).bin \
t2 \
`md5sum $(OBJDIR)/$(OCC_405_IMAGE_NAME)/$(OCC_405_IMAGE_NAME).bin | cut -c 1-4`
endif

#clean the obj directory
.PHONY : clean
Expand Down
2 changes: 1 addition & 1 deletion src/occ_405/main.c
Expand Up @@ -306,7 +306,7 @@ void occ_hw_error_isr(void *private, SsxIrqId irq, int priority)
//set bit 50 of the OCC LFIR so that the PRDF component will log an error and callout the processor
//TMGT will also see a problem and log an error but it will be informational.

// TODO: Determine how to set this without a SCOM.
// TODO: Determine how to set this without a SCOM. (RTC 134619)

//Halt occ so that hardware will enter safe mode
OCC_HALT(ERRL_RC_OCC_HW_ERROR);
Expand Down

0 comments on commit 261681f

Please sign in to comment.