diff options
author | Friedemann Gerold <cinap_lenrek@felloff.net> | 2018-08-02 16:05:02 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2019-01-28 11:44:26 +0100 |
commit | 2880a35f38cd43b6cd118018d9bceb4c27964a84 (patch) | |
tree | 16a41fa18b6e1b33d1e06cbd2ad7b259f0745387 | |
parent | 8776bf88e50d0255ee612009a43e44ad5189d0f8 (diff) | |
download | kexec-tools-2880a35f38cd43b6cd118018d9bceb4c27964a84.tar.gz |
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 <cinap_lenrek@felloff.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/kexec-multiboot-x86.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c index f55bacac..afa09590 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) */ } } |