Age | Commit message (Collapse) | Author |
|
Implement get_crash_kernel_load_range() in support of
print crash kernel region size option.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The return will never be reached, so remove it.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
So far powerpc kernel never exported memory limit information which is
reflected by mem= kernel cmdline option. Hence, kexec-tools always used
to build ELF header for entire system RAM generating a dump bigger than
the actual memory used by the first kernel.
This patch now reads the memory limit information from device-tree file and
limits the crash memory ranges accordingly.
Suzuki tested this patch on ppc32(ppc440) with a kernel patch by Suzuki.
The following are the upstream kernel commits that exports memory limit
information through /proc/device-tree file:
4bc77a5ed - powerpc: Export memory limit via device tree
a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
long long
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tested-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
From: Cong Wang <xiyou.wangcong@gmail.com>
V2: Fix a compile error
Like commit 28d4ab53280853d2aeefdfb7c369331e89ab9ac2
("Add generic debug option"), this one moves code
under #if DEBUG to --debug on ppc arch.
Sorry that I still can't find a ppc32 machine to test this.
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Disable backup regions for BookE in case of a CRASH Dump, as they can
be run from anywhere.
The patch introduces --with-booke option to support the BookE.
With the patch, we get :
## On a 256M machine:
# busybox cat /proc/cmdline
init=/bin/init console=ttyS0,16550 crashkernel=128M@100M
# kexec -p root/vmlinux
usable memory rgns size:1 base:6400000 size:8000000
CRASH MEMORY RANGES
0000000000000000-0000000006400000
000000000e400000-0000000010000000
Command line after adding elfcorehdr: elfcorehdr=112380K
Command line after adding elfcorehdr: elfcorehdr=112380K savemaxmem=256M
Signed-off-by: Suzuki K. Poulose<suzuki@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The format of memory/reg is based on the #address-cells,#size-cells. Currently,
the kexec-tools doesn't use the above values in parsing the memory/reg values.
Hence the kexec cannot handle cases where #address-cells, #size-cells are
different, (for e.g, PPC440X ).
This patch introduces a read_memory_region_limits(), which parses the
memory/reg contents based on the values of #address-cells and #size-cells.
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Fixes buffer overflow and improper realloc() in realloc_memory_ranges().
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
(manually applied)
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This fixes --reuseinitrd and --ramdisk option for ppc32 on
uImage-ppc and Elf. It works for normal kexec as well as for
kdump.
When using --reuseinitrd you need to specifify retain_initrd
on the command line. Also, if you are doing kdump you need to make
sure your initrd lives in the crashdump region otherwise the
kdump kernel will not be able to access it. The --ramdisk option
should always work.
[ horms@verge.net.au: minor up-port ]
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On some actitectures the physical memory can be 64 bits, therefore
the code that reads proc entries needs to take into account it could
read either a 32 bit or 64bit value for the physical addresses.
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Booting with uImage-ppc was broken by previous work, this
patch should restore it to working order
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This fixes the kexec-build on ppc32 when
the --game-cube option is supplied to ./configure.
It seems to have bit-rotted a little.
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
mips, ppc)
These architectures don't have any architecture-specific options
(note: distinct from loader options, which are more specific), yet
their arch_process_options() functions contain getopts_long() calls
followed by no argument processing. The code doesn't do anything,
so this patch removes it.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On PowerPC the uImage usually contains the compressed "final" kernel and
not a tiny wrapper which relocates itself und uncomprosses the final
kernel to its final position. Instead we uncompress the gzip image and
put it the its final position.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Some code dtb scanning & filling has been borrowed from ppc64.
The old behavior is still available if compiled with GameCube,
other PowerPC platform use the can purgatory and specify a new
dtb.
Booting a self contained elf image (incl. dtb / without the need
for a bd sturct or the like) can be booted. The dtb support is currently
optional. That means if the elf image does not contain a dtb file then
the user has to supply a complete dtb (including mem size, command line,
bus freq., mac addr, ...)
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
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>
|
|
This code was copy-pasted into every architecture and was basically
identical.
Besides producing a nice net reduction in code, this factors a
portability challenge into a single function that can be easily replaced
at build-time.
Signed-off-by: Jamey Sharp <jamey@thetovacompany.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Currently any ppc32 compile will error out with "Please, fix this for
your platform". While this is a great way to encourage people to update
the code it seesm to be a disinsentive for distros to package
kexec-tools for powerpc (incl. 64-bit).
Make get_memory_ranges() do the right thing in the GameCube case and
fail at runtime for all other ppc32 cases.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
.. instead of messing with CFLAGS.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On ia64 XEN it is sometimes neccessary to use an alternate location for the
information that is usually provided by /proc/iomem. By having the path
returned by a function, which can be overriden on a per-architecture basis,
it is possible for ia64 XEN to make use of existing generic code. Hopefully
other achitectures can use this infastructure as the need arises.
If the machine parameter is zero, then iomem file relating to the currently
running kernel should be returned. If the machine parameter is non-zero
then iomem file, relating to the underlying hypervisor, should be returned.
In the simple case, these will be the same file.
Signed-off-by: Simon Horman <horms@verge.net.au>
kexec/arch/i386/crashdump-x86.c | 4 ++--
kexec/arch/i386/kexec-x86.c | 2 +-
kexec/arch/i386/x86-linux-setup.c | 2 +-
kexec/arch/ia64/crashdump-ia64.c | 9 +++++----
kexec/arch/ia64/kexec-elf-ia64.c | 2 +-
kexec/arch/ia64/kexec-ia64.c | 5 +++--
kexec/arch/ppc/kexec-ppc.c | 2 +-
kexec/arch/s390/kexec-s390.c | 5 +++--
kexec/arch/x86_64/crashdump-x86_64.c | 10 +++++-----
kexec/arch/x86_64/kexec-x86_64.c | 2 +-
kexec/crashdump-xen.c | 6 ++++--
kexec/kexec-iomem.c | 31 +++++++++++++++++++++++--------
kexec/kexec.h | 6 +++---
13 files changed, 53 insertions(+), 33 deletions(-)
9079040b40f643cfc9eb3d425dffa0ca8fd573e1
|
|
Kdump is not supported on ppc, s390, sh
So let's return that no crash kernel memory is found.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Get rid of unused variables on ppc
Signed-Off-By: Simon Horman <horms@verge.net.au>
|
|
Check whether memory for crashkernel is reserved by calling arch dependent
functions. The patch also creates dummy functions in ppc, ia64 and s390
architectures, so that the build process will not break. The function
"is_crashkernel_mem_reserved" needs to be implemented on ppc, ia64 and
s390 architectures.
Signed-off-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On Wed, Dec 14, 2005 at 02:50:52PM -0600, Milton Miller wrote:
[..]
> >>(2) why do you stat the files instead of just trying to open them and
> >>check for ENOENT?
> >>
> >>milton
> >>
> >
> >I wanted to differentiate between two cases. One being sysfs not
> >mounted
> >and other being file not being present (Due to kernel bug or cpu not
> >present), hence used stat(). In case of sysfs not being mounted, we
> >simply exit after giving an error message. In other case we continue
> >to loop through other cpus and ignore cpu, which is not present.
> >
>
> Ok, but try to open the file first. IF you want to do this diagnostic
> after the open fails, that is ok. But don't do this check n times (n =
> number of cpus) when the file exists.
>
I have moved the sysfs mounted check in failure condition.
>
> >
> >On Tue, Dec 13, 2005 at 09:36:26AM -0800, Haren Myneni wrote:
> >>Vivek, I believe, we should push this func into arch independent code.
> >>Otherwise, we have to copy it for every platform.
> >>
> >
> >We have reworked the patch and moved this code to architecture
> >independent
> >portion.
> >
>
>
> Only the x86 code has the fallback the old name, not the genric code.
>
Only i386 port of kdump was available when crash_notes was exported
through /sys/kernel/crash_notes. Rest of the architectures see new arch-
independent percpu crash_notes sysfs interface only. Hence thought no
point copying backward compatibility code in generic code.
>
> Also, there are error paths that do not set the address, others that
> zero it.
>
The error paths which do not set address to zero are non return path. They
call die() which inturn calls exit(1) after printing appropriate error
messasge.
> What happens if the base kernel is too old for kexec-panic, where
> neiter file will exist?
>
In that case kexec will fail much earlier. There will be no reserved
memory area for loading second kernel (crashkernel=X&Y) hence attempt to
load the second kernel will fail and control will not reach this place at
all.
Modifed patch appended.
Thanks
Vivek
o This patch moves per cpu interface to retrieve crash_notes address to
architecture independent section. (As suggested by Haren)
o For i386, kernels older than 2.6.15-rc1-mm2 used to export crash_notes
through /sys/kernel/crash_notes. This patch also provides backward
compatibility with older kernel versions.
o Definition of MAX_NOTE_BYTES moved to architecture independent header
file as everybody is using same definition.
o Definition of MAX_LINE moved to architecture independent header file.
Seems to be a better option than defining it in many C files.
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
|
|
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
|