diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2016-09-15 09:52:31 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-09-16 16:20:13 +1000 |
commit | 3d41d2831a05d531f152e0f9c7fc223a82aee128 (patch) | |
tree | 420a6cc0cd4421c2854da717456b80f15a598a99 /external/opal-prd | |
parent | 0be6d5c53e89946ca12211a84a77a96b5540e9dc (diff) | |
download | talos-skiboot-3d41d2831a05d531f152e0f9c7fc223a82aee128.tar.gz talos-skiboot-3d41d2831a05d531f152e0f9c7fc223a82aee128.zip |
opal-prd: Add get_interface_capabilities to host interfaces
We need a way to indicate behaviour changes & fixes in the prd
interface, without requiring a major version bump.
This change introduces the get_interface_capabilities callback,
returning a bitmask of capability flags, pertaining to 'sets' of
capabilities. We currently return 0 for all.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
[stewart@linux.vnet.ibm.com: Dan Crowell says "The interface looks good to me"]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/opal-prd')
-rw-r--r-- | external/opal-prd/hostboot-interface.h | 16 | ||||
-rw-r--r-- | external/opal-prd/opal-prd.c | 5 | ||||
-rw-r--r-- | external/opal-prd/thunk.S | 3 |
3 files changed, 22 insertions, 2 deletions
diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h index 05fe0522..36d53a6b 100644 --- a/external/opal-prd/hostboot-interface.h +++ b/external/opal-prd/hostboot-interface.h @@ -41,6 +41,11 @@ enum MemoryError_t MEMORY_ERROR_UE = 1, }; +/* Capability sets, for get_interface_capabilities */ +#define HBRT_CAPS_SET0_COMMON 0 +#define HBRT_CAPS_SET1_OPAL 1 +#define HBRT_CAPS_SET2_PHYP 2 + struct host_interfaces { /** Interface version. */ uint64_t interface_version; @@ -277,8 +282,17 @@ struct host_interfaces { int (*memory_error)( uint64_t i_startAddr, uint64_t i_endAddr, enum MemoryError_t i_errorType ); + /** + * @brief Query the prd infrastructure for interface capabilities. + * @param[in] i_set The set of capabilites to retrieve + * + * @return a bitmask containing the relevant HBRT_CAPS_* for + * this implementation and the specified set. + */ + uint64_t (*get_interface_capabilities)(uint64_t i_set); + /* Reserve some space for future growth. */ - void (*reserved[32])(void); + void (*reserved[31])(void); }; struct runtime_interfaces { diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c index 18c6e499..245c957a 100644 --- a/external/opal-prd/opal-prd.c +++ b/external/opal-prd/opal-prd.c @@ -649,6 +649,11 @@ int hservice_memory_error(uint64_t i_start_addr, uint64_t i_endAddr, return 0; } +uint64_t hservice_get_interface_capabilities(uint64_t set) +{ + return 0; +} + int hservices_init(struct opal_prd_ctx *ctx, void *code) { uint64_t *s, *d; diff --git a/external/opal-prd/thunk.S b/external/opal-prd/thunk.S index f25afde9..f3551580 100644 --- a/external/opal-prd/thunk.S +++ b/external/opal-prd/thunk.S @@ -186,10 +186,11 @@ hinterface: CALLBACK_THUNK(hservice_i2c_write) CALLBACK_THUNK(hservice_ipmi_msg) CALLBACK_THUNK(hservice_memory_error) + CALLBACK_THUNK(hservice_get_interface_capabilities) .globl __hinterface_pad __hinterface_pad: /* Reserved space for future growth */ - .space 32*8,0 + .space 31*8,0 .globl __hinterface_end __hinterface_end: /* Eye catcher for debugging */ |