summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/runtime
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-09-17 16:05:23 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-17 11:18:29 -0500
commit63245d62a4ffe99ad2eaf6b4f1a88862065ceedf (patch)
tree96d359d201573efda392b6ed89287c458cd34acc /src/usr/targeting/runtime
parentd3c269a1dcc30483654ae1f3ec37e842880c7db4 (diff)
downloadblackbird-hostboot-63245d62a4ffe99ad2eaf6b4f1a88862065ceedf.tar.gz
blackbird-hostboot-63245d62a4ffe99ad2eaf6b4f1a88862065ceedf.zip
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 <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/runtime')
-rw-r--r--src/usr/targeting/runtime/attrrp_rt.C37
-rw-r--r--src/usr/targeting/runtime/makefile38
-rw-r--r--src/usr/targeting/runtime/start_rt.C37
-rw-r--r--src/usr/targeting/runtime/test/makefile29
-rw-r--r--src/usr/targeting/runtime/test/testtargeting.H45
5 files changed, 186 insertions, 0 deletions
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 <targeting/attrrp.H>
+#include <targeting/common/trace.H>
+#include <util/align.H>
+
+#include "../attrrp_common.C"
+
+
+namespace TARGETING
+{
+ void* AttrRP::getBaseAddress(const NODE_ID i_nodeIdUnused)
+ {
+ return reinterpret_cast<void*>(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 <targeting/common/commontargeting.H>
+#include <targeting/common/targetservice.H>
+
+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 <cxxtest/TestSuite.H>
+#include <targeting/common/commontargeting.H>
+
+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<ATTR_PHYS_PATH>().dump();
+ }
+};
OpenPOWER on IntegriCloud