[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 6/7] RISC-V: Update image header
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v3 6/7] RISC-V: Update image header |
Date: |
Thu, 25 Nov 2021 17:29:30 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Oct 28, 2021 at 11:31:19PM +0300, Nikita Ermakov wrote:
> From: Atish Patra <atish.patra@wdc.com>
>
> Update the RISC-V Linux kernel image headers as per the current header.
>
> Reference:
> <Linux kernel source>/Documentation/riscv/boot-image-header.rst
May I ask you to put the Linux kernel commit ID and its subject of the
boot spec which you are referencing here?
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
> include/grub/riscv32/linux.h | 15 ++++++++-------
> include/grub/riscv64/linux.h | 15 ++++++++-------
> 2 files changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/include/grub/riscv32/linux.h b/include/grub/riscv32/linux.h
> index 512b777c8..de0dbdcd1 100644
> --- a/include/grub/riscv32/linux.h
> +++ b/include/grub/riscv32/linux.h
> @@ -19,20 +19,21 @@
> #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\0x5' */
>
> -/* From linux/Documentation/riscv/booting.txt */
> +/* From linux/Documentation/riscv/boot-image-header.rst */
> struct linux_riscv_kernel_header
> {
> grub_uint32_t code0; /* Executable code */
> grub_uint32_t code1; /* Executable code */
> - grub_uint64_t text_offset; /* Image load offset */
> - grub_uint64_t res0; /* reserved */
> - grub_uint64_t res1; /* reserved */
> + grub_uint64_t text_offset; /* Image load offset, little endian */
> + grub_uint64_t image_size; /* Effective Image size, little endian */
> + grub_uint64_t flags; /* kernel flags, little endian */
> + grub_uint32_t version; /* Version of this header */
> + grub_uint32_t res1; /* reserved */
> 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" */
This does not agree with the latest spec in the Linux kernel.
Daniel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 6/7] RISC-V: Update image header,
Daniel Kiper <=