Message ID | 1470907757-18823-2-git-send-email-ppaidipe@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
On Thursday 11 August 2016 02:59 PM, ppaidipe@linux.vnet.ibm.com wrote: > From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> > > This patch adds documentation for OPAL_IPMI_SEND and OPAL_IPMI_RECV > > Changes in V2: > - Changes as per Mukesh's comment on V1 > - Combined opal_ipmi_send and opal_ipmi_recv into one file > - Removed the api names > - Replaced Arguments with Parameters > - Added :: before ``opal_ipmi_msg`` structure > > Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> > --- Ditto comment from 1/2. You could also mention the ``ipmi_msg`` structure declaration. Otherwise, Patch looks fine. Cheers, ~Mukesh > doc/opal-api/opal-ipmi-send-recv-107-108.rst | 105 +++++++++++++++++++++++++++ > 1 file changed, 105 insertions(+) > create mode 100644 doc/opal-api/opal-ipmi-send-recv-107-108.rst > > diff --git a/doc/opal-api/opal-ipmi-send-recv-107-108.rst b/doc/opal-api/opal-ipmi-send-recv-107-108.rst > new file mode 100644 > index 0000000..64b7589 > --- /dev/null > +++ b/doc/opal-api/opal-ipmi-send-recv-107-108.rst > @@ -0,0 +1,105 @@ > +OPAL_IPMI_SEND > +============== > +:: > + > + #define OPAL_IPMI_SEND 107 > + > +``OPAL_IPMI_SEND`` call converts host OS structure ``opal_ipmi_msg`` to an > +ipmi message structure ``ipmi_msg`` and it will send the ``msg`` into > +ipmi message list/queue which will be queued to service processor/management > +controller to parse and execute those ipmi commands. > + > +Parameters > +---------- > +:: > + > + uint64_t interface > + struct opal_ipmi_msg *opal_ipmi_msg > + uint64_t msg_len > + > +``interface`` > + ``interface`` parameter is the value from the ipmi interface node ``ibm,ipmi-interface-id`` > + > +``opal_ipmi_msg`` > + ``opal_ipmi_msg`` is the pointer to below structure ``opal_ipmi_msg`` > + > +:: > + > + struct opal_ipmi_msg { > + uint8_t version; > + uint8_t netfn; > + uint8_t cmd; > + uint8_t data[]; > + }; > + > +``msg_len`` > + ipmi message request size > + > +Return Values > +------------- > + > +``OPAL_SUCCESS`` > + ``msg`` queued successfully > + > +``OPAL_PARAMETER`` > + invalid ipmi message request length ``msg_len`` > + > +``OPAL_HARDWARE`` > + backend support is not present as block transfer/service processor ipmi routines are not > + initialized which are used for communication > + > +``OPAL_UNSUPPORTED`` > + in-correct opal ipmi message format version ``opal_ipmi_msg->version`` > + > +``OPAL_RESOURCE`` > + insufficient resources to create ``ipmi_msg`` structure > + > +OPAL_IPMI_RECV > +============== > +:: > + > + #define OPAL_IPMI_RECV 108 > + > +``OPAL_IPMI_RECV`` call reads an ipmi message of type ``ipmi_msg`` from ipmi message > +queue ``msgq`` into host OS structure ``opal_ipmi_msg``. > + > +Parameters > +---------- > +:: > + > + uint64_t interface > + struct opal_ipmi_msg *opal_ipmi_msg > + uint64_t *msg_len > + > +``interface`` > + ``interface`` parameter is the value from the ipmi interface node ``ibm,ipmi-interface-id`` > + > +``opal_ipmi_msg`` > + ``opal_ipmi_msg`` is the pointer to below structure ``opal_ipmi_msg`` > + > +:: > + > + struct opal_ipmi_msg { > + uint8_t version; > + uint8_t netfn; > + uint8_t cmd; > + uint8_t data[]; > + }; > + > +``msg_len`` > + ``msg_len`` is the pointer to ipmi message response size > + > +Return Values > +------------- > + > +``OPAL_SUCCESS`` > + ipmi message dequeued from ``msgq`` queue and memory taken by it got released successfully > + > +``OPAL_EMPTY`` > + ``msgq`` list is empty > + > +``OPAL_PARAMETER`` > + invalid ipmi ``interface`` value > + > +``OPAL_UNSUPPORTED`` > + in-correct opal ipmi message format version ``opal_ipmi_msg->version``
diff --git a/doc/opal-api/opal-ipmi-send-recv-107-108.rst b/doc/opal-api/opal-ipmi-send-recv-107-108.rst new file mode 100644 index 0000000..64b7589 --- /dev/null +++ b/doc/opal-api/opal-ipmi-send-recv-107-108.rst @@ -0,0 +1,105 @@ +OPAL_IPMI_SEND +============== +:: + + #define OPAL_IPMI_SEND 107 + +``OPAL_IPMI_SEND`` call converts host OS structure ``opal_ipmi_msg`` to an +ipmi message structure ``ipmi_msg`` and it will send the ``msg`` into +ipmi message list/queue which will be queued to service processor/management +controller to parse and execute those ipmi commands. + +Parameters +---------- +:: + + uint64_t interface + struct opal_ipmi_msg *opal_ipmi_msg + uint64_t msg_len + +``interface`` + ``interface`` parameter is the value from the ipmi interface node ``ibm,ipmi-interface-id`` + +``opal_ipmi_msg`` + ``opal_ipmi_msg`` is the pointer to below structure ``opal_ipmi_msg`` + +:: + + struct opal_ipmi_msg { + uint8_t version; + uint8_t netfn; + uint8_t cmd; + uint8_t data[]; + }; + +``msg_len`` + ipmi message request size + +Return Values +------------- + +``OPAL_SUCCESS`` + ``msg`` queued successfully + +``OPAL_PARAMETER`` + invalid ipmi message request length ``msg_len`` + +``OPAL_HARDWARE`` + backend support is not present as block transfer/service processor ipmi routines are not + initialized which are used for communication + +``OPAL_UNSUPPORTED`` + in-correct opal ipmi message format version ``opal_ipmi_msg->version`` + +``OPAL_RESOURCE`` + insufficient resources to create ``ipmi_msg`` structure + +OPAL_IPMI_RECV +============== +:: + + #define OPAL_IPMI_RECV 108 + +``OPAL_IPMI_RECV`` call reads an ipmi message of type ``ipmi_msg`` from ipmi message +queue ``msgq`` into host OS structure ``opal_ipmi_msg``. + +Parameters +---------- +:: + + uint64_t interface + struct opal_ipmi_msg *opal_ipmi_msg + uint64_t *msg_len + +``interface`` + ``interface`` parameter is the value from the ipmi interface node ``ibm,ipmi-interface-id`` + +``opal_ipmi_msg`` + ``opal_ipmi_msg`` is the pointer to below structure ``opal_ipmi_msg`` + +:: + + struct opal_ipmi_msg { + uint8_t version; + uint8_t netfn; + uint8_t cmd; + uint8_t data[]; + }; + +``msg_len`` + ``msg_len`` is the pointer to ipmi message response size + +Return Values +------------- + +``OPAL_SUCCESS`` + ipmi message dequeued from ``msgq`` queue and memory taken by it got released successfully + +``OPAL_EMPTY`` + ``msgq`` list is empty + +``OPAL_PARAMETER`` + invalid ipmi ``interface`` value + +``OPAL_UNSUPPORTED`` + in-correct opal ipmi message format version ``opal_ipmi_msg->version``