Skip to content

Commit 638b642

Browse files
mchehabJonathan Corbet
authored andcommitted
docs: riscv: convert boot-image-header.txt to ReST
Convert this small file to ReST format by: - Using a proper markup for the document title; - marking a code block as such; - use tags for Author and date; - use tables for bit map fields. While here, fix a broken reference for a document with is planned but is not here yet. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 54bfe6f commit 638b642

2 files changed

Lines changed: 26 additions & 14 deletions

File tree

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
Boot image header in RISC-V Linux
2-
=============================================
1+
=================================
2+
Boot image header in RISC-V Linux
3+
=================================
34

4-
Author: Atish Patra <atish.patra@wdc.com>
5-
Date : 20 May 2019
5+
:Author: Atish Patra <atish.patra@wdc.com>
6+
:Date: 20 May 2019
67

78
This document only describes the boot image header details for RISC-V Linux.
8-
The complete booting guide will be available at Documentation/riscv/booting.txt.
99

10-
The following 64-byte header is present in decompressed Linux kernel image.
10+
TODO:
11+
Write a complete booting guide.
12+
13+
The following 64-byte header is present in decompressed Linux kernel image::
1114

1215
u32 code0; /* Executable code */
13-
u32 code1; /* Executable code */
16+
u32 code1; /* Executable code */
1417
u64 text_offset; /* Image load offset, little endian */
1518
u64 image_size; /* Effective Image size, little endian */
1619
u64 flags; /* kernel flags, little endian */
1720
u32 version; /* Version of this header */
18-
u32 res1 = 0; /* Reserved */
19-
u64 res2 = 0; /* Reserved */
21+
u32 res1 = 0; /* Reserved */
22+
u64 res2 = 0; /* Reserved */
2023
u64 magic = 0x5643534952; /* Magic number, little endian, "RISCV" */
2124
u32 res3; /* Reserved for additional RISC-V specific header */
2225
u32 res4; /* Reserved for PE COFF offset */
@@ -25,16 +28,21 @@ This header format is compliant with PE/COFF header and largely inspired from
2528
ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common
2629
header in future.
2730

28-
Notes:
31+
Notes
32+
=====
33+
2934
- This header can also be reused to support EFI stub for RISC-V in future. EFI
3035
specification needs PE/COFF image header in the beginning of the kernel image
3136
in order to load it as an EFI application. In order to support EFI stub,
3237
code0 should be replaced with "MZ" magic string and res5(at offset 0x3c) should
3338
point to the rest of the PE/COFF header.
3439

35-
- version field indicate header version number.
36-
Bits 0:15 - Minor version
37-
Bits 16:31 - Major version
40+
- version field indicate header version number
41+
42+
========== =============
43+
Bits 0:15 Minor version
44+
Bits 16:31 Major version
45+
========== =============
3846

3947
This preserves compatibility across newer and older version of the header.
4048
The current version is defined as 0.1.
@@ -44,7 +52,10 @@ Notes:
4452
extension for RISC-V in future. For current version, it is set to be zero.
4553

4654
- In current header, the flag field has only one field.
47-
Bit 0: Kernel endianness. 1 if BE, 0 if LE.
55+
56+
===== ====================================
57+
Bit 0 Kernel endianness. 1 if BE, 0 if LE.
58+
===== ====================================
4859

4960
- Image size is mandatory for boot loader to load kernel image. Booting will
5061
fail otherwise.

‎Documentation/riscv/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ RISC-V architecture
55
.. toctree::
66
:maxdepth: 1
77

8+
boot-image-header
89
pmu
910

1011
.. only:: subproject and html

0 commit comments

Comments
 (0)