summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-09-07 23:19:35 -0700
committerSimon Horman <horms@verge.net.au>2010-09-09 17:06:34 +0900
commitbec38dd6ae9bde528d8723b9e88024e121424ae4 (patch)
tree7da81eaa3108fee02caa65aba262bbf62e5d8846 /kexec
parented7780a5022bb4a9b9a23de1bda99c6de9921195 (diff)
x86 bzImage: Optimize the panic kernel memory layout.
Load the setup sectors above the kernel in the panic case, to avoid wasting memory. Linux kernels frequently have a severe alignment requirment that can be as much as 16M. The start of the reserved crash kernel region is 16M aligned. The setup sectors are tiny 20k? and when we are not running the real mode code they can live anywhere. Move the setup sectors from lower address than the kernel to higher address than the kernel avoids introducing a bad alignment. Allowing the linux kernel to load lower. Loading the linux kernel lower in memory ensures memory is used more efficiently. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/i386/kexec-bzImage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index ae18689..83d3a69 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -1,7 +1,7 @@
/*
* kexec: Linux boots Linux
*
- * Copyright (C) 2003-2005 Eric Biederman (ebiederm@xmission.com)
+ * Copyright (C) 2003-2010 Eric Biederman (ebiederm@xmission.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -217,7 +217,7 @@ int do_bzImage_load(struct kexec_info *info,
* anywhere as we will be just reading command line.
*/
setup_base = add_buffer(info, real_mode, setup_size, setup_size,
- 16, 0x3000, -1, 1);
+ 16, 0x3000, -1, -1);
}
else if (real_mode->protocol_version >= 0x0200) {
/* Careful setup_base must be greater than 8K */