summaryrefslogtreecommitdiffstats
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/rt_main.C13
-rw-r--r--src/runtime/rt_start.S10
-rw-r--r--src/runtime/rt_vfs.C8
3 files changed, 25 insertions, 6 deletions
diff --git a/src/runtime/rt_main.C b/src/runtime/rt_main.C
index 910a0d1d8..038a58e9f 100644
--- a/src/runtime/rt_main.C
+++ b/src/runtime/rt_main.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013 */
+/* COPYRIGHT International Business Machines Corp. 2013,2014 */
/* */
/* p1 */
/* */
@@ -78,7 +78,10 @@ runtimeInterfaces_t* _main(hostInterfaces_t* intf, uint64_t base)
i < ALIGN_PAGE_DOWN((uint64_t)&data_load_address);
i += PAGESIZE)
{
- (intf->set_page_execute)(reinterpret_cast<void*>(i));
+ if (NULL != intf->set_page_execute)
+ {
+ (intf->set_page_execute)(reinterpret_cast<void*>(i));
+ }
}
// Tail-recurse to real entry point.
@@ -95,11 +98,15 @@ runtimeInterfaces_t* rt_start(hostInterfaces_t* intf)
// Call C++ constructors.
rt_cppBootstrap();
+ // Initialize runtime interfaces.
+ runtimeInterfaces_t* rtInterfaces = getRuntimeInterfaces();
+ rtInterfaces->interfaceVersion = HOSTBOOT_RUNTIME_INTERFACE_VERSION;
+
// Initialize all modules.
vfs_module_init();
// Return our interface pointer structure.
- return getRuntimeInterfaces();
+ return rtInterfaces;
}
void rt_cppBootstrap()
diff --git a/src/runtime/rt_start.S b/src/runtime/rt_start.S
index cea710b57..a8356fc27 100644
--- a/src/runtime/rt_start.S
+++ b/src/runtime/rt_start.S
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2013
+# COPYRIGHT International Business Machines Corp. 2013,2014
#
# p1
#
@@ -22,8 +22,16 @@
# IBM_PROLOG_END_TAG
.include "kernel/ppcconsts.S"
+#define __HOSTBOOT_RUNTIME_INTERFACE_VERSION_ONLY 1
+#include <runtime/interface.h>
+
.section .text.intvects
+.org 0x0;
+hbrt_desired_interface_version:
+ .quad 0x4842525456455253 # 'HBRTVERS' eyecatch.
+ .quad HOSTBOOT_RUNTIME_INTERFACE_VERSION
+
.org 0x100;
_init:
mflr r10 # Save LR
diff --git a/src/runtime/rt_vfs.C b/src/runtime/rt_vfs.C
index 73f381313..5477c8ac6 100644
--- a/src/runtime/rt_vfs.C
+++ b/src/runtime/rt_vfs.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013 */
+/* COPYRIGHT International Business Machines Corp. 2013,2014 */
/* */
/* p1 */
/* */
@@ -44,7 +44,11 @@ void vfs_module_init()
i < (uint64_t)module->data;
i += PAGESIZE)
{
- g_hostInterfaces->set_page_execute(reinterpret_cast<void*>(i));
+ if (g_hostInterfaces->set_page_execute)
+ {
+ g_hostInterfaces->set_page_execute(
+ reinterpret_cast<void*>(i));
+ }
}
}
OpenPOWER on IntegriCloud