[PATCH v2 4/5] multiboot2: Avoid first 0x500 bytes
Zhaofeng Li
hello at zhaofeng.li
Mon Sep 13 20:51:41 PDT 2021
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 at zhaofeng.li>
---
kexec/arch/i386/kexec-mb2-x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c
index f3c6438..f3e6b38 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;
}
--
2.32.0
More information about the kexec
mailing list