[Skiboot] [PATCH 1/2] opal-prd: Add get_prd_flags to host interfaces
Jeremy Kerr
jk at ozlabs.org
Tue Sep 13 14:27:26 AEST 2016
We need a way to indicate behaviour changes & fixes in the prd
interface, without requiring a major version bump.
This change introduces the get_prd_flags callback, returning a
bitmask of prd-specific flags. We currently return 0.
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
external/opal-prd/hostboot-interface.h | 10 +++++++++-
external/opal-prd/opal-prd.c | 5 +++++
external/opal-prd/thunk.S | 3 ++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h
index 05fe052..7729a5b 100644
--- a/external/opal-prd/hostboot-interface.h
+++ b/external/opal-prd/hostboot-interface.h
@@ -277,8 +277,16 @@ 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.
+ *
+ * @return a bitmask containing the relevant OPAL_PRD_FLAGS_* for
+ * this implementation.
+ */
+ uint64_t (*get_prd_flags)(void);
+
/* 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 18c6e49..775d9f1 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_prd_flags(void)
+{
+ 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 f25afde..58e98d7 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_prd_flags)
.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 */
--
2.7.4
More information about the Skiboot
mailing list