Skip to content

Commit

Permalink
Concurrent code update of HBRT - Runtime Interface
Browse files Browse the repository at this point in the history
Create the runtime interface for PHYP to call.

Change-Id: I1ec7ca2df4491b5a6fa83e12261679165d177a27
RTC: 180906
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48209
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mgloff authored and dcrowell77 committed Oct 20, 2017
1 parent 01de349 commit b950ea3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
20 changes: 16 additions & 4 deletions src/include/runtime/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/

/** Current interface version.
* 0x9001: 9=P9, 002=Version 2
* 0x9002: 9=P9, 002=Version 2
*/
#define HOSTBOOT_RUNTIME_INTERFACE_VERSION 0x9002

Expand Down Expand Up @@ -866,10 +866,22 @@ typedef struct runtimeInterfaces
void (*firmware_notify)( uint64_t len,
void *data );

/**
* @brief Prepare for HBRT concurrent code update
*
* @details This call allows the Host to inform HBRT that a concurrent
* code update has been initiated. HBRT then prepares updated targeting
* data for use by the updated HBRT code.
*
* @return 0 on success else return code
* @platform FSP
*/
int (*prepare_hbrt_update)( void );

// Reserve some space for future growth.
// do NOT ever change this number, even if you add functions.
// Currently are decrementing this number as we add functions.
//
// The value of 32 was somewhat arbitrarily chosen.
// The initial value of 32 was somewhat arbitrarily chosen.
//
// If either side modifies the interface.h file we're suppose to be able to
// tolerate the other side not supporting the function yet. The function
Expand All @@ -883,7 +895,7 @@ typedef struct runtimeInterfaces
// allocated with sufficient space and populated with NULL function
// pointers. 32 is big enough that we should not likely add that many
// functions from either direction in between any two levels of support.
void (*reserved[22])(void);
void (*reserved[21])(void);

} runtimeInterfaces_t;

Expand Down
25 changes: 24 additions & 1 deletion src/usr/targeting/runtime/rt_targeting.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2016 */
/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -37,6 +37,7 @@
#include <arch/pirformat.H>
#include <runtime/customize_attrs_for_payload.H>
#include <runtime/rt_targeting.H>
#include <runtime/interface.h>
#include <map>
#include <util/memoize.H>

Expand Down Expand Up @@ -171,4 +172,26 @@ errlHndl_t getHbTarget(
return Util::Memoize::memoize(_getHbTarget,i_rtTargetId,o_target);
}

int hbrt_update_prep(void)
{
int rc = 0;

return rc;
}

//------------------------------------------------------------------------

struct registerRtTarg
{
registerRtTarg()
{
/* Do not register interface until HB is ready for Host to call it
@TODO RTC: 181285 to enable the interface
runtimeInterfaces_t * rt_intf = getRuntimeInterfaces();
rt_intf->prepare_hbrt_update = &hbrt_update_prep; */
}
};

registerRtTarg g_registerRtTarg;

}; // End namespace RT_TARG

0 comments on commit b950ea3

Please sign in to comment.