All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chester Lin <clin@suse.com>
To: "grub-devel@gnu.org" <grub-devel@gnu.org>
Cc: "agraf@csgraf.de" <agraf@csgraf.de>,
	"daniel.kiper@oracle.com" <daniel.kiper@oracle.com>,
	"alistair.francis@wdc.com" <alistair.francis@wdc.com>,
	Chester Lin <clin@suse.com>
Subject: [PATCH 1/2] RISC-V: Correct linux headers' definitions
Date: Thu, 16 Jan 2020 10:21:43 +0000	[thread overview]
Message-ID: <20200116102106.25136-2-clin@suse.com> (raw)
In-Reply-To: <20200116102106.25136-1-clin@suse.com>

Adjust the image hedaers based on the current definition in RISC-V LINUX.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/include/asm/image.h

Signed-off-by: Chester Lin <clin@suse.com>
---
 include/grub/riscv32/linux.h | 4 ++--
 include/grub/riscv64/linux.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/grub/riscv32/linux.h b/include/grub/riscv32/linux.h
index 512b777c8..4bb831e52 100644
--- a/include/grub/riscv32/linux.h
+++ b/include/grub/riscv32/linux.h
@@ -19,7 +19,7 @@
 #ifndef GRUB_RISCV32_LINUX_HEADER
 #define GRUB_RISCV32_LINUX_HEADER 1
 
-#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */
+#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */
 
 /* From linux/Documentation/riscv/booting.txt */
 struct linux_riscv_kernel_header
@@ -32,7 +32,7 @@ struct linux_riscv_kernel_header
   grub_uint64_t res2;		/* reserved */
   grub_uint64_t res3;		/* reserved */
   grub_uint64_t res4;		/* reserved */
-  grub_uint32_t magic;		/* Magic number, little endian, "RSCV" */
+  grub_uint32_t magic;		/* Magic number, little endian, "RSC\x05" */
   grub_uint32_t hdr_offset;	/* Offset of PE/COFF header */
 };
 
diff --git a/include/grub/riscv64/linux.h b/include/grub/riscv64/linux.h
index 3630c30fb..e4676cf5f 100644
--- a/include/grub/riscv64/linux.h
+++ b/include/grub/riscv64/linux.h
@@ -19,7 +19,7 @@
 #ifndef GRUB_RISCV64_LINUX_HEADER
 #define GRUB_RISCV64_LINUX_HEADER 1
 
-#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */
+#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */
 
 #define GRUB_EFI_PE_MAGIC	0x5A4D
 
@@ -32,9 +32,9 @@ struct linux_riscv_kernel_header
   grub_uint64_t res0;		/* reserved */
   grub_uint64_t res1;		/* reserved */
   grub_uint64_t res2;		/* reserved */
-  grub_uint64_t res3;		/* reserved */
+  grub_uint64_t res3;           /* reserved */
   grub_uint64_t res4;		/* reserved */
-  grub_uint32_t magic;		/* Magic number, little endian, "RSCV" */
+  grub_uint32_t magic;		/* Magic number, little endian, "RSC\x05" */
   grub_uint32_t hdr_offset;	/* Offset of PE/COFF header */
 };
 
-- 
2.24.0



  reply	other threads:[~2020-01-16 14:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 10:21 [PATCH 0/2] Implement a grub loader for RISC-V LINUX Chester Lin
2020-01-16 10:21 ` Chester Lin [this message]
2020-01-16 10:21 ` [PATCH 2/2] RISC-V: Implement linux image loader Chester Lin
2020-01-16 12:06 ` [PATCH 0/2] Implement a grub loader for RISC-V LINUX Alexander Graf
2020-01-16 13:14   ` Atish Patra
2020-01-16 13:27     ` Alexander Graf
2020-01-17  3:20       ` Chester Lin
2020-01-17  9:24         ` Atish Patra
2020-01-17 12:51     ` [EXTERNAL] " Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116102106.25136-2-clin@suse.com \
    --to=clin@suse.com \
    --cc=agraf@csgraf.de \
    --cc=alistair.francis@wdc.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.