[Skiboot] [RFC PATCH 15/23] doc/opal-api: rename .txt to .rst

Stewart Smith stewart at linux.vnet.ibm.com
Wed Jul 27 17:43:16 AEST 2016


Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 doc/opal-api/power9-changes.rst | 33 +++++++++++++++++
 doc/opal-api/power9-changes.txt | 33 -----------------
 doc/opal-api/return-codes.rst   | 81 +++++++++++++++++++++++++++++++++++++++++
 doc/opal-api/return-codes.txt   | 81 -----------------------------------------
 4 files changed, 114 insertions(+), 114 deletions(-)
 create mode 100644 doc/opal-api/power9-changes.rst
 delete mode 100644 doc/opal-api/power9-changes.txt
 create mode 100644 doc/opal-api/return-codes.rst
 delete mode 100644 doc/opal-api/return-codes.txt

diff --git a/doc/opal-api/power9-changes.rst b/doc/opal-api/power9-changes.rst
new file mode 100644
index 0000000..72c4885
--- /dev/null
+++ b/doc/opal-api/power9-changes.rst
@@ -0,0 +1,33 @@
+POWER9 Changes to OPAL API
+--------------------------
+
+This document is a summary of POWER9 changes to the OPAL API over what it
+was for POWER7 and POWER8. As the POWER series of processors (at least up
+to POWER9) require changes in the hypervisor to work on a new processor
+generation, this gives us an opportunity with POWER9 to clean up several
+parts of the OPAL API.
+
+Eventually, when the kernel drops support for POWER8 and before, we can then
+remove the associated kernel code too.
+
+OPAL_REINIT_CPUS
+----------------
+Can now be extended beyond HILE BE/LE bits. If invalid flags are set on
+POWER9, OPAL_UNSUPPORTED will be returned.
+
+Device Tree
+-----------
+- /ibm,opal/ compatible property now just lists ibm,opal-v3 and no longer
+  ibm,opal-v2 (power9 and above only)
+
+
+TODO
+----
+Things we still have to do for POWER9:
+- PCI to use async API rather than returning delays
+- deprecate/remove v1 APIs where there's a V2
+- Fix this FWTS warning:
+  FAILED [MEDIUM] DeviceTreeBaseDTCWarnings: Test 3, dtc reports warnings from
+  device tree: Warning (reg_format): "reg" property in /ibm,opal/flash at 0 has
+  invalid length (8 bytes) (#address-cells == 0, #size-cells == 0)
+- Remove mi-version / ml-version from /ibm,opal/firmware and replace with something better and more portable
diff --git a/doc/opal-api/power9-changes.txt b/doc/opal-api/power9-changes.txt
deleted file mode 100644
index 72c4885..0000000
--- a/doc/opal-api/power9-changes.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-POWER9 Changes to OPAL API
---------------------------
-
-This document is a summary of POWER9 changes to the OPAL API over what it
-was for POWER7 and POWER8. As the POWER series of processors (at least up
-to POWER9) require changes in the hypervisor to work on a new processor
-generation, this gives us an opportunity with POWER9 to clean up several
-parts of the OPAL API.
-
-Eventually, when the kernel drops support for POWER8 and before, we can then
-remove the associated kernel code too.
-
-OPAL_REINIT_CPUS
-----------------
-Can now be extended beyond HILE BE/LE bits. If invalid flags are set on
-POWER9, OPAL_UNSUPPORTED will be returned.
-
-Device Tree
------------
-- /ibm,opal/ compatible property now just lists ibm,opal-v3 and no longer
-  ibm,opal-v2 (power9 and above only)
-
-
-TODO
-----
-Things we still have to do for POWER9:
-- PCI to use async API rather than returning delays
-- deprecate/remove v1 APIs where there's a V2
-- Fix this FWTS warning:
-  FAILED [MEDIUM] DeviceTreeBaseDTCWarnings: Test 3, dtc reports warnings from
-  device tree: Warning (reg_format): "reg" property in /ibm,opal/flash at 0 has
-  invalid length (8 bytes) (#address-cells == 0, #size-cells == 0)
-- Remove mi-version / ml-version from /ibm,opal/firmware and replace with something better and more portable
diff --git a/doc/opal-api/return-codes.rst b/doc/opal-api/return-codes.rst
new file mode 100644
index 0000000..e82c5a2
--- /dev/null
+++ b/doc/opal-api/return-codes.rst
@@ -0,0 +1,81 @@
+OPAL API Return Codes
+---------------------
+
+All OPAL calls return an integer relaying the success/failure of the OPAL
+call.
+
+Success is typically indicated by OPAL_SUCCESS. Failure is always indicated
+by a negative return code.
+
+Conforming host Operating Systems MUST handle return codes other than those
+listed here. In future OPAL versions, additional return codes may be added.
+
+In the reference implementation (skiboot) these are all in include/opal.h.
+
+
+The core set of return codes are:
+
+#define OPAL_SUCCESS		0
+Success!
+
+#define OPAL_PARAMETER		-1
+A parameter was invalid. This will also be returned if you call an
+invalid OPAL call. To determine if a specific OPAL call is supported
+or not, OPAL_CHECK_TOKEN should be called rather than relying on
+OPAL_PARAMETER being returned for an invalid token.
+
+#define OPAL_BUSY		-2
+Try again later.
+
+#define OPAL_PARTIAL		-3
+The operation partially succeeded.
+
+#define OPAL_CONSTRAINED	-4
+#define OPAL_CLOSED		-5
+#define OPAL_HARDWARE		-6
+
+#define OPAL_UNSUPPORTED	-7
+Unsupported operation. Non-fatal.
+
+#define OPAL_PERMISSION		-8
+Inadequate permission to perform the operation.
+
+
+#define OPAL_NO_MEM		-9
+Indicates a temporary or permanent lack of adequate memory to perform the
+operation. Ideally, this should never happen. Skiboot reserves a small amount
+of memory for its heap and some operations (such as I2C requests) are allocated
+from this heap.
+
+If this is ever hit, you should likely file a bug.
+
+
+#define OPAL_RESOURCE		-10
+#define OPAL_INTERNAL_ERROR	-11
+#define OPAL_BUSY_EVENT		-12
+#define OPAL_HARDWARE_FROZEN	-13
+#define OPAL_WRONG_STATE	-14
+
+#define OPAL_ASYNC_COMPLETION	-15
+For asynchronous calls, successfully queueing/starting executing the
+command is indicated by the OPAL_ASYNC_COMPLETION return code.
+pseudo-code for an async call:
+  token = opal_async_get_token();
+  rc = opal_async_example(foo, token);
+  if (rc != OPAL_ASYNC_COMPLETION)
+      handle_error(rc);
+  rc = opal_async_wait(token);
+  // handle result here
+
+#define OPAL_EMPTY		-16
+
+Added for I2C, only applicable to I2C calls:
+#define OPAL_I2C_TIMEOUT	-17
+#define OPAL_I2C_INVALID_CMD	-18
+#define OPAL_I2C_LBUS_PARITY	-19
+#define OPAL_I2C_BKEND_OVERRUN	-20
+#define OPAL_I2C_BKEND_ACCESS	-21
+#define OPAL_I2C_ARBT_LOST	-22
+#define OPAL_I2C_NACK_RCVD	-23
+#define OPAL_I2C_STOP_ERR	-24
+ 
diff --git a/doc/opal-api/return-codes.txt b/doc/opal-api/return-codes.txt
deleted file mode 100644
index e82c5a2..0000000
--- a/doc/opal-api/return-codes.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-OPAL API Return Codes
----------------------
-
-All OPAL calls return an integer relaying the success/failure of the OPAL
-call.
-
-Success is typically indicated by OPAL_SUCCESS. Failure is always indicated
-by a negative return code.
-
-Conforming host Operating Systems MUST handle return codes other than those
-listed here. In future OPAL versions, additional return codes may be added.
-
-In the reference implementation (skiboot) these are all in include/opal.h.
-
-
-The core set of return codes are:
-
-#define OPAL_SUCCESS		0
-Success!
-
-#define OPAL_PARAMETER		-1
-A parameter was invalid. This will also be returned if you call an
-invalid OPAL call. To determine if a specific OPAL call is supported
-or not, OPAL_CHECK_TOKEN should be called rather than relying on
-OPAL_PARAMETER being returned for an invalid token.
-
-#define OPAL_BUSY		-2
-Try again later.
-
-#define OPAL_PARTIAL		-3
-The operation partially succeeded.
-
-#define OPAL_CONSTRAINED	-4
-#define OPAL_CLOSED		-5
-#define OPAL_HARDWARE		-6
-
-#define OPAL_UNSUPPORTED	-7
-Unsupported operation. Non-fatal.
-
-#define OPAL_PERMISSION		-8
-Inadequate permission to perform the operation.
-
-
-#define OPAL_NO_MEM		-9
-Indicates a temporary or permanent lack of adequate memory to perform the
-operation. Ideally, this should never happen. Skiboot reserves a small amount
-of memory for its heap and some operations (such as I2C requests) are allocated
-from this heap.
-
-If this is ever hit, you should likely file a bug.
-
-
-#define OPAL_RESOURCE		-10
-#define OPAL_INTERNAL_ERROR	-11
-#define OPAL_BUSY_EVENT		-12
-#define OPAL_HARDWARE_FROZEN	-13
-#define OPAL_WRONG_STATE	-14
-
-#define OPAL_ASYNC_COMPLETION	-15
-For asynchronous calls, successfully queueing/starting executing the
-command is indicated by the OPAL_ASYNC_COMPLETION return code.
-pseudo-code for an async call:
-  token = opal_async_get_token();
-  rc = opal_async_example(foo, token);
-  if (rc != OPAL_ASYNC_COMPLETION)
-      handle_error(rc);
-  rc = opal_async_wait(token);
-  // handle result here
-
-#define OPAL_EMPTY		-16
-
-Added for I2C, only applicable to I2C calls:
-#define OPAL_I2C_TIMEOUT	-17
-#define OPAL_I2C_INVALID_CMD	-18
-#define OPAL_I2C_LBUS_PARITY	-19
-#define OPAL_I2C_BKEND_OVERRUN	-20
-#define OPAL_I2C_BKEND_ACCESS	-21
-#define OPAL_I2C_ARBT_LOST	-22
-#define OPAL_I2C_NACK_RCVD	-23
-#define OPAL_I2C_STOP_ERR	-24
- 
-- 
2.7.4



More information about the Skiboot mailing list