* [PATCH] docs: riscv: convert boot-image-header.txt to ReST
[not found] <57eaa99a-d644-7b79-7177-a45d3ef1e71a@wdc.com>
@ 2019-07-26 21:01 ` Mauro Carvalho Chehab
2019-07-26 22:24 ` Atish Patra
2019-07-31 19:02 ` Jonathan Corbet
0 siblings, 2 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2019-07-26 21:01 UTC (permalink / raw)
To: Linux Doc Mailing List
Cc: Albert Ou, Jonathan Corbet, Linus Walleij, Palmer Dabbelt,
linux-kernel, Mauro Carvalho Chehab, Atish Patra, Paul Walmsley,
Mauro Carvalho Chehab, linux-riscv, Karsten Merker
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>
---
| 39 ++++++++++++-------
Documentation/riscv/index.rst | 1 +
2 files changed, 26 insertions(+), 14 deletions(-)
rename Documentation/riscv/{boot-image-header.txt => boot-image-header.rst} (72%)
diff --git a/Documentation/riscv/boot-image-header.txt b/Documentation/riscv/boot-image-header.rst
similarity index 72%
rename from Documentation/riscv/boot-image-header.txt
rename to Documentation/riscv/boot-image-header.rst
index 1b73fea23b39..43e9bd0731d5 100644
--- a/Documentation/riscv/boot-image-header.txt
+++ b/Documentation/riscv/boot-image-header.rst
@@ -1,22 +1,25 @@
- Boot image header in RISC-V Linux
- =============================================
+=================================
+Boot image header in RISC-V Linux
+=================================
-Author: Atish Patra <atish.patra@wdc.com>
-Date : 20 May 2019
+:Author: Atish Patra <atish.patra@wdc.com>
+:Date: 20 May 2019
This document only describes the boot image header details for RISC-V Linux.
-The complete booting guide will be available at Documentation/riscv/booting.txt.
-The following 64-byte header is present in decompressed Linux kernel image.
+TODO:
+ Write a complete booting guide.
+
+The following 64-byte header is present in decompressed Linux kernel image::
u32 code0; /* Executable code */
- u32 code1; /* Executable code */
+ u32 code1; /* Executable code */
u64 text_offset; /* Image load offset, little endian */
u64 image_size; /* Effective Image size, little endian */
u64 flags; /* kernel flags, little endian */
u32 version; /* Version of this header */
- u32 res1 = 0; /* Reserved */
- u64 res2 = 0; /* Reserved */
+ 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 res4; /* Reserved for PE COFF offset */
@@ -25,16 +28,21 @@ This header format is compliant with PE/COFF header and largely inspired from
ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common
header in future.
-Notes:
+Notes
+=====
+
- This header can also be reused to support EFI stub for RISC-V in future. EFI
specification needs PE/COFF image header in the beginning of the kernel image
in order to load it as an EFI application. In order to support EFI stub,
code0 should be replaced with "MZ" magic string and res5(at offset 0x3c) should
point to the rest of the PE/COFF header.
-- version field indicate header version number.
- Bits 0:15 - Minor version
- Bits 16:31 - Major version
+- version field indicate header version number
+
+ ========== =============
+ Bits 0:15 Minor version
+ Bits 16:31 Major version
+ ========== =============
This preserves compatibility across newer and older version of the header.
The current version is defined as 0.1.
@@ -44,7 +52,10 @@ Notes:
extension for RISC-V in future. For current version, it is set to be zero.
- In current header, the flag field has only one field.
- Bit 0: Kernel endianness. 1 if BE, 0 if LE.
+
+ ===== ====================================
+ Bit 0 Kernel endianness. 1 if BE, 0 if LE.
+ ===== ====================================
- Image size is mandatory for boot loader to load kernel image. Booting will
fail otherwise.
diff --git a/Documentation/riscv/index.rst b/Documentation/riscv/index.rst
index e3ca0922a8c2..215fd3c1f2d5 100644
--- a/Documentation/riscv/index.rst
+++ b/Documentation/riscv/index.rst
@@ -5,6 +5,7 @@ RISC-V architecture
.. toctree::
:maxdepth: 1
+ boot-image-header
pmu
.. only:: subproject and html
--
2.21.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] docs: riscv: convert boot-image-header.txt to ReST
2019-07-26 21:01 ` [PATCH] docs: riscv: convert boot-image-header.txt to ReST Mauro Carvalho Chehab
@ 2019-07-26 22:24 ` Atish Patra
2019-07-31 19:02 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Atish Patra @ 2019-07-26 22:24 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: Albert Ou, Jonathan Corbet, Linus Walleij, Palmer Dabbelt,
linux-kernel@vger.kernel.org, Mauro Carvalho Chehab,
Paul Walmsley, Karsten Merker, linux-riscv@lists.infradead.org
On 7/26/19 2:02 PM, Mauro Carvalho Chehab wrote:
> 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>
> ---
> ...image-header.txt => boot-image-header.rst} | 39 ++++++++++++-------
> Documentation/riscv/index.rst | 1 +
> 2 files changed, 26 insertions(+), 14 deletions(-)
> rename Documentation/riscv/{boot-image-header.txt => boot-image-header.rst} (72%)
>
> diff --git a/Documentation/riscv/boot-image-header.txt b/Documentation/riscv/boot-image-header.rst
> similarity index 72%
> rename from Documentation/riscv/boot-image-header.txt
> rename to Documentation/riscv/boot-image-header.rst
> index 1b73fea23b39..43e9bd0731d5 100644
> --- a/Documentation/riscv/boot-image-header.txt
> +++ b/Documentation/riscv/boot-image-header.rst
> @@ -1,22 +1,25 @@
> - Boot image header in RISC-V Linux
> - =============================================
> +=================================
> +Boot image header in RISC-V Linux
> +=================================
>
> -Author: Atish Patra <atish.patra@wdc.com>
> -Date : 20 May 2019
> +:Author: Atish Patra <atish.patra@wdc.com>
> +:Date: 20 May 2019
>
> This document only describes the boot image header details for RISC-V Linux.
> -The complete booting guide will be available at Documentation/riscv/booting.txt.
>
> -The following 64-byte header is present in decompressed Linux kernel image.
> +TODO:
> + Write a complete booting guide.
> +
> +The following 64-byte header is present in decompressed Linux kernel image::
>
> u32 code0; /* Executable code */
> - u32 code1; /* Executable code */
> + u32 code1; /* Executable code */
> u64 text_offset; /* Image load offset, little endian */
> u64 image_size; /* Effective Image size, little endian */
> u64 flags; /* kernel flags, little endian */
> u32 version; /* Version of this header */
> - u32 res1 = 0; /* Reserved */
> - u64 res2 = 0; /* Reserved */
> + 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 res4; /* Reserved for PE COFF offset */
> @@ -25,16 +28,21 @@ This header format is compliant with PE/COFF header and largely inspired from
> ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common
> header in future.
>
> -Notes:
> +Notes
> +=====
> +
> - This header can also be reused to support EFI stub for RISC-V in future. EFI
> specification needs PE/COFF image header in the beginning of the kernel image
> in order to load it as an EFI application. In order to support EFI stub,
> code0 should be replaced with "MZ" magic string and res5(at offset 0x3c) should
> point to the rest of the PE/COFF header.
>
> -- version field indicate header version number.
> - Bits 0:15 - Minor version
> - Bits 16:31 - Major version
> +- version field indicate header version number
> +
> + ========== =============
> + Bits 0:15 Minor version
> + Bits 16:31 Major version
> + ========== =============
>
> This preserves compatibility across newer and older version of the header.
> The current version is defined as 0.1.
> @@ -44,7 +52,10 @@ Notes:
> extension for RISC-V in future. For current version, it is set to be zero.
>
> - In current header, the flag field has only one field.
> - Bit 0: Kernel endianness. 1 if BE, 0 if LE.
> +
> + ===== ====================================
> + Bit 0 Kernel endianness. 1 if BE, 0 if LE.
> + ===== ====================================
>
> - Image size is mandatory for boot loader to load kernel image. Booting will
> fail otherwise.
> diff --git a/Documentation/riscv/index.rst b/Documentation/riscv/index.rst
> index e3ca0922a8c2..215fd3c1f2d5 100644
> --- a/Documentation/riscv/index.rst
> +++ b/Documentation/riscv/index.rst
> @@ -5,6 +5,7 @@ RISC-V architecture
> .. toctree::
> :maxdepth: 1
>
> + boot-image-header
> pmu
>
> .. only:: subproject and html
>
Thanks for the quick patch.
Reviewed-by: Atish Patra <atish.patra@wdc.com>
--
Regards,
Atish
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] docs: riscv: convert boot-image-header.txt to ReST
2019-07-26 21:01 ` [PATCH] docs: riscv: convert boot-image-header.txt to ReST Mauro Carvalho Chehab
2019-07-26 22:24 ` Atish Patra
@ 2019-07-31 19:02 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2019-07-31 19:02 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Albert Ou, Linux Doc Mailing List, Linus Walleij, Palmer Dabbelt,
linux-kernel, Mauro Carvalho Chehab, Atish Patra, Paul Walmsley,
Karsten Merker, linux-riscv
On Fri, 26 Jul 2019 18:01:55 -0300
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> 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>
Applied, thanks.
jon
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-31 19:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <57eaa99a-d644-7b79-7177-a45d3ef1e71a@wdc.com>
2019-07-26 21:01 ` [PATCH] docs: riscv: convert boot-image-header.txt to ReST Mauro Carvalho Chehab
2019-07-26 22:24 ` Atish Patra
2019-07-31 19:02 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).