<font size=2 face="sans-serif">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). </font><br><br><font size=2 face="sans-serif">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.</font><br><br><font size=2 face="sans-serif">How about just "get_fix_list"?</font><br><br><tt><font size=2>> containing the relevant OPAL_PRD_FLAGS_</font></tt><br><font size=2 face="sans-serif">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.</font><br><font size=2 face="sans-serif"><br>--<br>Dan Crowell<br>Senior Software Engineer - Power Systems Enablement Firmware<br>IBM Rochester: t/l 553-2987<br>dcrowell@us.ibm.com</font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Jeremy Kerr <jk@ozlabs.org></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">skiboot@lists.ozlabs.org,
Daniel M Crowell/Rochester/IBM@IBMUS</font><br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">Benjamin Herrenschmidt
<benh@kernel.crashing.org>, Jeremy Kerr <jk@ozlabs.org></font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">09/12/2016 11:28 PM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[PATCH 1/2]
opal-prd: Add get_prd_flags to host interfaces</font><br><hr noshade><br><br><br><tt><font size=2>We need a way to indicate behaviour changes &
fixes in the prd<br>interface, without requiring a major version bump.<br><br>This change introduces the get_prd_flags callback, returning a<br>bitmask of prd-specific flags. We currently return 0.<br><br>Signed-off-by: Jeremy Kerr <jk@ozlabs.org><br>---<br> external/opal-prd/hostboot-interface.h | 10 +++++++++-<br> external/opal-prd/opal-prd.c | 5
+++++<br> external/opal-prd/thunk.S |
3 ++-<br> 3 files changed, 16 insertions(+), 2 deletions(-)<br><br>diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h<br>index 05fe052..7729a5b 100644<br>--- a/external/opal-prd/hostboot-interface.h<br>+++ b/external/opal-prd/hostboot-interface.h<br>@@ -277,8 +277,16 @@ struct host_interfaces {<br> int
(*memory_error)( uint64_t i_startAddr, uint64_t i_endAddr,<br>
enum MemoryError_t i_errorType );<br> <br>+
/**<br>+
* @brief Query the prd infrastructure for interface capabilities.<br>+
*<br>+
* @return a bitmask containing the relevant OPAL_PRD_FLAGS_* for<br>+
*
this implementation.<br>+
*/<br>+
uint64_t (*get_prd_flags)(void);<br>+<br> /*
Reserve some space for future growth. */<br>-
void (*reserved[32])(void);<br>+
void (*reserved[31])(void);<br> };<br> <br> struct runtime_interfaces {<br>diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c<br>index 18c6e49..775d9f1 100644<br>--- a/external/opal-prd/opal-prd.c<br>+++ b/external/opal-prd/opal-prd.c<br>@@ -649,6 +649,11 @@ int hservice_memory_error(uint64_t i_start_addr, uint64_t
i_endAddr,<br> return
0;<br> }<br> <br>+uint64_t hservice_get_prd_flags(void)<br>+{<br>+
return 0;<br>+}<br>+<br> int hservices_init(struct opal_prd_ctx *ctx, void *code)<br> {<br> uint64_t
*s, *d;<br>diff --git a/external/opal-prd/thunk.S b/external/opal-prd/thunk.S<br>index f25afde..58e98d7 100644<br>--- a/external/opal-prd/thunk.S<br>+++ b/external/opal-prd/thunk.S<br>@@ -186,10 +186,11 @@ hinterface:<br> CALLBACK_THUNK(hservice_i2c_write)<br> CALLBACK_THUNK(hservice_ipmi_msg)<br> CALLBACK_THUNK(hservice_memory_error)<br>+
CALLBACK_THUNK(hservice_get_prd_flags)<br> .globl __hinterface_pad<br> __hinterface_pad:<br> /*
Reserved space for future growth */<br>-
.space 32*8,0<br>+
.space 31*8,0<br> .globl __hinterface_end<br> __hinterface_end:<br> /*
Eye catcher for debugging */<br>-- <br>2.7.4<br><br></font></tt><br><br><BR>