summaryrefslogtreecommitdiff
path: root/Documentation/core-api
diff options
context:
space:
mode:
authorJason Miu <jasonmiu@google.com>2026-01-05 18:58:37 +0200
committerAndrew Morton <akpm@linux-foundation.org>2026-01-26 19:07:12 -0800
commit5e1ea1e27b6ff237122ac6cb30e0b8ea4618f75f (patch)
treec2ea291827071c91be5c9dd1118f186c8786c1ee /Documentation/core-api
parenta6f4e56828029bc3b9a79910b38026fd2958915e (diff)
kho: introduce KHO FDT ABI header
Introduce the `include/linux/kho/abi/kexec_handover.h` header file, which defines the stable ABI for the KHO mechanism. This header specifies how preserved data is passed between kernels using an FDT. The ABI contract includes the FDT structure, node properties, and the "kho-v1" compatible string. By centralizing these definitions, this header serves as the foundational agreement for inter-kernel communication of preserved states, ensuring forward compatibility and preventing misinterpretation of data across kexec transitions. Since the ABI definitions are now centralized in the header files, the YAML files that previously described the FDT interfaces are redundant. These redundant files have therefore been removed. Link: https://lkml.kernel.org/r/20260105165839.285270-5-rppt@kernel.org Signed-off-by: Jason Miu <jasonmiu@google.com> Co-developed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Cc: Alexander Graf <graf@amazon.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation/core-api')
-rw-r--r--Documentation/core-api/kho/abi.rst16
-rw-r--r--Documentation/core-api/kho/bindings/kho.yaml43
-rw-r--r--Documentation/core-api/kho/bindings/sub-fdt.yaml27
-rw-r--r--Documentation/core-api/kho/index.rst9
4 files changed, 25 insertions, 70 deletions
diff --git a/Documentation/core-api/kho/abi.rst b/Documentation/core-api/kho/abi.rst
new file mode 100644
index 000000000000..a1ee0f481727
--- /dev/null
+++ b/Documentation/core-api/kho/abi.rst
@@ -0,0 +1,16 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+==================
+Kexec Handover ABI
+==================
+
+Core Kexec Handover ABI
+========================
+
+.. kernel-doc:: include/linux/kho/abi/kexec_handover.h
+ :doc: Kexec Handover ABI
+
+See Also
+========
+
+- :doc:`/admin-guide/mm/kho`
diff --git a/Documentation/core-api/kho/bindings/kho.yaml b/Documentation/core-api/kho/bindings/kho.yaml
deleted file mode 100644
index 11e8ab7b219d..000000000000
--- a/Documentation/core-api/kho/bindings/kho.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-title: Kexec HandOver (KHO) root tree
-
-maintainers:
- - Mike Rapoport <rppt@kernel.org>
- - Changyuan Lyu <changyuanl@google.com>
-
-description: |
- System memory preserved by KHO across kexec.
-
-properties:
- compatible:
- enum:
- - kho-v1
-
- preserved-memory-map:
- description: |
- physical address (u64) of an in-memory structure describing all preserved
- folios and memory ranges.
-
-patternProperties:
- "$[0-9a-f_]+^":
- $ref: sub-fdt.yaml#
- description: physical address of a KHO user's own FDT.
-
-required:
- - compatible
- - preserved-memory-map
-
-additionalProperties: false
-
-examples:
- - |
- kho {
- compatible = "kho-v1";
- preserved-memory-map = <0xf0be16 0x1000000>;
-
- memblock {
- fdt = <0x80cc16 0x1000000>;
- };
- };
diff --git a/Documentation/core-api/kho/bindings/sub-fdt.yaml b/Documentation/core-api/kho/bindings/sub-fdt.yaml
deleted file mode 100644
index b9a3d2d24850..000000000000
--- a/Documentation/core-api/kho/bindings/sub-fdt.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-title: KHO users' FDT address
-
-maintainers:
- - Mike Rapoport <rppt@kernel.org>
- - Changyuan Lyu <changyuanl@google.com>
-
-description: |
- Physical address of an FDT blob registered by a KHO user.
-
-properties:
- fdt:
- description: |
- physical address (u64) of an FDT blob.
-
-required:
- - fdt
-
-additionalProperties: false
-
-examples:
- - |
- memblock {
- fdt = <0x80cc16 0x1000000>;
- };
diff --git a/Documentation/core-api/kho/index.rst b/Documentation/core-api/kho/index.rst
index 1733b3c3e976..dcc6a36cc134 100644
--- a/Documentation/core-api/kho/index.rst
+++ b/Documentation/core-api/kho/index.rst
@@ -31,6 +31,15 @@ can retrieve and restore the preserved state from KHO FDT.
Subsystems participating in KHO can define their own format for state
serialization and preservation.
+KHO FDT and structures defined by the subsystems form an ABI between pre-kexec
+and post-kexec kernels. This ABI is defined by header files in
+``include/linux/kho/abi`` directory.
+
+.. toctree::
+ :maxdepth: 1
+
+ abi.rst
+
.. _kho_scratch:
Scratch Regions