[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87jz7s4izg.fsf@all.your.base.are.belong.to.us>
Date: Thu, 10 Apr 2025 08:40:35 +0200
From: Björn Töpel <bjorn@...nel.org>
To: yunhui cui <cuiyunhui@...edance.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Alexandre Ghiti <alex@...ti.fr>, Song Shuai
<songshuaishuai@...ylab.org>, linux-riscv@...ts.infradead.org, Nick
Kossifidis <mick@....forth.gr>, linux-kernel@...r.kernel.org,
Björn Töpel
<bjorn@...osinc.com>
Subject: Re: [External] [PATCH v3 2/2] riscv: kexec_file: Support loading
Image binary file
Hey Yunhui!
yunhui cui <cuiyunhui@...edance.com> writes:
> Hi Björn,
>
> On Thu, Apr 10, 2025 at 3:31 AM Björn Töpel <bjorn@...nel.org> wrote:
...
>> + kbuf.buffer = kernel;
>> + kbuf.bufsz = kernel_len;
>> + kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
>> + kbuf.memsz = le64_to_cpu(h->image_size);
>> + kbuf.buf_align = le64_to_cpu(h->text_offset);
>
> It is necessary to ensure that the kernel entry is aligned to
> PMD_SIZE; otherwise, BUG_ON() in setup_vm() will be triggered.
Indeed, and text_offset is that [1]. FWIW, the text_offset name in the
Image has always weird/confusing to me.
Björn
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/kernel/head.S#n47
Powered by blists - more mailing lists