summaryrefslogtreecommitdiffstats
path: root/kexec
diff options
context:
space:
mode:
authorZhaofeng Li <hello@zhaofeng.li>2021-09-13 20:51:41 -0700
committerSimon Horman <horms@verge.net.au>2021-09-14 13:22:41 +0200
commite38819573d3b05fc3a32401988527f29f708de68 (patch)
treee1666114b58927fd19d7f82d9c0a7b6031e674bb /kexec
parent1d0275858f526a15733c29d18fac0d2347ec3496 (diff)
downloadkexec-tools-e38819573d3b05fc3a32401988527f29f708de68.tar.gz
multiboot2: Avoid first 0x500 bytes
In some cases, add_buffer will actually try to allocate the buffer at 0x0, which may not be acceptable by some kernels. Let's avoid the first 0x500 bytes so we don't screw up the IVT and BDA. Signed-off-by: Zhaofeng Li <hello@zhaofeng.li> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/i386/kexec-mb2-x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c
index f3c64383..f3e6b38f 100644
--- a/kexec/arch/i386/kexec-mb2-x86.c
+++ b/kexec/arch/i386/kexec-mb2-x86.c
@@ -526,7 +526,7 @@ int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
rel_min = lu_start + 4096;
rel_max = lu_end;
} else {
- rel_min = 0;
+ rel_min = 0x500;
rel_max = ULONG_MAX;
}