From 9a3694c400f8c50da58459d0fbd91e3dc7a2ef28 Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Mon, 23 Feb 2015 13:59:58 -0600 Subject: Add history related to runtime padding Change-Id: I58a878834b89c340efc0872d7d78d6ff18f79a59 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15905 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton Reviewed-by: WILLIAM G. HOFFA Reviewed-by: A. Patrick Williams III --- src/include/runtime/interface.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/include/runtime/interface.h') diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 5279cb892..66c992591 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -222,7 +222,7 @@ typedef struct hostInterfaces /** * @brief Read data from an i2c device - * @param[in] i_master - chip, engine and port packed into + * @param[in] i_master - chip, engine and port packed into * a single 64-bit argument * --------------------------------------------------- * | chip | reserved | eng | port | @@ -233,7 +233,7 @@ typedef struct hostInterfaces * @param[in] i_offset - Offset within device to read * @param[in] i_length - Number of bytes to read * @param[out] o_data - Data that was read - * @return 0 on success else return code + * @return 0 on success else return code * @platform OpenPOWER */ int (*i2c_read)( uint64_t i_master, uint16_t i_devAddr, @@ -242,7 +242,7 @@ typedef struct hostInterfaces /** * @brief Write data to an i2c device - * @param[in] i_master - chip, engine and port packed into + * @param[in] i_master - chip, engine and port packed into * a single 64-bit argument * --------------------------------------------------- * | chip | reserved | eng | port | @@ -304,6 +304,21 @@ typedef struct hostInterfaces // Reserve some space for future growth. // do NOT ever change this number, even if you add functions. + // + // The 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 + // pointer can be NULL. So if we require a new interface from OPAL, like + // "read_iic", we need to be able to tolerate that function pointer being + // NULL and do something sane (and erroring out is not consider sane). + // + // The purpose of this is to give us the ability to update Hostboot and + // OPAL independently. It is pretty rare that we both have function ready + // at the same time. The "reserve" is there so that the structures are + // 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[32])(void); } hostInterfaces_t; -- cgit v1.2.1