diff options
author | Tu Dinh <dinhngoc.tu@irit.fr> | 2021-09-24 19:03:27 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2021-10-20 11:59:38 +0200 |
commit | bb1c95cb460501c8a11a73b9a729984b6dcecf72 (patch) | |
tree | b27b287da29f5a92580c2cc1fbb2b79bf432dc2d | |
parent | a4d49e8b58bbf6c3572f363d33fe2db7dc73b7bc (diff) |
kexec-tools: multiboot2: Correct BASIC_MEMINFO memory units
mem_lower and mem_upper are measured in kilobytes.
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/kexec-mb2-x86.c | 4 |
1 files 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); } |