From 3efc51f7809647c79d59b7d0af6dea73ad0d9019 Mon Sep 17 00:00:00 2001 From: spashabk-in Date: Wed, 24 May 2017 07:49:44 -0500 Subject: [Whitelist/Blacklist] - Files addition Adding new files in SBE build and compilation unit Change-Id: Ia19c0a2944ec46b88e657f2aa11cf302da34837f RTC: 174252 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40908 Tested-by: Jenkins Server Reviewed-by: Sachin Gupta Reviewed-by: AMIT J. TENDOLKAR --- src/build/Makefile | 9 ++++++--- src/build/img_defs.mk | 8 ++++++++ src/build/security/securityRegListGen.py | 24 ++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/build/security/securityRegListGen.py diff --git a/src/build/Makefile b/src/build/Makefile index f38f6ae3..b0dc7c8b 100644 --- a/src/build/Makefile +++ b/src/build/Makefile @@ -167,12 +167,12 @@ $(LINK_SCRIPT_SBE): $(LINKER_DIR)/linksbe.cmd endif ifeq ($(img), pibmem) -all: $(OBJDIR) xml \ +all: $(OBJDIR) xml security\ $(IMG_DIR)/$(IMAGE_SBE_NAME).bin \ symbols tracehash endif ifeq ($(img), seeprom) -all: $(OBJDIR) xml $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin \ +all: $(OBJDIR) xml security $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin \ $(SBE_TOOLS) $(SBE_IPL_TOOLS) normalize compress defaultset $(IMG_DIR)/fixed.bin \ appendloader appendoverrides add_LoaderAddr symbols tracehash buildinfo \ report @@ -197,7 +197,7 @@ tar: @echo "Generated simics.tar in Sbe images Directory" .PHONY: all normalize compress defaultset appendloader add_LoaderAddr symbols report \ - appendoverrides xml tracehash topfixedheaders $(SUBDIRS) _sbefw_seeprom \ + appendoverrides xml security tracehash topfixedheaders $(SUBDIRS) _sbefw_seeprom \ tar install buildinfo: $(P9_XIP_TOOL) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin @@ -292,6 +292,9 @@ defaultset:$(SBE_TOOLS) $(IMG_DIR)/$(IMAGE_SEEPROM_NAME).bin normalize ppe_trace_bin: $(MAKE) -I $(INCLUDES) -C $(PPETRACEPP_DIR) -f Makefile #$(PK trace util) +# generate whitelist and blacklist security algorithm +security: + python $(SECURITY_SRC_DIR)/securityRegListGen.py -f $(SECURITY_LIST) -o $(GENFILES_DIR) # Build hwp_error_info.H. If the script fails then print the contents of # the header and then delete whatever garbage the script left to force it to diff --git a/src/build/img_defs.mk b/src/build/img_defs.mk index 7c675468..f1a50371 100644 --- a/src/build/img_defs.mk +++ b/src/build/img_defs.mk @@ -319,6 +319,14 @@ ifndef OBJDIR-ARRAYACCESS export OBJDIR-ARRAYACCESS = $(BASE_OBJDIR)/arrayaccess endif +ifndef SECURITY_SRC_DIR +export SECURITY_SRC_DIR = $(BUILD_DIR)/security +endif + +ifndef SECURITY_LIST +export SECURITY_LIST = $(IMPORT_SRCDIR)/chips/p9/security/p9_security_white_black_list.csv +endif + ifndef CROSS_COMPILER_PATH $(warning The CROSS_COMPILER_PATH variable is not defined; Defaulting to IBM CTE tools path) export CROSS_COMPILER_PATH = /afs/awd/projects/cte/tools/ppetools/prod diff --git a/src/build/security/securityRegListGen.py b/src/build/security/securityRegListGen.py new file mode 100644 index 00000000..04a2103f --- /dev/null +++ b/src/build/security/securityRegListGen.py @@ -0,0 +1,24 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/build/security/securityRegListGen.py $ +# +# OpenPOWER sbe Project +# +# Contributors Listed Below - COPYRIGHT 2017 +# +# +# 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 +print "Hello World" -- cgit v1.2.1