diff options
author | Sylvain Munaut <s.munaut@whatever-company.com> | 2016-08-26 12:46:15 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2016-10-07 11:54:16 +0900 |
commit | 53634c3e9a0c84b8bf262cfe88aa540a07d90b57 (patch) | |
tree | 041972435d75ed5318f2e186608a5fd55bda6bc8 | |
parent | 97b6f5f78d955733ce7ae0dcf8944af84407d615 (diff) |
multiboot: Fix length computation for the memory zones
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/kexec-multiboot-x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/i386/kexec-multiboot-x86.c b/kexec/arch/i386/kexec-multiboot-x86.c index 0dbac70..4de237c 100644 --- a/kexec/arch/i386/kexec-multiboot-x86.c +++ b/kexec/arch/i386/kexec-multiboot-x86.c @@ -252,7 +252,7 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, mmap = xmalloc(ranges * sizeof(*mmap)); for (i=0; i<ranges; i++) { unsigned long long length; - length = range[i].end - range[i].start; + length = range[i].end - range[i].start + 1; /* Translate bzImage mmap to multiboot-speak */ mmap[i].size = sizeof(mmap[i]) - 4; mmap[i].base_addr_low = range[i].start & 0xffffffff; |