Merge tag 'docs-5.4' of git://git.lwn.net/linux
[sfrench/cifs-2.6.git] / Documentation / riscv / boot-image-header.rst
index 43e9bd0731d5f1642d5abe604200217444bdf599..7b4d1d747585e7717b489300908ae3bf35aae82b 100644 (file)
@@ -21,7 +21,7 @@ The following 64-byte header is present in decompressed Linux kernel image::
        u32 res1 = 0;             /* Reserved */
        u64 res2 = 0;             /* Reserved */
        u64 magic = 0x5643534952; /* Magic number, little endian, "RISCV" */
-       u32 res3;                 /* Reserved for additional RISC-V specific header */
+       u32 magic2 = 0x56534905;  /* Magic number 2, little endian, "RSC\x05" */
        u32 res4;                 /* Reserved for PE COFF offset */
 
 This header format is compliant with PE/COFF header and largely inspired from
@@ -45,13 +45,14 @@ Notes
        ==========  =============
 
   This preserves compatibility across newer and older version of the header.
-  The current version is defined as 0.1.
+  The current version is defined as 0.2.
 
-- res3 is reserved for offset to any other additional fields. This makes the
-  header extendible in future. One example would be to accommodate ISA
-  extension for RISC-V in future. For current version, it is set to be zero.
+- The "magic" field is deprecated as of version 0.2.  In a future
+  release, it may be removed.  This originally should have matched up
+  with the ARM64 header "magic" field, but unfortunately does not.
+  The "magic2" field replaces it, matching up with the ARM64 header.
 
-- In current header, the flag field has only one field.
+- In current header, the flags field has only one field.
 
        =====  ====================================
        Bit 0  Kernel endianness. 1 if BE, 0 if LE.