From bb1c95cb460501c8a11a73b9a729984b6dcecf72 Mon Sep 17 00:00:00 2001 From: Tu Dinh Date: Fri, 24 Sep 2021 19:03:27 +0200 Subject: kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units mem_lower and mem_upper are measured in kilobytes. Signed-off-by: Simon Horman --- 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 36fef209..0d2e93b1 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); } -- cgit 1.2.3-korg