summaryrefslogtreecommitdiff
path: root/kexec/arch/sh
AgeCommit message (Collapse)Author
2017-03-02crashdump/sh: Add get_crash_kernel_load_range() functionDaniel Kiper
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>
2016-03-24Pass struct mem_sym into machine_apply_elf_rel()Anton Blanchard
On PowerPC64 ABIv2 we need to look at the symbol to determine if it has a local entry point. Pass struct mem_sym into machine_apply_elf_rel() so we can. Signed-off-by: Anton Blanchard <anton@samba.org> Tested-by: Dave Young <dyoung@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2015-02-25kexec: iomem: fix callbacks params for sh and x86 archsRoman Pen
Commit 4362bfac changes params for kexec_iomem_for_each_line from 'unsigned long' to 'unsigned long long'. This patch fixes forgotten changes for sh and x86 archs. Bug causes incorrect parsing of memory ranges. Signed-off-by: Roman Pen <r.peniaev@gmail.com> Cc: kexec@lists.infradead.org Signed-off-by: Simon Horman <horms@verge.net.au>
2013-10-03kexec: Remove unused -? option handlingGeoff Levand
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>
2013-09-19kexec: Fix cris/superh comment mixupsGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2013-06-10kexec-tools: sh: Remove saved_max_memZhang Yanfei
saved_max_mem is used to calculate the amount of memory that the previous kernel used. It seems in sh, we just calculate this variable, but we never use it. So remove it. Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2013-03-27kexec: Use die() to simplify codeZhang Yanfei
Use die() to simplify code. Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2013-03-14kexec: sh: use _ALIGN* to make the logic clearZhang Yanfei
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>
2013-03-08kexec/uImage: Introduce uImage_probe_kernelSuzuki K. Poulose
uImage supports different types of payloads, including kernel, ramdisks etc. uImage_probe() as of now checks whether the supplied payload is of type KERNEL ( i.e, IH_TYPE_KERNEL or IH_TYPE_KERNEL_NOLOAD ). Change this behaviour to return the image type, if it is one of the supported payloads. This change is in prepartion to support ramdisks in uImage format. Introduce a uImage_probe_kernel() which can be used by the archs to check if the supplied payload is one of the KERNEL types. Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-08-02build: Avoid duplicate files in tarballSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-03-29sh: move DEBUG code to --debugCong Wang
Like patch 1/5, this one moves code under #if DEBUG to --debug on sh arch. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2011-10-11sh: On 32bit segments may not be in P2Simon Horman
Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2011-10-11sh: Correct logic errors in is_32bit()Simon Horman
This corrects logic errors so that is_32bit() can actually detect that it is running on a 32 bit system - something the original version I wrote failed at woefully. Signed-off-by: Simon Horman <horms@verge.net.au>
2011-10-05sh: Take into account the base of System RAM in virt_to_phys()Simon Horman
Previously virt_to_phys() assumed that physical memory always started at address 0. This is not always the case. Tested on an sh7757lcr (32bit system) whose only System RAM region is 40000000-4effffff and an ecovec24 (29bit system). Signed-off-by: Simon Horman <horms@verge.net.au>
2010-05-19kexec-tools: Fix option/argument parsingMatt Evans
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>
2010-03-31Let SH adn ARM use common uImage probe codeSebastian Andrzej Siewior
The now generic probe function is more complete than the currently used. It seems that ARM's and SH's uImage are always uncompressed so it might be good to check for this. Cc: Paul Mundt <lethal@linux-sh.org> Cc: Marc Andre Tanner <mat@brain-dump.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2010-02-02sh: netbsd_booter extern qualifier should come firstSimon Horman
# sh4-unknown-linux-gnu-gcc --version sh4-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. # make kexec/arch/sh/kexec-netbsd-sh.c:29: warning: 'extern' is not at beginning of declaration Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02sh: Use size_t for zero_page_size parameter of kexec_sh_setup_zero_page()Simon Horman
This avoids comparisons between signed and unsigned integers. Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02Use C99 initialisersSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02Use casts to avoid ambiguity when comparing off_t and size_tSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02Avoid possible overflows from signed/unsigned comparisonsSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02sh: Remove unused len parameter from zImage_head32()Simon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02sh: make zImage_head32() staticSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-02-02Mark unused parametersSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-12-16kexec-sh: uImage support.Paul Mundt
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>
2009-07-22Include kexec/arch/sh/crashdump-sh.h in distribution tarballSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-03-19sh: use physical address for zImage entryMagnus Damm
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>
2009-03-18kexec jump: SuperH vmlinux supportMagnus Damm
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>
2008-09-05sh: Add ELF relocation support for R_SH_DIR32/R_SH_REL32 relocs.Paul Mundt
Simple handler for the common SHcompact ELF relocations. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-09-05sh: Add vmlinux crash dump supportMagnus Damm
This patch adds SuperH crash dump support. The vmlinux loader is modified with crash dump hooks as on other architectures. SuperH does not need any backup region, so only the elf header is allocated from the top of the reserved memory window. The actual size of the memory window is passed to the secondary kernel on the command line using "mem=". The secondary kernel must be configured to match the reserved memory window, change kernel parameters CONFIG_MEMORY_START and CONFIG_MEMORY_SIZE. Linux-2.6.27 should be usable as primary kernel on SuperH, later kernel versions are needed to fully support secondary kernel /proc/vmcore. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-09-05sh: Fix help text spellingMagnus Damm
Fix SuperH help text spelling. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Add vmlinux supportMagnus Damm
Add SuperH vmlinux support through a zero-page aware elf loader. Only for kexec at this point, in the future kdump support will be added. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Use dynamic zImage load addressMagnus Damm
Dynamically calculate SuperH zImage load address instead of hardcoding. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Autodetect zImage zero page addressMagnus Damm
Autodetect the zero page base address for zImages on SuperH. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Add virtual addresses supportMagnus Damm
Implement virtual-to-physical address conversion functions for SuperH. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Get system memory ranges from /proc/iomemMagnus Damm
Parse contents of /proc/iomem instead of hardcoding RAM ranges. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27sh: Add support for sh4al-dsp processorsMagnus Damm
Add support for sh4al-dsp processors such as sh7722. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-21Factor uname-based native architecture detection into a common function.Jamey Sharp
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>
2008-04-24<sys/mman.h> is not needed by any kexec/ sourceSimon Horman
This continues the work that Jamey Sharp did on i386 to cover all other architectures. Cc: Jamey Sharp <jamey@thetovacompany.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-21Only include needed files in distribution tarballSimon Horman
With the recent build changes a number of unneded files crept into tarballs, including .o and .d files. This patch is farily verbose, but hopefully in the long run this system will be obvious enough to be maintainable. Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19sh: Remove hardcoded PAGE_SIZE in NetBSD loaderPaul Mundt
The Linux host supports a multitude of page sizes, so having this hardcoded doesn't really help matters. This also has the benefit of killing off dependence on asm/ headers when none is needed. While I'm not suggesting that anyone actually boot NetBSD, without this, my build also ends up breaking. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-12-19Use general _SRCS and _OBJS, rather and _C_{SRCS, OBJS} and _S_{SRCS, OBJS}Jeremy Kerr
Since we use the implicit ruls for .c and .S, just colelct all sources in the one variable. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-03-16kexec-tools: arch_options seems to be unused on shHorms
arch_options, declared in kexec/arch/sh/kexec-sh.c seems to be unused, so remove it. Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Paul Mundt <lethal@linux-sh.org>
2007-03-16Remove duplicate MAX_LINEMagnus Damm
Remove duplicate MAX_LINE MAX_LINE is already defined in kexec/kexec.h Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-03-16Kdump is not supported on ppc, s390, shMagnus Damm
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>
2007-02-08Trivial change adding sh4a to the sh targets.Paul Mundt
Trivial change adding sh4a to the sh targets. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-02-01kexec-tools: Upport for sh supportSimon Horman
Some minor changes needed for sh support to compile Signed-off-by: Simon Horman <horms@verge.net.au>
2007-02-01kexec-tools: Remove trailing whitespace in sh codeSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2007-02-01kexec-tools: Add sh supportSimon Horman
Patch found on http://eggplant.ddo.jp/www/download/debian26/source/kexec-tools/kexec-tools_1.101-2sh.diff.gz According to Paul Mundt <lethal@linux-sh.org> it was originally by kogiidena <kogiidena@eggplant.ddo.jp> Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <magnus.damm@gmail.com>