summaryrefslogtreecommitdiffstats
path: root/src/runtime/rt_main.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/rt_main.C')
-rw-r--r--src/runtime/rt_main.C26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/runtime/rt_main.C b/src/runtime/rt_main.C
index d9a21c9b8..d53901850 100644
--- a/src/runtime/rt_main.C
+++ b/src/runtime/rt_main.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -70,6 +70,27 @@ extern "C"
*/
runtimeInterfaces_t* rt_start(hostInterfaces_t*) NEVER_INLINE;
+
+/** @fn rt_version_fixup
+ *
+ * @brief Make any adjustments needed to handle old versions
+ */
+void rt_version_fixup( void )
+{
+ uint64_t hostver = g_hostInterfaces->interfaceVersion;
+ if( HOSTBOOT_RUNTIME_INTERFACE_VERSION == hostver )
+ {
+ return; //nothing to do, we match
+ }
+
+ char verstring[100];
+ sprintf( verstring,
+ "HRBT Ver=%X, HostVer=%X\n",
+ HOSTBOOT_RUNTIME_INTERFACE_VERSION,
+ hostver );
+ (g_hostInterfaces->puts)(verstring);
+}
+
/** Call C++ constructors present in this image. */
void rt_cppBootstrap();
@@ -111,6 +132,9 @@ runtimeInterfaces_t* rt_start(hostInterfaces_t* intf)
postInitCalls_t* rtPost = getPostInitCalls();
rtPost->callApplyTempOverrides();
+ // do any version mismatch fixups
+ rt_version_fixup();
+
// Return our interface pointer structure.
return rtInterfaces;
}
OpenPOWER on IntegriCloud