Age | Commit message (Collapse) | Author |
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
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 follows the ARM change, and wires up uImage support on SH, with
all of the same caveats.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
|
This is a completely generic header for uImage support and has no
place being hidden away in an architecture directory. Move it up
to the top-level include so that other architectures can trivially
tie in uImage support, too.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
|
x86_64 specific support, including crash memory range and purgatory setup.
Corresponding kernel support has been merged already.
Together with the kexec jump features in Linux kernel, kexec jump can
be used for following:
- A simple hibernation implementation without ACPI support. You can
kexec a hibernating kernel, save the memory image of original system
and shutdown the system. When resuming, you restore the memory image
of original system via ordinary kexec load then jump back.
- Kernel/system debug through making system snapshot. You can make
system snapshot with kexec/kdump, jump back, do some thing and make
another system snapshot.
- Cooperative multi-kernel/system. With kexec jump, you can switch
between several kernels/systems quickly without boot process except
the first time. This appears like swap a whole kernel/system out/in.
- A general method to call program in physical mode (paging turning
off). This can be used to invoke BIOS code under Linux.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
There are many variants of arm and it seems to be impractical to
add them all to the arches array. Instead just match on the
leading "arm" portion of the utsname.
I have made this specific to arm for now, as I'm not sure what
fallout might occur if it was made more generic. e.g. arch ppc
matching utsname ppc64 is a concern.
Based on variants of this patch submitted by Andrea Adami and
Marc Andre Tanner, and feedback from Magnus Damm.
Cc: Andrea Adami <andrea.adami@gmail.com>
Cc: Marc Andre Tanner <mat@brain-dump.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Current x86/x86-64 kexec-tools print the message "I'm in purgatory" to serial
console/VGA while executing the purgatory code. Implement this feature for
POWERPC pseries platform by using the H_PUT_TERM_CHAR hypervisor call by
printng to hvc console.
Includes the changes suggested by Michael Ellerman
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
uImages are basically just zImages with a special header,
we therefore just skip the header and let the normal zImage
infrastructure do the actual work.
Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add kexec-tools support for arm processors identifying themselves
as armv7l. This includes sh7377 and the omap3 on my beagle board.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add kexec-tools support for arm processors identifying themselves
as armv6l. Tested on a sh7367.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Hi all,
I cannot load a x86_64 kernel with kexec on 2.6.31; the error message is:
Can't find kernel text map area from kcore
Cannot load /boot/vmlinuz
Digging through the source I found a mismatch between the assumed
kernel text size; kexec has:
#define KERNEL_TEXT_SIZE (40UL*1024*1024)
but on the kernel side we have:
include/asm/page_64_types.h:
#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
And, indeed, changing the definition in kexec-tools to the kernel one
fixed the problem.
Not sure if this has been reported before, if so please ignore
the noise.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
[PATCH 2/2] Support R_PPC64_REL32 relocation type
gcc-4.4 compiler creates R_PPC64_REL32 relocation type in the ppc64
purgatory code. Add support to handle R_PPC64_REL32 relocation type.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
[PATCH 1/2] Make dtstruct variable to be 8 byte aligned
kexec is creating a version 3 device tree to be backwards compatible. This
version of the struct has 8-byte alignment for properties whose value is 8 or
more bytes. As the code directly checks the pointer when deciding to add the
alignment word, the struct memory must start on an 8 byte boundary. Force the
dtstruct variable to be always 8 bytes aligned.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Use a physical address for the SuperH zImage entry point.
This makes the zImage loader behave as the elf loader.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Create elf header and modify the kernel command line
when loading a crash kernel or a kexec jump kernel.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The following patch was discussed sometime back on kexec-tools mailing list.
http://lists.infradead.org/pipermail/kexec/2008-December/003096.html
Sending it here again for inclusion into kexec-tools. thanks
====================================
Exclude GART memory region and make kexec-tools to not create elf headers to
it. Currently it seems like the dump analysis tools do not need a copy of the
GART memory region, hence ignoring it in kexec-tools. Symtoms of accessing
this region in kdump kernel included hangs, spurious restarts, and MCE
(Machine Check Exception) panics in some AMD Opteron systems
Signed-off-by: Chandru S <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The initialization of lmb_size and num_of_lmbs got removed as part of the
'kexec memory ranges dynamic allocation' patch to kexec-tools (which added
realloc_memory_ranges() code to kexec-tools). These variables are pertinent
to ppc64 systems with ibm,dynamic-reconfiguration-memory node in device-tree,
i.e systems with /proc/device-tree/ibm,dynamic-reconfiguration-memory. The
following patch adds code to initialize the variables back again in kexec-tools.
Without this patch kexec-tools will think that it needs to save only the memory
represented in memory@ nodes and will skip the memory in
/proc/device-tree/ibm,dynamic-reconfiguration-memory node of the device-tree.
Signed-off-by: Chandru S <chandru@linux.vnet.ibm.com>
Reviewed-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Remove the fprintf(stderr,...) in get_memory_ranges() that adds unnecessary
output in the normal kexec case that the user don't want to see.
Use dbgprintf() in get_base_ranges() instead of
#ifdef DEBUG
fprintf(stderr,...)
#endif
to to make the code more readable.
Signed-off-by: Bernhard Walle <bwalle@suse.de>diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index ad8a31c..8d4e42b 100644
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Because realloc_memory_ranges() makes the old memory invalid, and we return
a pointer to memory_range in get_memory_ranges(), we need to copy the contents
in get_memory_ranges().
Some code that calls realloc_memory_ranges() may be triggered by
get_base_ranges() which is called after get_memory_ranges().
Yes, the memory needs to be deleted somewhere, but I don't know currently
where it's the best, and since it's not in a loop and memory is deleted
anyway after program termination I don't want to introduce unneccessary
complexity. The problem is that get_base_ranges() gets called from
architecture independent code and that allocation is PPC64-specific here.
Signed-off-by: Bernhard Walle <bwalle@suse.de>diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index b0d8acd..ad8a31c 100644
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The base_memory_range should not become memory_range. We need to realloc
base_memory_range to not change the contents of memory. That was a copy & paste
error.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This fixes the following compiler warning
kexec/arch/i386/crashdump-x86.c: In function 'get_crash_memory_ranges':
kexec/arch/i386/crashdump-x86.c:144: warning: passing argument 1 of \
'fprintf' from incompatible pointer type
kexec/arch/i386/crashdump-x86.c:144: warning: passing argument 2 of \
'fprintf' makes pointer from integer without a cast
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
don't copy purgatory, as elf-load-rel does that for us (like x86_64).
move function declarations from c to h files
remove casts between void * and various pointers
change some pointers between char and unsigned char *
change args to be vars of the right type instead of casting or
copying between types
Signed-off-by: Milton Miller <miltonm@bga.com>
Tested-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Instead of fetching data from the segment array, remember the address
when added and find the kernel text from the parsed elf header.
While add_segment (and hence add_buffer) always adds to the end of
the list of segments, it sorts the previous segments before each
allocation. In some layouts, the device tree or initrd will fit
in a hole below the the kernel. When that happens, the previus
code mis-patches purgatory and the kexec fails.
Signed-off-by: Milton Miller <miltonm@bga.com>
Tested-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The kernel updated its ABI to tell the relocatable kernel to run
where it was loaded.
We now need to set a flag in the kernel image. Since we only have
the kernel image avialable as const data to kexec-tools c code, set
the flag in the copy we put in purgatory, and have it set the flag
in the kernel (after purgatory has run its checksum). To simplfy
the purgatory code we can always copy the flag word back to the
kernel as the c code made a copy of the original flag value.
Signed-off-by: Milton Miller <miltonm@bga.com>
Tested-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
make the idom "always call realloc_memory_ranges when filling a range entry"
kexec was core dumping after using 5 exclude_range pairs when only 3
were allocated.
also delcare realloc_memory_ranges to take void.
Signed-off-by: Milton Miller <miltonm@bga.com>
Tested-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This patch fixes:
kexec/arch/i386/kexec-x86-common.c: In function ‘get_memory_ranges’:
kexec/arch/i386/kexec-x86-common.c:189: \
warning: passing argument 2 of ‘parse_iomem_single’ from incompatible pointer type
kexec/arch/i386/kexec-x86-common.c:189: \
warning: passing argument 3 of ‘parse_iomem_single’ from incompatible pointer type
Yes, that was my own code. :-(
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On Xen, we have to use /proc/iomem to retrieve the memory area for the kexec'd
kernel, not /sys/firmware/memmap. Dom0 kernel gets a E820 map that contains
only one region:
0000000000000000-0000000018e5e000 (System RAM)
Compared to the /proc/iomem:
00000000-0009cbff : System RAM
0009cc00-0009ffff : reserved
000ce000-000d3fff : reserved
000e0000-000fffff : reserved
00100000-1fd6ffff : System RAM
01000000-04ffffff : Crash kernel
1ec00000-1fbfffff : Hypervisor code and data
1f0b4680-1f0b4873 : Crash note
1f0b4900-1f0b4a93 : Crash note
1f0b4b80-1f0b4d13 : Crash note
1f0b4e00-1f0b4f93 : Crash note
...
Without that patch, /proc/vmcore is empty in the kexec'd kernel and I'm unable
to copy the crashdump.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
kexec/arch/i386/kexec-elf-x86.c and kexec/arch/x86_64/kexec-elf-x86_64.c
both use the macro offsetof() which according to the man page requires
#include <stddef.h>.
The include is not present at the moment and this patch adds it. This is
necessary for compatibility with i.e. uClibc.
Signed-off-by: Stefan Assmann <sassmann@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Do not count max_memory_range for allocation. Increase allocation buffers
when it is needed. This actually allows us to avoid a lot of troubles with
various device-tree files.
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
To support memory backup/restore an option named
--load-preserve-context is added to kexec. When it is specified
toggether with --mem-max, most segments for crash dump support are
loaded, and the memory range between mem_min to mem_max which has no
segments loaded are loaded as backup segments. To support jump back
from kexeced, options named --load-jump-back-helper and --entry are
added to load a helper image with specified entry to jump back.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On a powerpc machine when memory is dynamically removed/added from an lpar, the
corresponding flags field in the drconf memory reflects the same with the bits
unset/set accordingly. The kernel does a check on these flags while booting.
Following are the similar changes brought in to kexec-tools. This makes
kexec-tools to skip those memory regions that do not belong or are not
assigned to the current partition ( but are available to dynamically add them
back ). Without this patch (and with memory remove operation) copying vmcore
fails with error as
Copying data : [ 84 %] readmem: Can't read the dump
memory(/proc/vmcore). Bad address
read_pfn: Can't get the page data.
Signed-off-by : Chandru S <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This patch combines consecutive PL_LOAD segments into one.
The end address of the last PL_LOAD segment, calculated by
adding p_memsz to p_paddr & rounded up to ELF_PAGE_SIZE,
will be the end address of this loaded_segments[] entry.
This patch fixes the kdump kernel MCA problem caused by under-
allocation of memory and a "kdump broken on ALtix 350" problem
reported by Bernhard Walle.
Simon, this patch replaces my previous patch I submitted on the
underallocation issue.
Signed-off-by: Jay Lan <jlan@sgi.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kexec/arch/ppc64/crashdump-ppc64.c:125: warning: function declaration isn't a prototype
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This patch fixes the build error
kexec/arch/ppc64/kexec-ppc64.c:140: \
warning: control reaches end of non-void function
The patch returns 0 on success, and checks when the function is called
for a non-zero value.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
device tree
Get number of lmb's (logical memory blocks) , size of each lmb from
ibm,dynamic-memory property , get base memory ranges from
ibm,dynamic-reconfiguration-memory node.
Signed-off-by: Chandru Siddalingappa <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add a new linux,usable-drconf-memory property to the device tree passed to the
2nd kernel. Each entry in the property is of the form: a count followed by so
many (base, size) pairs of usable memory regions. The total number of such
entries is equal to number of lmb's in ibm,dynamic-memory property.
Signed-off-by: Chandru Siddalingappa <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Get the memory ranges of the 1st kernel excluding the memory reserved for
kexec/kdump kernel in case of ibm,dynamic-reconfiguration-memory node of
device tree
Signed-off-by: Chandru Siddalingappa <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Hello,
I hope this is the correct list to which to send these patches.
Comments are very welcome.
Thanks,
Edgar
From: Edgar E. Iglesias <edgar.iglesias@axis.com>
Add a CRISv32 port. Initially only the elf filetype is supported.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|