Age | Commit message (Collapse) | Author |
|
Seems that Xen actually checks for some zones to be 'reserved' and
complains if they are not.
This also matches what the bios uses at boot.
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
If "--command-line" option is not specified, then kexec segfaults while
dereferencing NULL command line string pointer. While we are at it, also
fix indentation and use '{' and '}' consistently.
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
In the multiboot header, there is a field, `mem_lower' that is meant to
contain the size of memory starting at zero and ending below 640k.
If your kernel is compiled with CONFIG_X86_RESERVE_LOW non zero
(the usual case), then a hole is inserted into kernel's physical
memory map at zero, so the test to find the size of this region in
kexec/arch/i386/kexec-multiboot-x86.c never succeeds, so the value is
always zero.
On a PC99 architecture, there is always memory at physycal address zero;
assume that a region that starts below 64k actually starts at zero,
and use it for the mem_lower variable.
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The main kexec option code handles the -? option. Remove all the
duplicate -? handlers in the arch code which are never used.
Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Since get_command_line returns dynamically allocated memory, it is
easy for the caller to forget freeing the memory. Here fixes a
memory leak caused by this function.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
In multiboot_x86_load, allocated memory may not be free'd if the code
exits abnormally, by calling return. So the patch fixes the possible
memory leak.
Besides, remove some extra blank lines.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
By replacing all the explicit align opertion with marco _ALIGN*,
the code logic could be more clear.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
At first, we have already filled the kexec_info.memory_ranges by
calling my_load() -> get_memory_ranges(). So if we want to
get the memory information, we could just use the existing
one instead of calling get_memory_ranges again.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The argument parsing is currently a bit broken as main()'s getopt_long()
knows nothing about either the architecture-specific options or, even
more specifically, the architecture-and-loader-specific options.
This patch introduces new #defines for all architectures,
KEXEC_ALL_OPTIONS and KEXEC_ALL_OPT_STR. These contain all possible
options for a given build, and the getopt_long() passes in main() and
arch_process_options() will now recognise arch- and loader-specific
options; these will not be re-ordered in argv[], there is no confusion
over which argv[] entry is the kernel filename, and using '--opt=foo' and
'--opt foo' both work.
All architectures have command line options (and #define OPT_BLAHs)
consolidated into their include/arch/option.h files. x86_64 builds
parts of i386/ as well, so now both share a single option.h file (with
a symlink).
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The consumer of the purgatory buffer, elf_rel_build_load()
expects a signed char buffer.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
A colleague of mine implemented kdump and it used --reuse-cmdline
with some rather interesting and unexpected results.
Update the getopt specification so that --reuse-cmdline does not
attempt to take an argument that it will not use.
Update the processing of --append so that --reuse-cmdline followed
by --append actually appends the parameters specified by --reuse-cmdline.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
|
|
This patch adds an option "--reuse-cmdline" for people that are lazy in typing
--append="$(cat /proc/cmdline)". The advantage of "--reuse-cmdline" is also that
it strips off BOOT_IMAGE (since it may not be correct any more) from lilo and
other boot loaders, and, more important, the crashkernel option in case a
panic kernel is loaded.
If you like the option I can also add it for really all architectures. Tested only
with x86-bzImage both the kexec and kdump case.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Other architectures also include sys/mman.h and likely don't need to, but
I can't easily test that.
Signed-off-by: Jamey Sharp <jamey@thetovacompany.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Jamey Sharp <jamey@thetovacompany.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The BOOTLOADER and BOOTLOADER_VERSION #defines are repeated in multiple
files. This change removes the unnecessary definition of these, and
keeps the kexec/kexec.h as the main source.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On x86_64 machines running kernels having relocatale kernel patches
compilation of kexec tools fails with following error.
kexec/arch/i386/kexec-multiboot-x86.c:347: warning: implicit declaration of function ‘_AC’
kexec/arch/i386/kexec-multiboot-x86.c:347: error: ‘UL’ undeclared (first use in this function)
kexec/arch/i386/kexec-multiboot-x86.c:347: error: (Each undeclared identifier is reported only once
kexec/arch/i386/kexec-multiboot-x86.c:347: error: for each function it appears in.)
The error is bacause of the use of PAGE_SIZE macro in the above file. On
x86_64 arch PAGE_SIZE is defined as
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
and hence fails to find definitation for _AC().
The correct way to fix this is to use getpagesize() function instead of
PAGE_SIZE macro.
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Acked-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by : Simon Horman <horms@verge.net.au>
|
|
o Fix i386 compilation issues.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
o This patch adds support for reserving space for backup region. Also adds code
in purgatory to copy the first 640K to backup region.
o Moved kexec_flags inside kexec_info structure.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
|
|
- Initial import into git
- initial nbi image formage support
- ppc32 initial register setting fixes.
- gzipped multiboot file support
|