From 63245d62a4ffe99ad2eaf6b4f1a88862065ceedf Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 17 Sep 2013 16:05:23 -0500 Subject: Port Targeting to Hostboot Runtime. Change-Id: I29ce91dce52d1c6ff6df131ae0b94bf3c4ab99f2 RTC: 79408 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6262 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/usr/targeting/runtime/attrrp_rt.C | 37 +++++++++++++++++++++ src/usr/targeting/runtime/makefile | 38 ++++++++++++++++++++++ src/usr/targeting/runtime/start_rt.C | 37 +++++++++++++++++++++ src/usr/targeting/runtime/test/makefile | 29 +++++++++++++++++ src/usr/targeting/runtime/test/testtargeting.H | 45 ++++++++++++++++++++++++++ 5 files changed, 186 insertions(+) create mode 100644 src/usr/targeting/runtime/attrrp_rt.C create mode 100644 src/usr/targeting/runtime/makefile create mode 100644 src/usr/targeting/runtime/start_rt.C create mode 100644 src/usr/targeting/runtime/test/makefile create mode 100644 src/usr/targeting/runtime/test/testtargeting.H (limited to 'src/usr/targeting/runtime') diff --git a/src/usr/targeting/runtime/attrrp_rt.C b/src/usr/targeting/runtime/attrrp_rt.C new file mode 100644 index 000000000..4cf168133 --- /dev/null +++ b/src/usr/targeting/runtime/attrrp_rt.C @@ -0,0 +1,37 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/targeting/runtime/attrrp_rt.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#include +#include +#include + +#include "../attrrp_common.C" + + +namespace TARGETING +{ + void* AttrRP::getBaseAddress(const NODE_ID i_nodeIdUnused) + { + return reinterpret_cast(VMM_VADDR_ATTR_RP); + } + +} diff --git a/src/usr/targeting/runtime/makefile b/src/usr/targeting/runtime/makefile new file mode 100644 index 000000000..9efa9547f --- /dev/null +++ b/src/usr/targeting/runtime/makefile @@ -0,0 +1,38 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/targeting/runtime/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2013 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END_TAG +HOSTBOOT_RUNTIME = 1 +ROOTPATH = ../../../.. +MODULE = targeting_rt + +SUBDIRS = test.d + +TARGETING_REL_PATH = .. +include ${TARGETING_REL_PATH}/hostboot_common.mk +vpath %.C ${TARGETING_REL_PATH} + +HOSTBOOT_RUNTIME_SPECIFIC_OBJS = attrrp_rt.o start_rt.o targplatutil.o + +OBJS = ${COMMON_TARGETING_OBJS} ${HOSTBOOT_RUNTIME_SPECIFIC_OBJS} + +include $(ROOTPATH)/config.mk +vpath %.C ${GENDIR} diff --git a/src/usr/targeting/runtime/start_rt.C b/src/usr/targeting/runtime/start_rt.C new file mode 100644 index 000000000..d0cef38a7 --- /dev/null +++ b/src/usr/targeting/runtime/start_rt.C @@ -0,0 +1,37 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/targeting/runtime/start_rt.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#include +#include + +namespace TARGETING +{ + static void initTargeting() __attribute__((constructor)); + static void initTargeting() + { + //@TODO: RTC 87716: Init attr RP. + //AttrRP::init(); + + TargetService& l_targetService = targetService(); + (void)l_targetService.init(); + } +} diff --git a/src/usr/targeting/runtime/test/makefile b/src/usr/targeting/runtime/test/makefile new file mode 100644 index 000000000..7f9a5735e --- /dev/null +++ b/src/usr/targeting/runtime/test/makefile @@ -0,0 +1,29 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/targeting/runtime/test/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2013 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END_TAG +HOSTBOOT_RUNTIME = 1 +ROOTPATH = ../../../../.. + +MODULE = testtargeting_rt +TESTS = *.H + +include ${ROOTPATH}/config.mk diff --git a/src/usr/targeting/runtime/test/testtargeting.H b/src/usr/targeting/runtime/test/testtargeting.H new file mode 100644 index 000000000..d68ade369 --- /dev/null +++ b/src/usr/targeting/runtime/test/testtargeting.H @@ -0,0 +1,45 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/targeting/runtime/test/testtargeting.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#include +#include + +class TargetingTestSuite : public CxxTest::TestSuite +{ + public: + void testTopLevelTarget() + { + using namespace TARGETING; + + TargetService& l_targetService = targetService(); + + TARGETING::Target* l_pTarget = NULL; + (void) l_targetService.getTopLevelTarget(l_pTarget); + if (l_pTarget == NULL) + { + TS_FAIL("Top level target handle is NULL"); + return; + } + + (void)l_pTarget->getAttr().dump(); + } +}; -- cgit v1.2.3