[Skiboot] [PATCH 1/7] core/opal: Increase opal-msg-size size

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Thu Mar 28 22:18:15 AEDT 2019


Kernel will use `opal-msg-size` property to allocate memory for opal_msg.
We want to send bigger data from OPAL to kernel. Hence increase
opal-msg-size to 64K.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 core/opal.c        | 2 +-
 include/opal-msg.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/opal.c b/core/opal.c
index 624e2a255..3a2fbb95b 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -416,7 +416,7 @@ void add_opal_node(void)
 		dt_add_property_strings(opal_node, "compatible", "ibm,opal-v3");
 
 	dt_add_property_cells(opal_node, "opal-msg-async-num", OPAL_MAX_ASYNC_COMP);
-	dt_add_property_cells(opal_node, "opal-msg-size", sizeof(struct opal_msg));
+	dt_add_property_cells(opal_node, "opal-msg-size", OPAL_MSG_SIZE);
 	dt_add_property_u64(opal_node, "opal-base-address", base);
 	dt_add_property_u64(opal_node, "opal-entry-address", entry);
 	dt_add_property_u64(opal_node, "opal-runtime-size", size);
diff --git a/include/opal-msg.h b/include/opal-msg.h
index 74163c47d..86b6d616e 100644
--- a/include/opal-msg.h
+++ b/include/opal-msg.h
@@ -27,6 +27,9 @@
  */
 #define OPAL_MAX_ASYNC_COMP	16
 
+/* Max size of struct opal_msg */
+#define OPAL_MSG_SIZE		(64 * 1024)
+
 int _opal_queue_msg(enum opal_msg_type msg_type, void *data,
 		    void (*consumed)(void *data), size_t num_params,
 		    const u64 *params);
-- 
2.14.3



More information about the Skiboot mailing list