Age | Commit message (Collapse) | Author |
|
MUSL doesn't support %L except for floating-point arguments; therefore,
%ll must be used instead with integer arguments.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The kexec API deals with boot-view addresses, rather than normal system
view addresses. This causes problems for platforms such as Keystone 2,
where the boot view is substantially different from the normal system
view.
This is because Keystone 2 boots from a memory alias in the lower 4GiB,
before switching to a high alias at 32GiB.
We handle this in a generic way by introducing boot alias resources in
/proc/iomem:
80000000-dfffffff : System RAM (boot alias)
9f800000-9fffffff : Crash kernel (boot alias)
800000000-85fffffff : System RAM
800008000-800790e37 : Kernel code
8007ec000-8008b856f : Kernel data
81f800000-81fffffff : Crash kernel
To allow kexec to load a kernel, we need to add the boot alias of RAM
to the memory ranges returned by get_memory_ranges(). Parse the
system RAM boot alias into the memory ranges.
Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add the call to dbgprint_mem_range() into the ARM version of
get_memory_ranges().
Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The memory range end is inclusive, not exclusive (see x86). We should
not be adding one to the value parsed from the /proc/iomem resources.
Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Latest linux kernel will create /sys/firmware/fdt file. It will be convenient
to use it in case one does not specify --atags and --dtb options.
Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
When createing fdt from /proc/device-tree, if there's local --command-line
option provided but there's no root= specified, kexec-tools will copy the root=
param from 1st kernel cmdline by default. In case one want kexec boot without
root= it will be impossible.
Thus add the new option so that one can provide --dt-no-old-root for above
mentioned case.
Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Currently, kexec on arm assumes that it's safe to place binary images
such as atags, dtb or initrd at an estimated offset after the load
address. That estimated offset is set to 4 times the size of the
compressed image, hence assuming a minimum compression ratio of 1:4.
While that assumption matches what the in-kernel compressors are able to
achive, it doesn't take into account the .bss section the kernel image
carries, and which can grow to arbitrary sizes while not accounting to
the compressed image size.
After decompression, and before the execution of the compressed kernel,
the .bss area is initialized to zeros, trampeling over the binary images
in case they happen to live in that piece of memory.
Unfortunately, determining the full image size is not easiliy possible
at runtime, as it would include doing all possible ways of
decompression and then walk the ELF sections by hand.
For now, allow users to override the static offset with a new, arm
specific command line argument. Users are supposed to set this, and
determine a sane value by using 'arm-linux-size vmlinux'.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Implement support for loading dump capture kernels for ARM architecture. ARM
doesn't need any backup memory regions so only elfcore header is allocated from
the top of the reserved memory region. Only zImages are supported.
The dump capture kernel needs to be loaded to physical address corresponding to
the memory region reserved with 'crashkernel=size@start' kernel command line
parameter.
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This fixes a regression introduced by me in
changeset 2b0088bb881680c5e8b062a9b0f0a6ef1b88d52c
"kexec-tools: [arm] use proc_iomem()".
My bad :-(
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Use proc_iomem() on arm for consistency with other architectures.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add ARM support to kexec including commandline support through ATAGs.
The kernel syscall support has already been merged and kernel ATAG
exporting is queued for 2.6.25 (its optional for kexec).
Based on work by various people, notably Uli Luckas <u.luckas@road.de>
for adding ATAG support.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
|