From: Simon Horman <horms@verge.net.au>
To: dinhngoc.tu@irit.fr
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH] kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units
Date: Tue, 5 Oct 2021 10:18:32 +0200 [thread overview]
Message-ID: <20211005081832.GA23961@vergenet.net> (raw)
In-Reply-To: <20210924170327.6775-1-dinhngoc.tu@irit.fr>
On Fri, Sep 24, 2021 at 07:03:27PM +0200, dinhngoc.tu@irit.fr wrote:
> From: Tu Dinh <dinhngoc.tu@irit.fr>
>
> mem_lower and mem_upper are measured in kilobytes.
Thanks,
I'm curious to know how the current code could have worked.
Do we have some testing to verify this change?
> ---
> kexec/arch/i386/kexec-mb2-x86.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c
> index 36fef20..0d2e93b 100644
> --- a/kexec/arch/i386/kexec-mb2-x86.c
> +++ b/kexec/arch/i386/kexec-mb2-x86.c
> @@ -256,8 +256,8 @@ static uint64_t multiboot2_make_mbi(struct kexec_info *info, char *cmdline, int
>
> tag->type = MULTIBOOT_TAG_TYPE_BASIC_MEMINFO;
> tag->size = sizeof (struct multiboot_tag_basic_meminfo);
> - tag->mem_lower = mem_lower;
> - tag->mem_upper = mem_upper;
> + tag->mem_lower = mem_lower >> 10;
> + tag->mem_upper = mem_upper >> 10;
> ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN) / sizeof (*ptrorig);
> }
>
> --
> 2.25.1
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2021-10-05 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 17:03 [PATCH] kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units dinhngoc.tu
2021-10-05 8:18 ` Simon Horman [this message]
2021-10-05 9:13 ` dinhngoc.tu
2021-10-20 10:01 ` Simon Horman
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=20211005081832.GA23961@vergenet.net \
--to=horms@verge.net.au \
--cc=dinhngoc.tu@irit.fr \
--cc=kexec@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox