aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst')
-rw-r--r--roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst57
1 files changed, 57 insertions, 0 deletions
diff --git a/roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst b/roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst
new file mode 100644
index 000000000..7bb73a769
--- /dev/null
+++ b/roms/skiboot/doc/opal-api/opal-start-return-cpu-41-69.rst
@@ -0,0 +1,57 @@
+====================================
+Starting and stopping secondary CPUs
+====================================
+
+In this context, each thread is a CPU. That is, you start and stop threads of
+CPUs.
+
+.. _OPAL_START_CPU:
+
+OPAL_START_CPU
+==============
+
+.. code-block:: c
+
+ #define OPAL_START_CPU 41
+
+ int64_t opal_start_cpu_thread(uint64_t server_no, uint64_t start_address);
+
+Returns
+-------
+
+:ref:`OPAL_SUCCESS`
+ The CPU was instructed to start executing instructions from the specified
+ `start_address`.
+ This is an *asynchronous* operation, so it may take a short period of
+ time before the CPU actually starts at that address.
+:ref:`OPAL_PARAMETER`
+ Invalid CPU.
+:ref:`OPAL_WRONG_STATE`
+ If the CPU thread is not in OPAL, or is being re-initialized through :ref:`OPAL_REINIT_CPUS`
+:ref:`OPAL_INTERNAL_ERROR`
+ Something else went horribly wrong.
+
+.. _OPAL_RETURN_CPU:
+
+OPAL_RETURN_CPU
+===============
+
+.. code-block:: c
+
+ #define OPAL_RETURN_CPU 69
+
+ int64_t opal_return_cpu(void);
+
+When OPAL first starts the host, all secondary CPUs are spinning in OPAL.
+To start them, one must call OPAL_START_CPU (you may want to OPAL_REINIT_CPUS
+to set the HILE bit first).
+
+In cases where you need OPAL to do something for you across all CPUs, such
+as OPAL_REINIT_CPUS, (on some platforms) a firmware update or get the machine
+back into a similar state as to when the host OS was started (e.g. for kexec)
+you may also need to return control of the CPU to OPAL.
+
+
+Returns
+-------
+This call does **not return**. You need to OPAL_START_CPU.