sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/core-api/kho/abimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/pt_BR/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/core-api/kho/abimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h)SPDX-License-Identifier: GPL-2.0-or-laterh]h)SPDX-License-Identifier: GPL-2.0-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh>/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi.rsthKubhsection)}(hhh](htitle)}(hKexec Handover ABIh]hKexec Handover ABI}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCore Kexec Handover ABIh]hCore Kexec Handover ABI}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hKexec Handover uses the ABI defined below for passing preserved data from one kernel to the next. The ABI uses Flattened Device Tree (FDT) format. The first kernel creates an FDT which is then passed to the next kernel during a kexec handover.h]hKexec Handover uses the ABI defined below for passing preserved data from one kernel to the next. The ABI uses Flattened Device Tree (FDT) format. The first kernel creates an FDT which is then passed to the next kernel during a kexec handover.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKhhhhubh)}(hXThis interface is a contract. Any modification to the FDT structure, node properties, compatible string, or the layout of the data structures referenced here constitutes a breaking change. Such changes require incrementing the version number in KHO_FDT_COMPATIBLE to prevent a new kernel from misinterpreting data from an older kernel. Changes are allowed provided the compatibility version is incremented. However, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.h]hXThis interface is a contract. Any modification to the FDT structure, node properties, compatible string, or the layout of the data structures referenced here constitutes a breaking change. Such changes require incrementing the version number in KHO_FDT_COMPATIBLE to prevent a new kernel from misinterpreting data from an older kernel. Changes are allowed provided the compatibility version is incremented. However, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKhhhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hXFDT Structure Overview: The FDT serves as a central registry for physical addresses of preserved data structures. The first kernel populates this FDT with references to memory regions and other metadata that need to persist across the kexec transition. The subsequent kernel then parses this FDT to locate and restore the preserved data.:: / { compatible = "kho-v3"; preserved-memory-map = <0x...>; { preserved-data = <0x...>; blob-size = <0x...>; }; { preserved-data = <0x...>; blob-size = <0x...>; }; ... ... { preserved-data = <0x...>; blob-size = <0x...>; }; }; Root KHO Node (/): - compatible: "kho-v3" Identifies the overall KHO ABI version. - preserved-memory-map: u64 Physical memory address pointing to the root of the preserved memory map data structure. Subnodes (): Subnodes can also be added to the root node to describe other preserved data blobs. The is provided by the subsystem that uses KHO for preserving its data. - preserved-data: u64 Physical address pointing to a subnode data blob that is also being preserved. - blob-size: u64 Size in bytes of the preserved data blob. This is needed because blobs may use arbitrary formats (not just FDT), so the size cannot be determined from the blob content alone. h](hterm)}(hFDT Structure Overview:h]hFDT Structure Overview:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKXhjubh definition)}(hhh](h)}(hX;The FDT serves as a central registry for physical addresses of preserved data structures. The first kernel populates this FDT with references to memory regions and other metadata that need to persist across the kexec transition. The subsequent kernel then parses this FDT to locate and restore the preserved data.::h]hX:The FDT serves as a central registry for physical addresses of preserved data structures. The first kernel populates this FDT with references to memory regions and other metadata that need to persist across the kexec transition. The subsequent kernel then parses this FDT to locate and restore the preserved data.:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhK#hj,ubh literal_block)}(hXq/ { compatible = "kho-v3"; preserved-memory-map = <0x...>; { preserved-data = <0x...>; blob-size = <0x...>; }; { preserved-data = <0x...>; blob-size = <0x...>; }; ... ... { preserved-data = <0x...>; blob-size = <0x...>; }; };h]hXq/ { compatible = "kho-v3"; preserved-memory-map = <0x...>; { preserved-data = <0x...>; blob-size = <0x...>; }; { preserved-data = <0x...>; blob-size = <0x...>; }; ... ... { preserved-data = <0x...>; blob-size = <0x...>; }; };}hj@sbah}(h]h ]h"]h$]h&]hhuh1j>hg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhK)hj,ubj)}(hhh](j)}(hRoot KHO Node (/): - compatible: "kho-v3" Identifies the overall KHO ABI version. - preserved-memory-map: u64 Physical memory address pointing to the root of the preserved memory map data structure. h](j)}(hRoot KHO Node (/):h]hRoot KHO Node (/):}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKFhjRubj+)}(hhh]h bullet_list)}(hhh](h list_item)}(h>compatible: "kho-v3" Identifies the overall KHO ABI version. h](h)}(hcompatible: "kho-v3"h]hcompatible: “kho-v3”}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhK?hjoubh)}(h'Identifies the overall KHO ABI version.h]h'Identifies the overall KHO ABI version.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKAhjoubeh}(h]h ]h"]h$]h&]uh1jmhjjubjn)}(htpreserved-memory-map: u64 Physical memory address pointing to the root of the preserved memory map data structure. h](h)}(hpreserved-memory-map: u64h]hpreserved-memory-map: u64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKChjubh)}(hXPhysical memory address pointing to the root of the preserved memory map data structure.h]hXPhysical memory address pointing to the root of the preserved memory map data structure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKEhjubeh}(h]h ]h"]h$]h&]uh1jmhjjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhjhK?hjeubah}(h]h ]h"]h$]h&]uh1j*hjRubeh}(h]h ]h"]h$]h&]uh1jhjdhKFhjOubj)}(hXSubnodes (): Subnodes can also be added to the root node to describe other preserved data blobs. The is provided by the subsystem that uses KHO for preserving its data. - preserved-data: u64 Physical address pointing to a subnode data blob that is also being preserved. - blob-size: u64 Size in bytes of the preserved data blob. This is needed because blobs may use arbitrary formats (not just FDT), so the size cannot be determined from the blob content alone. h](j)}(hSubnodes ():h]hSubnodes ():}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)hKXhjubj+)}(hhh](h)}(hSubnodes can also be added to the root node to describe other preserved data blobs. The is provided by the subsystem that uses KHO for preserving its data.h]hSubnodes can also be added to the root node to describe other preserved data blobs. The is provided by the subsystem that uses KHO for preserving its data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKIhjubji)}(hhh](jn)}(hdpreserved-data: u64 Physical address pointing to a subnode data blob that is also being preserved. h](h)}(hpreserved-data: u64h]hpreserved-data: u64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKNhjubh)}(hNPhysical address pointing to a subnode data blob that is also being preserved.h]hNPhysical address pointing to a subnode data blob that is also being preserved.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKPhjubeh}(h]h ]h"]h$]h&]uh1jmhjubjn)}(hblob-size: u64 Size in bytes of the preserved data blob. This is needed because blobs may use arbitrary formats (not just FDT), so the size cannot be determined from the blob content alone. h](h)}(hblob-size: u64h]hblob-size: u64}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKShj"ubh)}(hSize in bytes of the preserved data blob. This is needed because blobs may use arbitrary formats (not just FDT), so the size cannot be determined from the blob content alone.h]hSize in bytes of the preserved data blob. This is needed because blobs may use arbitrary formats (not just FDT), so the size cannot be determined from the blob content alone.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:10: ./include/linux/kho/abi/kexec_handover.hhKUhj"ubeh}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]jjuh1jhhj hKNhjubeh}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhj)hKXhjOubeh}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhj)hKXhjubah}(h]h ]h"]h$]h&]uh1jhhhhhNhNubeh}(h]core-kexec-handover-abiah ]h"]core kexec handover abiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hvmalloc preservation ABIh]hvmalloc preservation ABI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhKubh)}(hThe Kexec Handover ABI for preserving vmalloc'ed memory is defined by a set of structures and helper macros. The layout of these structures is a stable contract between kernels and is versioned by the KHO_FDT_COMPATIBLE string.h]hThe Kexec Handover ABI for preserving vmalloc’ed memory is defined by a set of structures and helper macros. The layout of these structures is a stable contract between kernels and is versioned by the KHO_FDT_COMPATIBLE string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:16: ./include/linux/kho/abi/kexec_handover.hhKihj|hhubh)}(hXThe preservation is managed through a main descriptor :c:type:`struct kho_vmalloc `, which points to a linked list of :c:type:`struct kho_vmalloc_chunk ` structures. These chunks contain the physical addresses of the preserved pages, allowing the next kernel to reconstruct the vmalloc area with the same content and layout. Helper macros are also defined for storing and loading pointers within these structures.h](h6The preservation is managed through a main descriptor }(hjhhhNhNubh)}(h*:c:type:`struct kho_vmalloc `h]hliteral)}(hjh]hstruct kho_vmalloc}(hjhhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoccore-api/kho/abi refdomainjreftypetype refexplicitrefwarn reftarget kho_vmallocuh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:16: ./include/linux/kho/abi/kexec_handover.hhKnhjubh#, which points to a linked list of }(hjhhhNhNubh)}(h6:c:type:`struct kho_vmalloc_chunk `h]j)}(hjh]hstruct kho_vmalloc_chunk}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjkho_vmalloc_chunkuh1hhjhKnhjubhX structures. These chunks contain the physical addresses of the preserved pages, allowing the next kernel to reconstruct the vmalloc area with the same content and layout. Helper macros are also defined for storing and loading pointers within these structures.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKnhj|hhubeh}(h]vmalloc-preservation-abiah ]h"]vmalloc preservation abiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hmemblock preservation ABIh]hmemblock preservation ABI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hMemblock can serialize its current memory reservations created with reserve_mem command line option across kexec through KHO. The post-KHO kernel can then consume these reservations and they are guaranteed to have the same physical address.h]hMemblock can serialize its current memory reservations created with reserve_mem command line option across kexec through KHO. The post-KHO kernel can then consume these reservations and they are guaranteed to have the same physical address.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhKhjhhubh)}(hXRThe state is serialized using Flattened Device Tree (FDT) format. Any modification to the FDT structure, node properties, or the compatible strings constitutes a breaking change. Such changes require incrementing the version number in the relevant `_COMPATIBLE` string to prevent a new kernel from misinterpreting data from an old kernel.h](hThe state is serialized using Flattened Device Tree (FDT) format. Any modification to the FDT structure, node properties, or the compatible strings constitutes a breaking change. Such changes require incrementing the version number in the relevant }(hjhhhNhNubhtitle_reference)}(h `_COMPATIBLE`h]h _COMPATIBLE}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjubhM string to prevent a new kernel from misinterpreting data from an old kernel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK hjhhubh)}(hChanges are allowed provided the compatibility version is incremented. However, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.h]hChanges are allowed provided the compatibility version is incremented. However, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhKhjhhubj)}(hhh]j)}(hXFDT Structure Overview: The entire memblock state is encapsulated within a single KHO entry named "memblock". This entry contains an FDT with the following layout: .. code-block:: none / { compatible = "memblock-v1"; n1 { compatible = "reserve-mem-v1"; start = <0xc06b 0x4000000>; size = <0x04 0x00>; }; }; h](j)}(hFDT Structure Overview:h]hFDT Structure Overview:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK%hjTubj+)}(hhh](h)}(hThe entire memblock state is encapsulated within a single KHO entry named "memblock". This entry contains an FDT with the following layout:h]hThe entire memblock state is encapsulated within a single KHO entry named “memblock”. This entry contains an FDT with the following layout:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhKhjgubj?)}(h/ { compatible = "memblock-v1"; n1 { compatible = "reserve-mem-v1"; start = <0xc06b 0x4000000>; size = <0x04 0x00>; }; };h]h/ { compatible = "memblock-v1"; n1 { compatible = "reserve-mem-v1"; start = <0xc06b 0x4000000>; size = <0x04 0x00>; }; };}hjysbah}(h]h ]h"]h$]h&]hhƌforcelanguagenonehighlight_args}uh1j>ha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhKhjgubeh}(h]h ]h"]h$]h&]uh1j*hjTubeh}(h]h ]h"]h$]h&]uh1jhjfhK%hjQubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hMain memblock node (/):h]hMain memblock node (/):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK'hjhhubh block_quote)}(hK- compatible: "memblock-v1" Identifies the overall memblock ABI version. h]ji)}(hhh]jn)}(hGcompatible: "memblock-v1" Identifies the overall memblock ABI version. h]h)}(hFcompatible: "memblock-v1" Identifies the overall memblock ABI version.h]hJcompatible: “memblock-v1” Identifies the overall memblock ABI version.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK)hjubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]jjuh1jhhjhK)hjubah}(h]h ]h"]h$]h&]uh1jhjhK)hjhhubj)}(hhh]j)}(hXbreserved_mem node: These nodes describe all reserve_mem regions. The node name is the name defined by the user for a reserve_mem region. - compatible: "reserve-mem-v1" Identifies the ABI version of reserve_mem descriptions - start: u64 Physical address of the reserved memory region. - size: u64 size in bytes of the reserved memory region. h](j)}(hreserved_mem node:h]hreserved_mem node:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK;hjubj+)}(hhh](h)}(huThese nodes describe all reserve_mem regions. The node name is the name defined by the user for a reserve_mem region.h]huThese nodes describe all reserve_mem regions. The node name is the name defined by the user for a reserve_mem region.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK-hjubji)}(hhh](jn)}(hUcompatible: "reserve-mem-v1" Identifies the ABI version of reserve_mem descriptions h](h)}(hcompatible: "reserve-mem-v1"h]h compatible: “reserve-mem-v1”}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK0hjubh)}(h6Identifies the ABI version of reserve_mem descriptionsh]h6Identifies the ABI version of reserve_mem descriptions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:22: ./include/linux/kho/abi/memblock.hhK2hjubeh}(h]h ]h"]h$]h&]uh1jmhjubjn)}(hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hX The tree is traversed using a key that encodes the page's physical address (pa) and its order into a single unsigned long value. The encoded key value is composed of two parts: the 'order bit' in the upper part and the 'shifted physical address' in the lower part.::h]hXThe tree is traversed using a key that encodes the page’s physical address (pa) and its order into a single unsigned long value. The encoded key value is composed of two parts: the ‘order bit’ in the upper part and the ‘shifted physical address’ in the lower part.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubj?)}(hX?+------------+-----------------------------+--------------------------+ | Page Order | Order Bit | Shifted Physical Address | +------------+-----------------------------+--------------------------+ | 0 | ...000100 ... (at bit 52) | pa >> (PAGE_SHIFT + 0) | | 1 | ...000010 ... (at bit 51) | pa >> (PAGE_SHIFT + 1) | | 2 | ...000001 ... (at bit 50) | pa >> (PAGE_SHIFT + 2) | | ... | ... | ... | +------------+-----------------------------+--------------------------+h]hX?+------------+-----------------------------+--------------------------+ | Page Order | Order Bit | Shifted Physical Address | +------------+-----------------------------+--------------------------+ | 0 | ...000100 ... (at bit 52) | pa >> (PAGE_SHIFT + 0) | | 1 | ...000010 ... (at bit 51) | pa >> (PAGE_SHIFT + 1) | | 2 | ...000001 ... (at bit 50) | pa >> (PAGE_SHIFT + 2) | | ... | ... | ... | +------------+-----------------------------+--------------------------+}hjsbah}(h]h ]h"]h$]h&]hhuh1j>hg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hShifted Physical Address: The 'shifted physical address' is the physical address normalized for its order. It effectively represents the PFN shifted right by the order.h]hShifted Physical Address: The ‘shifted physical address’ is the physical address normalized for its order. It effectively represents the PFN shifted right by the order.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hOrder Bit: The 'order bit' encodes the page order by setting a single bit at a specific position. The position of this bit itself represents the order.h]hOrder Bit: The ‘order bit’ encodes the page order by setting a single bit at a specific position. The position of this bit itself represents the order.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hFor instance, on a 64-bit system with 4KB pages (PAGE_SHIFT = 12), the maximum range for the shifted physical address (for order 0) is 52 bits (64 - 12). This address occupies bits [0-51]. For order 0, the order bit is set at position 52.h]hFor instance, on a 64-bit system with 4KB pages (PAGE_SHIFT = 12), the maximum range for the shifted physical address (for order 0) is 52 bits (64 - 12). This address occupies bits [0-51]. For order 0, the order bit is set at position 52.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(h~The following diagram illustrates how the encoded key value is split into indices for the tree levels, with PAGE_SIZE of 4KB::h]h}The following diagram illustrates how the encoded key value is split into indices for the tree levels, with PAGE_SIZE of 4KB:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubj?)}(hX$ 63:60 59:51 50:42 41:33 32:24 23:15 14:0 +---------+--------+--------+--------+--------+--------+-----------------+ | 0 | Lv 5 | Lv 4 | Lv 3 | Lv 2 | Lv 1 | Lv 0 (bitmap) | +---------+--------+--------+--------+--------+--------+-----------------+h]hX$ 63:60 59:51 50:42 41:33 32:24 23:15 14:0 +---------+--------+--------+--------+--------+--------+-----------------+ | 0 | Lv 5 | Lv 4 | Lv 3 | Lv 2 | Lv 1 | Lv 0 (bitmap) | +---------+--------+--------+--------+--------+--------+-----------------+}hj7sbah}(h]h ]h"]h$]h&]hhuh1j>hg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hXtThe radix tree stores pages of all orders in a single 6-level hierarchy. It efficiently shares higher tree levels, especially due to common zero top address bits, allowing a single, efficient algorithm to manage all pages. This bitmap approach also offers memory efficiency; for example, a 512KB bitmap can cover a 16GB memory range for 0-order pages with PAGE_SIZE = 4KB.h]hXtThe radix tree stores pages of all orders in a single 6-level hierarchy. It efficiently shares higher tree levels, especially due to common zero top address bits, allowing a single, efficient algorithm to manage all pages. This bitmap approach also offers memory efficiency; for example, a 512KB bitmap can cover a 16GB memory range for 0-order pages with PAGE_SIZE = 4KB.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubh)}(hXThe data structures defined here are part of the KHO ABI. Any modification to these structures that breaks backward compatibility must be accompanied by an update to the "compatible" string. This ensures that a newer kernel can correctly interpret the data passed by an older kernel.h]hXThe data structures defined here are part of the KHO ABI. Any modification to these structures that breaks backward compatibility must be accompanied by an update to the “compatible” string. This ensures that a newer kernel can correctly interpret the data passed by an older kernel.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhg/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:28: ./include/linux/kho/abi/kexec_handover.hhKhjhhubeh}(h]!kho-persistent-memory-tracker-abiah ]h"]!kho persistent memory tracker abiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hKHO serialization block ABIh]hKHO serialization block ABI}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhK ubhtarget)}(h!.. _KHO Serialization Blocks ABI:h]h}(h]h ]h"]h$]h&]refidkho-serialization-blocks-abiuh1j}hKhjlhhh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hubh)}(h **KHO Serialization Blocks ABI**h]hstrong)}(hjh]hKHO Serialization Blocks ABI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]jah ]h"]kho serialization blocks abiah$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhKhjlhhexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hSubsystems using the KHO Serialization Blocks framework rely on the stable Application Binary Interface defined below to pass serialized state from a pre-update kernel to a post-update kernel.h]hSubsystems using the KHO Serialization Blocks framework rely on the stable Application Binary Interface defined below to pass serialized state from a pre-update kernel to a post-update kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhKhjlhhubh)}(hX^This interface is a contract. Any modification to the structure fields, compatible strings, or the layout of the `__packed` serialization structures defined here constitutes a breaking change. Such changes require incrementing the version number in the `KHO_FDT_COMPATIBLE` string to prevent a new kernel from misinterpreting data from an old kernel.h](hqThis interface is a contract. Any modification to the structure fields, compatible strings, or the layout of the }(hjhhhNhNubj()}(h `__packed`h]h__packed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjubh serialization structures defined here constitutes a breaking change. Such changes require incrementing the version number in the }(hjhhhNhNubj()}(h`KHO_FDT_COMPATIBLE`h]hKHO_FDT_COMPATIBLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j'hjubhM string to prevent a new kernel from misinterpreting data from an old kernel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK hjlhhubh)}(hChanges are allowed provided the compatibility version is incremented; however, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.h]hChanges are allowed provided the compatibility version is incremented; however, backward/forward compatibility is only guaranteed for kernels supporting the same ABI version.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhKhjlhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleKHO_BLOCK_SIZE (C macro)c.KHO_BLOCK_SIZEhNtauh1jhjlhhhjhNubhdesc)}(hhh](hdesc_signature)}(hKHO_BLOCK_SIZEh]hdesc_signature_line)}(hKHO_BLOCK_SIZEh]h desc_name)}(hKHO_BLOCK_SIZEh]h desc_sig_name)}(hjh]hKHO_BLOCK_SIZE}(hj&hhhNhNubah}(h]h ]nah"]h$]h&]uh1j$hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK ubah}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhj<hK ubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj<hK hjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jQhjhhhj<hK ubeh}(h]h ](jmacroeh"]h$]h&]domainjobjtypej_desctypej_noindex noindexentrynocontentsentryuh1j hhhjlhjhNubh)}(h``KHO_BLOCK_SIZE``h]j)}(hjkh]hKHO_BLOCK_SIZE}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK"hjlhhubj)}(h The size of each serialization block. **Description** This is defined as PAGE_SIZE. PAGE_SIZE is ABI compliant because live update between kernels with different page sizes is not supported by KHO. h](j)}(h&The size of each serialization block. h]h)}(h%The size of each serialization block.h]h%The size of each serialization block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK hjubah}(h]h ]h"]h$]h&]uh1jhjhK hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK"hjubh)}(hThis is defined as PAGE_SIZE. PAGE_SIZE is ABI compliant because live update between kernels with different page sizes is not supported by KHO.h]hThis is defined as PAGE_SIZE. PAGE_SIZE is ABI compliant because live update between kernels with different page sizes is not supported by KHO.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK!hjubeh}(h]h ]h"]h$]h&]uh1jhjhK hjlhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j kho_block_header_ser (C struct)c.kho_block_header_serhNtauh1jhjlhhhjhNubj)}(hhh](j)}(hkho_block_header_serh]j)}(hstruct kho_block_header_serh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK'ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhK'ubj)}(hkho_block_header_serh]j%)}(hjh]hkho_block_header_ser}(hj hhhNhNubah}(h]h ]j0ah"]h$]h&]uh1j$hjubah}(h]h ](j7j8eh"]h$]h&]hhuh1jhjhhhjhK'ubeh}(h]h ]h"]h$]h&]hhjCuh1jjDjEhjhhhjhK'ubah}(h]jah ](jIjJeh"]h$]h&]jNjO)jPhuh1jhjhK'hjhhubjR)}(hhh]h)}(h%Header for the serialized data block.h]h%Header for the serialized data block.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK(hj*hhubah}(h]h ]h"]h$]h&]uh1jQhjhhhjhK'ubeh}(h]h ](jstructeh"]h$]h&]jcjjdjEjejEjfjgjhuh1j hhhjlhjhNubh container)}(hX**Definition**:: struct kho_block_header_ser { u64 next; u64 count; }; **Members** ``next`` Physical address of the next struct kho_block_header_ser. ``count`` The number of entries that immediately follow this header in the memory block.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh:}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK,hjKubj?)}(h=struct kho_block_header_ser { u64 next; u64 count; };h]h=struct kho_block_header_ser { u64 next; u64 count; };}hjlsbah}(h]h ]h"]h$]h&]hhuh1j>h^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK.hjKubh)}(h **Members**h]j)}(hj}h]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK3hjKubj)}(hhh](j)}(hC``next`` Physical address of the next struct kho_block_header_ser. h](j)}(h``next``h]j)}(hjh]hnext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK*hjubj+)}(hhh]h)}(h9Physical address of the next struct kho_block_header_ser.h]h9Physical address of the next struct kho_block_header_ser.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK*hjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhK*hjubj)}(hX``count`` The number of entries that immediately follow this header in the memory block.h](j)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK+hjubj+)}(hhh]h)}(hNThe number of entries that immediately follow this header in the memory block.h]hNThe number of entries that immediately follow this header in the memory block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1jhjhK+hjubeh}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jIhjlhhhjhNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK/hjlhhubh)}(hThis structure is located at the beginning of a block of physical memory preserved across a kexec. It provides the necessary metadata to interpret the array of entries that follow.h]hThis structure is located at the beginning of a block of physical memory preserved across a kexec. It provides the necessary metadata to interpret the array of entries that follow.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/kho/abi:34: ./include/linux/kho/abi/block.hhK,hjlhhubeh}(h]kho-serialization-block-abiah ]h"]kho serialization block abiah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSee Alsoh]hSee Also}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhK%ubji)}(hhh]jn)}(h:doc:`/admin-guide/mm/kho`h]h)}(hjZh]h)}(hjZh]hinline)}(hjZh]h/admin-guide/mm/kho}(hjdhhhNhNubah}(h]h ](jstdstd-doceh"]h$]h&]uh1jbhj_ubah}(h]h ]h"]h$]h&]refdocj refdomainjnreftypedoc refexplicitrefwarnj/admin-guide/mm/khouh1hhhhK'hj\ubah}(h]h ]h"]h$]h&]uh1hhhhK'hjXubah}(h]h ]h"]h$]h&]uh1jmhjUhhhhhNubah}(h]h ]h"]h$]h&]jjuh1jhhhhK'hjDhhubeh}(h]see-alsoah ]h"]see alsoah$]h&]uh1hhhhhhhhK%ubeh}(h]kexec-handover-abiah ]h"]kexec handover abiah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}j]jasnameids}(jjjyjvjjjjjijfjAj>jjjju nametypes}(jjyjjjijAjjuh}(jhjvhjj|jjjfjj>jljjj jjjjjDu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]hBHyperlink target "kho-serialization-blocks-abi" is not referenced.}hj/ sbah}(h]h ]h"]h$]h&]uh1hhj, ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcejlineKuh1j* uba transformerN include_log] decorationNhhub.