Skip to content

Commit b950ea3

Browse files
mgloffdcrowell77
authored andcommitted
Concurrent code update of HBRT - Runtime Interface
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>
1 parent 01de349 commit b950ea3

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

src/include/runtime/interface.h

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838

3939
/** Current interface version.
40-
* 0x9001: 9=P9, 002=Version 2
40+
* 0x9002: 9=P9, 002=Version 2
4141
*/
4242
#define HOSTBOOT_RUNTIME_INTERFACE_VERSION 0x9002
4343

@@ -866,10 +866,22 @@ typedef struct runtimeInterfaces
866866
void (*firmware_notify)( uint64_t len,
867867
void *data );
868868

869+
/**
870+
* @brief Prepare for HBRT concurrent code update
871+
*
872+
* @details This call allows the Host to inform HBRT that a concurrent
873+
* code update has been initiated. HBRT then prepares updated targeting
874+
* data for use by the updated HBRT code.
875+
*
876+
* @return 0 on success else return code
877+
* @platform FSP
878+
*/
879+
int (*prepare_hbrt_update)( void );
880+
869881
// Reserve some space for future growth.
870-
// do NOT ever change this number, even if you add functions.
882+
// Currently are decrementing this number as we add functions.
871883
//
872-
// The value of 32 was somewhat arbitrarily chosen.
884+
// The initial value of 32 was somewhat arbitrarily chosen.
873885
//
874886
// If either side modifies the interface.h file we're suppose to be able to
875887
// tolerate the other side not supporting the function yet. The function
@@ -883,7 +895,7 @@ typedef struct runtimeInterfaces
883895
// allocated with sufficient space and populated with NULL function
884896
// pointers. 32 is big enough that we should not likely add that many
885897
// functions from either direction in between any two levels of support.
886-
void (*reserved[22])(void);
898+
void (*reserved[21])(void);
887899

888900
} runtimeInterfaces_t;
889901

src/usr/targeting/runtime/rt_targeting.C

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2014,2016 */
8+
/* Contributors Listed Below - COPYRIGHT 2014,2017 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -37,6 +37,7 @@
3737
#include <arch/pirformat.H>
3838
#include <runtime/customize_attrs_for_payload.H>
3939
#include <runtime/rt_targeting.H>
40+
#include <runtime/interface.h>
4041
#include <map>
4142
#include <util/memoize.H>
4243

@@ -171,4 +172,26 @@ errlHndl_t getHbTarget(
171172
return Util::Memoize::memoize(_getHbTarget,i_rtTargetId,o_target);
172173
}
173174

175+
int hbrt_update_prep(void)
176+
{
177+
int rc = 0;
178+
179+
return rc;
180+
}
181+
182+
//------------------------------------------------------------------------
183+
184+
struct registerRtTarg
185+
{
186+
registerRtTarg()
187+
{
188+
/* Do not register interface until HB is ready for Host to call it
189+
@TODO RTC: 181285 to enable the interface
190+
runtimeInterfaces_t * rt_intf = getRuntimeInterfaces();
191+
rt_intf->prepare_hbrt_update = &hbrt_update_prep; */
192+
}
193+
};
194+
195+
registerRtTarg g_registerRtTarg;
196+
174197
}; // End namespace RT_TARG

0 commit comments

Comments
 (0)