grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] RISC-V: Correct linux headers' definitions


From: Chester Lin
Subject: [PATCH 1/2] RISC-V: Correct linux headers' definitions
Date: Thu, 16 Jan 2020 10:21:43 +0000

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 <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]