[Skiboot] [PATCH 1/2] opal-prd: Add get_prd_flags to host interfaces

Daniel M Crowell dcrowell at us.ibm.com
Tue Sep 13 23:53:06 AEST 2016


Don't call it "prd". That is a misleading name that only your team 
understands the way you are trying to use it.  PRD is just one of the 
functions provided inside HBRT (which you execute under the opal-prd 
application). 

Also, it doesn't seem like we're planning to support a feature list here, 
so maybe the name should reflect that this is really just to handle fixes.

How about just "get_fix_list"?

> containing the relevant OPAL_PRD_FLAGS_
Remember that we support PHYP now with the same code so we have to think 
commonality.  I'll assume that the master copy (steady state) of these 
flags will be the version inside of the hostboot code.

--
Dan Crowell
Senior Software Engineer - Power Systems Enablement Firmware
IBM Rochester: t/l 553-2987
dcrowell at us.ibm.com



From:   Jeremy Kerr <jk at ozlabs.org>
To:     skiboot at lists.ozlabs.org, Daniel M Crowell/Rochester/IBM at IBMUS
Cc:     Benjamin Herrenschmidt <benh at kernel.crashing.org>, Jeremy Kerr 
<jk at ozlabs.org>
Date:   09/12/2016 11:28 PM
Subject:        [PATCH 1/2] opal-prd: Add get_prd_flags 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_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





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20160913/0a638adb/attachment.html>


More information about the Skiboot mailing list