diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-05-28 11:17:21 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-03 10:28:57 +1000 |
commit | b6fce51e31703ea95bf8dede4d9dc1f2dcd56639 (patch) | |
tree | 8adb26aaefce4bf3cbc9f2272a099b6e4fc1a0db /doc/opal-api/opal-messages.rst | |
parent | 66d0ad68687bb12f7fb4301652f434f886998bdf (diff) | |
download | skiboot-b6fce51e31703ea95bf8dede4d9dc1f2dcd56639.zip skiboot-b6fce51e31703ea95bf8dede4d9dc1f2dcd56639.tar.gz skiboot-b6fce51e31703ea95bf8dede4d9dc1f2dcd56639.tar.bz2 |
opal-msg: Enhance opal-get-msg API
Linux uses opal_get_msg (OPAL_GET_MSG) API to get OPAL messages. This interface
supports upto 8 params (64 bytes). We have a requirement to send bigger data to
Linux. This patch enhances OPAL to send bigger data to Linux.
- Linux will use "opal-msg-size" device tree property to allocate memory for
OPAL messages (previous patch increased "opal-msg-size" to 64K).
- Replaced `reserved` field in "struct opal_msg" with `size`. So that Linux
side opal_get_msg user can detect actual data size.
- If buffer size < actual message size, then opal_get_msg will copy partial
data and return OPAL_PARTIAL to Linux.
- Add new variable "extended" to "opal_msg_entry" structure to keep track
of messages that has more than 64byte data. We will allocate separate
memory for these messages and once kernel consumes message we will
release that memory.
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'doc/opal-api/opal-messages.rst')
-rw-r--r-- | doc/opal-api/opal-messages.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/opal-api/opal-messages.rst b/doc/opal-api/opal-messages.rst index 7843b69..c7b2e5c 100644 --- a/doc/opal-api/opal-messages.rst +++ b/doc/opal-api/opal-messages.rst @@ -11,7 +11,7 @@ An opal_msg is: :: struct opal_msg { __be32 msg_type; - __be32 reserved; + __be32 size; __be64 params[8]; }; @@ -21,8 +21,9 @@ define all eight parameters, the value in the undefined parameters is undefined, although can safely be memcpy()d or otherwise moved. In the device tree, there's an opal-msg-size property of the OPAL node that -says the size of a struct opal-msg. In the future, OPAL may support larger -messages. See ``OPAL_GET_MESSAGE`` documentation for details. +says the size of a struct opal-msg. Kernel will use this property to allocate +memory for opal_msg structure. See ``OPAL_GET_MESSAGE`` documentation for +details. :: ibm,opal { |