diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2016-04-19 16:24:25 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-25 16:02:30 -0400 |
commit | b24c53c78faff4a6ef41232d1ae742d28045e354 (patch) | |
tree | 0ced340c2ab7bd3e4a4dd7ae79b1b210a09d42c3 /src/usr | |
parent | 9624de19f81da674e87a9fbc697f98fbcf43fb9d (diff) | |
download | talos-hostboot-b24c53c78faff4a6ef41232d1ae742d28045e354.tar.gz talos-hostboot-b24c53c78faff4a6ef41232d1ae742d28045e354.zip |
Build FAPI2 into HBRT image
Change-Id: I3567d4d534a26edd33810f6b3a5c033507ffc119
RTC:145237
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23441
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/fapi2/fapi2.mk | 16 | ||||
-rwxr-xr-x | src/usr/fapi2/makefile | 19 | ||||
-rwxr-xr-x | src/usr/fapi2/runtime/makefile | 42 | ||||
-rw-r--r-- | src/usr/fapi2/runtime/test/makefile | 38 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2GetChildrenTest.H | 9 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2HwAccessTest.H | 1 | ||||
-rw-r--r-- | src/usr/fapi2/test/fapi2Test.mk | 47 | ||||
-rw-r--r-- | src/usr/fapi2/test/makefile | 26 | ||||
-rw-r--r-- | src/usr/testcore/rtloader/loader.H | 20 |
9 files changed, 174 insertions, 44 deletions
diff --git a/src/usr/fapi2/fapi2.mk b/src/usr/fapi2/fapi2.mk index 0df698bef..05d97ae52 100755 --- a/src/usr/fapi2/fapi2.mk +++ b/src/usr/fapi2/fapi2.mk @@ -27,10 +27,17 @@ # # @brief Makefile for fapi2 module # +GENPATH?=$(ROOTPATH)/obj/genfiles EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ +EXTRAINCDIR += $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/ + +include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk +define __CLEAN_TARGET +CLEAN_TARGETS += $(1) +endef #Hostboot objects OBJS += plat_utils.o @@ -97,5 +104,14 @@ $(call GENPLUGINTARGET, ${PLAT_HWP_ERR_PARSER}) : \ GEN_PASS_BODY += $(GEN_TARGETS) CLEAN_TARGETS += $(GEN_TARGETS) +include ${ROOTPATH}/procedure.rules.mk +include ${ROOTPATH}/src/import/tools/build/common.dir/script.rules.mk +include ${ROOTPATH}/src/import/hwpf/fapi2/tools/parseErrorInfo.mk +include ${ROOTPATH}/src/import/hwpf/fapi2/tools/parseAttributeInfo.mk +include ${ROOTPATH}/src/import/hwpf/fapi2/tools/createIfAttrService.mk +include $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.mk +include $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.mk + VPATH += ${ROOTPATH}/src/import/hwpf/fapi2/src/ +VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ VPATH += ${GENPATH} diff --git a/src/usr/fapi2/makefile b/src/usr/fapi2/makefile index c9cdbe759..d6d9fd509 100755 --- a/src/usr/fapi2/makefile +++ b/src/usr/fapi2/makefile @@ -29,28 +29,13 @@ # ROOTPATH = ../../.. -GENPATH?=$(ROOTPATH)/obj/genfiles MODULE = fapi2 SUBDIRS += test.d - -EXTRAINCDIR += $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/ - -include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk -define __CLEAN_TARGET -CLEAN_TARGETS += $(1) -endef +SUBDIRS += runtime.d include fapi2.mk -include ${ROOTPATH}/procedure.rules.mk -include ${ROOTPATH}/src/import/tools/build/common.dir/script.rules.mk -include ${ROOTPATH}/src/import/hwpf/fapi2/tools/parseErrorInfo.mk -include ${ROOTPATH}/src/import/hwpf/fapi2/tools/parseAttributeInfo.mk -include ${ROOTPATH}/src/import/hwpf/fapi2/tools/createIfAttrService.mk -include $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket.mk -include $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucket_attr.mk - include ${ROOTPATH}/config.mk -vpath %.C ${GENDIR} $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/ +vpath %.C ${GENDIR} diff --git a/src/usr/fapi2/runtime/makefile b/src/usr/fapi2/runtime/makefile new file mode 100755 index 000000000..6d56a3cf4 --- /dev/null +++ b/src/usr/fapi2/runtime/makefile @@ -0,0 +1,42 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/fapi2/runtime/makefile $ +# +# OpenPOWER HostBoot 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 +# +# @file src/usr/fapi2/runtime/makefile +# +# @brief Makefile rule for runtime fapi2 module +# + +HOSTBOOT_RUNTIME = 1 +ROOTPATH = ../../../.. + +MODULE = fapi2_rt + +SUBDIRS += test.d + +include ../fapi2.mk + +include ${ROOTPATH}/config.mk + +VPATH += .. diff --git a/src/usr/fapi2/runtime/test/makefile b/src/usr/fapi2/runtime/test/makefile new file mode 100644 index 000000000..8fe452e7b --- /dev/null +++ b/src/usr/fapi2/runtime/test/makefile @@ -0,0 +1,38 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/fapi2/runtime/test/makefile $ +# +# OpenPOWER HostBoot 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 +# @file src/usr/fapi2/runtime/test/makefile +# +# @brief Makefile for fapi2 runtime test directory +# +HOSTBOOT_RUNTIME = 1 +ROOTPATH = ../../../../.. +MODULE = testfapi2_rt + +include ../../test/fapi2Test.mk + +include ${ROOTPATH}/config.mk + +VPATH += ../../test/ + diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H index 569406de4..ee745769e 100644 --- a/src/usr/fapi2/test/fapi2GetChildrenTest.H +++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H @@ -35,6 +35,9 @@ #include <error_scope.H> +namespace fapi2 +{ + class Fapi2GetChildrenTest : public CxxTest::TestSuite { public: @@ -92,10 +95,10 @@ void test_fapi2GetChildren() break; } - TARGETING::Target* targeting_targets[NUM_TARGETS]; + TARGETING::Target* targeting_targets[fapi2::NUM_TARGETS]; generateTargets(l_nimbusProc, targeting_targets); - for( uint64_t x = 0; x < NUM_TARGETS; x++ ) + for( uint64_t x = 0; x < fapi2::NUM_TARGETS; x++ ) { if(targeting_targets[x] == NULL) { @@ -448,3 +451,5 @@ void test_fapi2GetChildren() }; + +} // namespace fapi2 diff --git a/src/usr/fapi2/test/fapi2HwAccessTest.H b/src/usr/fapi2/test/fapi2HwAccessTest.H index 8241c0cd3..55c90d66e 100644 --- a/src/usr/fapi2/test/fapi2HwAccessTest.H +++ b/src/usr/fapi2/test/fapi2HwAccessTest.H @@ -43,6 +43,7 @@ #include <hwpf_fapi2_reasoncodes.H> #include <fapi2TestUtils.H> #include <p9_hwtests.H> +#include <plat_hwp_invoker.H> diff --git a/src/usr/fapi2/test/fapi2Test.mk b/src/usr/fapi2/test/fapi2Test.mk new file mode 100644 index 000000000..5acdb7802 --- /dev/null +++ b/src/usr/fapi2/test/fapi2Test.mk @@ -0,0 +1,47 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/fapi2/test/fapi2Test.mk $ +# +# OpenPOWER HostBoot 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 +# +# @file src/usr/fapi2/test/fapi2Test.mk +# +# @brief Common makefile for fapi2 and runtime test directory +# + +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ +EXTRAINCDIR += ${ROOTPATH}/src/usr/fapi2/test/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common/ + +# Procedures +OBJS += p9_sample_procedure.o +OBJS += p9_hwtests.o +OBJS += fapi2TestUtils.o + +TESTS += ${ROOTPATH}/src/usr/fapi2/test/*Test.H +TESTS += ${ROOTPATH}/src/usr/fapi2/test/*TestCxx.H + +VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ diff --git a/src/usr/fapi2/test/makefile b/src/usr/fapi2/test/makefile index 472c748e4..1ed52b78b 100644 --- a/src/usr/fapi2/test/makefile +++ b/src/usr/fapi2/test/makefile @@ -29,31 +29,9 @@ ROOTPATH = ../../../.. MODULE = testfapi2 -EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ -EXTRAINCDIR += ${ROOTPATH}/src/usr/fapi2/test/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common/ - - -# Procedures -OBJS += p9_sample_procedure.o -OBJS += p9_hwtests.o -OBJS += fapi2TestUtils.o - - -TESTS += fapi2HwpTest.H -TESTS += fapi2HwAccessTest.H -TESTS += fapi2GetParentTest.H -TESTS += fapi2GetChildrenTest.H -TESTS += fapi2BasicTryTest.H -TESTS += fapi2GetOtherEndTest.H -TESTS += fapi2SpdTestCxx.H -TESTS += fapi2MvpdTestCxx.H +include fapi2Test.mk include ${ROOTPATH}/config.mk -vpath %.C ${GENDIR} ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ +vpath %.C ${GENDIR} diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H index aec064494..006647811 100644 --- a/src/usr/testcore/rtloader/loader.H +++ b/src/usr/testcore/rtloader/loader.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* Contributors Listed Below - COPYRIGHT 2013,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -212,6 +212,15 @@ class RuntimeLoaderTest : public CxxTest::TestSuite *data64 = 0; } + // Fail on these addresses + // On real HW they would cause an error + // The test that sends these expects an error + if( addr == 0x11223344 || + addr == 0x22334455 ) + { + rc = 1; + } + return rc; } @@ -231,6 +240,15 @@ class RuntimeLoaderTest : public CxxTest::TestSuite SCOM_KEY scomKey(chipid,addr); cv_scomMap[scomKey] = *data64; + // Fail on these addresses + // On real HW they would cause an error + // The test that sends these expects an error + if( addr == 0x11223344 || + addr == 0x22334455 ) + { + rc = 1; + } + return rc; } |