From 2880a35f38cd43b6cd118018d9bceb4c27964a84 Mon Sep 17 00:00:00 2001 From: Friedemann Gerold Date: Thu, 2 Aug 2018 16:05:02 +0200 Subject: multiboot-x86: pass ACPI reserved memory information in memory map Use the appropriate types for ACPI reclaim and ACPI NVS ranges in the multiboot memory map. This allows the kernel to locate ACPI tables on UEFI systems without having a explicit pointer to the RSD. Signed-off-by: Friedemann Gerold Signed-off-by: Simon Horman --- kexec/arch/i386/kexec-multiboot-x86.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c index f55baca..afa0959 100644 --- a/kexec/arch/i386/kexec-multiboot-x86.c +++ b/kexec/arch/i386/kexec-multiboot-x86.c @@ -286,7 +286,8 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, mmap[i].base_addr_high = range[i].start >> 32; mmap[i].length_low = length & 0xffffffff; mmap[i].length_high = length >> 32; - if (range[i].type == RANGE_RAM) { + switch (range[i].type) { + case RANGE_RAM: mmap[i].Type = 1; /* RAM */ /* * Is this the "low" memory? Can't just test @@ -304,7 +305,15 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, if ((range[i].start <= 0x100000) && (range[i].end > mem_upper + 0x100000)) mem_upper = range[i].end - 0x100000; - } else { + break; + case RANGE_ACPI: + mmap[i].Type = 3; + break; + case RANGE_ACPI_NVS: + mmap[i].Type = 4; + break; + case RANGE_RESERVED: + default: mmap[i].Type = 2; /* Not RAM (reserved) */ } } -- cgit