[Skiboot] [PATCH v6 10/10] skiboot: Add documentation for the Core IMC opal call

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Wed Mar 1 01:53:37 AEDT 2017


From: Hemant Kumar <hemant at linux.vnet.ibm.com>

Adds documentation for the opal_core_imc_counters_control() interface.

Signed-off-by: Hemant Kumar <hemant at linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
 doc/opal-api/opal-core-imc-counters.rst | 33 +++++++++++++++++++++++++++++++++
 hw/imc.c                                |  2 ++
 2 files changed, 35 insertions(+)
 create mode 100644 doc/opal-api/opal-core-imc-counters.rst

diff --git a/doc/opal-api/opal-core-imc-counters.rst b/doc/opal-api/opal-core-imc-counters.rst
new file mode 100644
index 000000000000..f7390a20f603
--- /dev/null
+++ b/doc/opal-api/opal-core-imc-counters.rst
@@ -0,0 +1,33 @@
+The interface can be extended to include more modes and operations
+available in core IMC.
+
+Parameters
+----------
+``uint64_t operation``
+  3 operations are supported for now (include/opal-api.h) :
+  - OPAL_CORE_IMC_DISABLE -- disable or stop the counters
+  - OPAL_CORE_IMC_ENABLE -- enable/resume the counters
+  - OPAL_CORE_IMC_INIT -- Initialize and enable the counters.
+
+``uint64_t addr``
+  For OPAL_CORE_IMC_INIT, this parameter must have a non-zero value.
+  This value must be a per-core physical address.
+  For other operations, this value is undefined and must be zero.
+
+``uint64_t value_1``
+  - This parameter is undefined for now and must be zero.
+
+``uint64_t value_2``
+  - This parameter is undefined for now and must be zero.
+
+Returns
+-------
+OPAL_PARAMETER
+  In any one/some/all of the following cases :
+  - Unsupported ``operation``
+  - Wrong ``addr`` for the given ``operation``
+  - Non-zero ``value_1`` or ``value_2``
+OPAL_HARDWARE
+   If xscom_write fails.
+OPAL_SUCCESS
+   On successful execution of the ``operation``.
diff --git a/hw/imc.c b/hw/imc.c
index f4ef526409fa..23cffc404f10 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -271,6 +271,8 @@ void imc_init(void)
 		dt_free(dev);
 		goto err;
 	}
+
+	return;
 err:
 	prerror("IMC Devices not added\n");
 	free(buf);
-- 
2.7.4



More information about the Skiboot mailing list