From 0778dd94de984eacdab30de6c2db7875671cc28f Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 12 May 2017 15:40:46 -0500 Subject: Updates to HBRT runtime interfaces Reconciling P9 function table with P8 table to make opal-prd work. Added new entries for: - firmware_request - get_ipoll_events - firmware_notify Added in entries for P8 functions: - get_interface_capabilities Added deprecated placeholders for P8 functions: - occ_load - occ_start - occ_stop Moved entries for: - load_pm_complex - start_pm_complex - reset_pm_complex Change-Id: I1892b4465a6e5901aa9eaa6a49e139a4bc4c5b56 CMVC-Prereq: 1026011 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40467 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/runtime/rt_main.C | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/runtime') 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; } -- cgit v1.2.3