diff mbox

[RFC,1/2] opal-prd: Add get_ipoll_events HBRT callback

Message ID 1493876219-28583-1-git-send-email-jk@ozlabs.org
State RFC
Headers show

Commit Message

Jeremy Kerr May 4, 2017, 5:36 a.m. UTC
This change adds a get_ipoll_events callback, allowing the opal-prd
wrapper to query the set of events to enable in the INIT message.

RFC only at this stage, as we need to sync with the HBRT implementation.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
CC: Daniel M Crowell <dcrowell@us.ibm.com>
CC: Zane Shelley <zshelle@us.ibm.com>
CC: Brian Stegmiller <bjs@us.ibm.com>
CC: William G Hoffa <wghoffa@us.ibm.com>

---
Dan, Zane, Brian, Bill: this is the added callback for allowing HBRT to
specify the IPOLL events that we enable. I've modified the OPAL header
file here, but we'll need to make the actual change in the "official"
header.

---
 external/opal-prd/hostboot-interface.h | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Jeremy Kerr May 5, 2017, 1:28 a.m. UTC | #1
Hi Zane,

> What is static const uint64_t opal_prd_ipoll = 0xf000000000000000;? How
> is it used?

Once opal-prd has finished initialisation (including loading &
initialising HBRT), we send an "init" message to OPAL, telling it that
we're listening on the PRD channel for events.

That init message includes the IPOLL bits that should be enabled, to
define the events that we can handle. That's what opal_prd_ipoll is.

Existing opal-prd hard-codes that to 0xf00...00. This change allows HBRT
to define that mask instead, using the get_ipoll_events() callback.

Cheers,


Jeremy
diff mbox

Patch

diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h
index 3e73ef8..633d1a8 100644
--- a/external/opal-prd/hostboot-interface.h
+++ b/external/opal-prd/hostboot-interface.h
@@ -491,6 +491,21 @@  struct runtime_interfaces {
 	 */
 	int (*run_command)(int argc, const char **argv, char **o_outString);
 
+	/**
+	 * @brief	Query the IPOLL event mask supported by HBRT
+	 *
+	 * @details	This call allows the wrapper application to query
+	 * the ipoll event mask to set when the HBRT instance is running. Bits
+	 * that are *set* in this bitmask represent events that will be
+	 * forwarded to the handle_attn() callback.
+	 *
+	 * If this callback is not provided, the value 0xf000000000000000 will
+	 * be assumed.
+	 *
+	 * @param[out]	the IPOLL event bits to enable during HBRT execution
+	 */
+	uint64_t (*get_ipoll_events)(void);
+
 	/* Reserve some space for future growth. */
-	void (*reserved[29])(void);
+	void (*reserved[28])(void);
 };