Linux-RISC-V Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian
@ 2019-09-16 13:01 Chester Lin
  2019-10-01 13:22 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Chester Lin @ 2019-09-16 13:01 UTC (permalink / raw)
  To: corbet, paul.walmsley, palmer, aou, atish.patra
  Cc: Chester Lin, linux-riscv, linux-doc

Correct the sequence of the magic number 2 since it's little endian.

Signed-off-by: Chester Lin <clin@suse.com>
---
 Documentation/riscv/boot-image-header.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/riscv/boot-image-header.txt b/Documentation/riscv/boot-image-header.txt
index 14b1492f689b..f388805aa5c3 100644
--- a/Documentation/riscv/boot-image-header.txt
+++ b/Documentation/riscv/boot-image-header.txt
@@ -18,7 +18,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 magic2 = 0x56534905;  /* Magic number 2, little endian, "RSC\x05" */
+	u32 magic2 = 0x05435352;  /* 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
-- 
2.22.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian
  2019-09-16 13:01 [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian Chester Lin
@ 2019-10-01 13:22 ` Jonathan Corbet
  2019-10-01 18:35   ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2019-10-01 13:22 UTC (permalink / raw)
  To: Chester Lin
  Cc: aou, linux-doc, palmer, atish.patra, paul.walmsley, linux-riscv

On Mon, 16 Sep 2019 13:01:40 +0000
Chester Lin <clin@suse.com> wrote:

> Correct the sequence of the magic number 2 since it's little endian.
> 
> Signed-off-by: Chester Lin <clin@suse.com>
> ---
>  Documentation/riscv/boot-image-header.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

So I'm slowly digging my way through my docs folder, sorry for the delay.

> diff --git a/Documentation/riscv/boot-image-header.txt b/Documentation/riscv/boot-image-header.txt
> index 14b1492f689b..f388805aa5c3 100644
> --- a/Documentation/riscv/boot-image-header.txt
> +++ b/Documentation/riscv/boot-image-header.txt
> @@ -18,7 +18,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 magic2 = 0x56534905;  /* Magic number 2, little endian, "RSC\x05" */
> +	u32 magic2 = 0x05435352;  /* Magic number 2, little endian, "RSC\x05" */

That's doing more than just reordering the bytes.  Was the original
completely wrong?  If so, the changelog should probably reflect that.  Or
else what am I missing?

Thanks,

jon

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian
  2019-10-01 13:22 ` Jonathan Corbet
@ 2019-10-01 18:35   ` Paul Walmsley
  2019-10-03 16:52     ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2019-10-01 18:35 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: aou, linux-doc, palmer, Chester Lin, atish.patra, linux-riscv

Hi Jon,

On Tue, 1 Oct 2019, Jonathan Corbet wrote:

> On Mon, 16 Sep 2019 13:01:40 +0000
> Chester Lin <clin@suse.com> wrote:
> 
> > Correct the sequence of the magic number 2 since it's little endian.
> > 
> > Signed-off-by: Chester Lin <clin@suse.com>
> > ---
> >  Documentation/riscv/boot-image-header.txt | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> So I'm slowly digging my way through my docs folder, sorry for the delay.
> 
> > diff --git a/Documentation/riscv/boot-image-header.txt b/Documentation/riscv/boot-image-header.txt
> > index 14b1492f689b..f388805aa5c3 100644
> > --- a/Documentation/riscv/boot-image-header.txt
> > +++ b/Documentation/riscv/boot-image-header.txt
> > @@ -18,7 +18,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 magic2 = 0x56534905;  /* Magic number 2, little endian, "RSC\x05" */
> > +	u32 magic2 = 0x05435352;  /* Magic number 2, little endian, "RSC\x05" */
> 
> That's doing more than just reordering the bytes.  Was the original
> completely wrong?  If so, the changelog should probably reflect that.  Or
> else what am I missing?

This was simply due to idiocy on my part, due to a very last-minute patch 
submission, where I missed that the original documented magic number was 
already in little-endian format.  The updated number from Chester is 
correct.

So,

Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com>


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian
  2019-10-01 18:35   ` Paul Walmsley
@ 2019-10-03 16:52     ` Jonathan Corbet
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2019-10-03 16:52 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: aou, linux-doc, palmer, Chester Lin, atish.patra, linux-riscv

On Tue, 1 Oct 2019 11:35:11 -0700 (PDT)
Paul Walmsley <paul.walmsley@sifive.com> wrote:

> This was simply due to idiocy on my part, due to a very last-minute patch 
> submission, where I missed that the original documented magic number was 
> already in little-endian format.  The updated number from Chester is 
> correct.
> 
> So,
> 
> Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com>

Great, patch 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] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 13:01 [PATCH] riscv-docs: correct the sequence of the magic number 2 since it's little endian Chester Lin
2019-10-01 13:22 ` Jonathan Corbet
2019-10-01 18:35   ` Paul Walmsley
2019-10-03 16:52     ` Jonathan Corbet

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org infradead-linux-riscv@archiver.kernel.org
	public-inbox-index linux-riscv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox