Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units
@ 2021-09-24 17:03 dinhngoc.tu
  2021-10-05  8:18 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: dinhngoc.tu @ 2021-09-24 17:03 UTC (permalink / raw)
  To: kexec; +Cc: Tu Dinh

From: Tu Dinh <dinhngoc.tu@irit.fr>

mem_lower and mem_upper are measured in kilobytes.
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-20 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-24 17:03 [PATCH] kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units dinhngoc.tu
2021-10-05  8:18 ` Simon Horman
2021-10-05  9:13   ` dinhngoc.tu
2021-10-20 10:01     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox