summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-10-08cris: add cris architecture to configureSimon Horman
# PATH=$PATH:/usr/local/cris/bin/ CC=crisv32-axis-linux-gnu-gcc \ ./configure --host=crisv32-axis-linux-gnu configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking build system type... i686-pc-linux-gnu checking host system type... cris-axis-linux-gnu checking target system type... cris-axis-linux-gnu configure: error: unsupported architecture cris Signed-off-by: Simon Horman <horms@verge.net.au>
2008-10-08cris: Add CRISv32 supportEdgar E. Iglesias
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>
2008-10-08cris: add kexc_load syscallEdgar E. Iglesias
The released toolchain had an old list of syscalls (kexec_load was missing) so I had to add a fallback definition: Signed-off-by: Simon Horman <horms@verge.net.au>
2008-10-08Only use -fno-zero-initialized-in-bss if it is availableSimon Horman
As pointed out by Edgar E. Iglesias, the -fno-zero-initialized-in-bss option to gcc is not available in the cris 3.2.1 toolchain. Signed-off-by: Simon Horman <horms@verge.net.au>
2008-10-08ia64: use generic put_unaligned()Simon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2008-10-07ia64: make PA() work for both physical identity-mapped virtual addressesBjorn Helgaas
The EFI Runtime Services Table contains pointers to ia64 function descriptors. On existing, pre-Tiano, firmware, SetVirtualAddressMap() converts *all* these pointers from physical to virtual. On Tiano-based firmware, the pointer to the SetVirtualAddressMap() function descriptor is not converted, so it remains a physical pointer. The ia64 kexec purgatory patches the SetVirtualAddressMap() function descriptor so that when the new kernel calls SetVirtualAddressMap(), it never reaches firmware. Instead, it calls a dummy function that just returns success. Purgatory runs in physical mode, so it must convert the pointer from the RuntimeServicesTable to a physical address. This patch makes that conversion work both for old firmware (where the pointer is an identity- mapped virtual address) and new Tiano firmware (where the pointer is a physical address). Without this patch, kexec on Tiano firmware causes an MCA because ia64_env_setup() subtracts PAGE_OFFSET from a physical address and ends up with an invalid physical address. Referencing that address causes the MCA. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-09-24IA64: do not include uncached memory to vmcoreJay Lan
Currently a memory segment in memory map with attribute of EFI_MEMORY_UC is denoted as "System RAM" in /proc/iomem, while memory of attribute (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same. The kexec utility then includes uncached memory as part of vmcore. The kdump kernel may MCA when it tries to save the vmcore to a disk. A normal "cached" access can cause MCAs. Since kexec assembled memory ranges with memory tagged as "System RAM", the uncached memory will be excluded if it is labeled differently. Simon, since only IA64 will create "Uncached RAM" label, i do not make changes to other arch. Our HP machine in the lab is dead. I am sorry that i can not test against other IA64 systems (than SGI's). Feedback is very much appreciated. The corresponding kernel patch is needed to test this kexec patch: http://marc.info/?l=linux-ia64&m=122122791230130&w=2 This patch without the kernel patch will have no effect and do no harm. The kernel patch has been commited as "[IA64] kexec fails on systems with blocks of uncached memory". Signed-off-by: Jay Lan <jlan@sgi.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-09-12Fix ppc64 build warningsGeoff Levand
Fix these ppc64 32 bit build warnings: kexec/arch/ppc64/kexec-zImage-ppc64.c: In function 'zImage_ppc64_load': kexec/arch/ppc64/kexec-zImage-ppc64.c:164: warning: cast to pointer from integer of different size kexec/arch/ppc64/kexec-elf-ppc64.c: In function 'elf_ppc64_load': kexec/arch/ppc64/kexec-elf-ppc64.c:121: warning: integer constant is too large for 'unsigned long' type kexec/arch/ppc64/kexec-elf-ppc64.c:237: warning: cast from pointer to integer of different size kexec/arch/ppc64/kexec-elf-ppc64.c:276: warning: cast from pointer to integer of different size kexec/arch/ppc64/kexec-elf-ppc64.c:283: warning: cast from pointer to integer of different size kexec/arch/ppc64/kexec-elf-ppc64.c:287: warning: cast from pointer to integer of different size kexec/arch/ppc64/kexec-elf-ppc64.c:341: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'uint64_t' kexec/arch/ppc64/kexec-elf-ppc64.c:352: warning: format '%ld' expects type 'long int', but argument 5 has type 'size_t' kexec/arch/ppc64/crashdump-ppc64.c:45: warning: integer constant is too large for 'long' type kexec/arch/ppc64/crashdump-ppc64.c:46: warning: integer constant is too large for 'long' type kexec/arch/ppc64/crashdump-ppc64.c:56: warning: integer constant is too large for 'long' type kexec/arch/ppc64/crashdump-ppc64.c:57: warning: integer constant is too large for 'long' type Tested on PS3 (ppc64) with 32 and 64 bit builds. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-09-12Fix build warningsGeoff Levand
Fix these 64 bit build warnings: kexec/firmware_memmap.c:241: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'Elf64_Off' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'Elf64_Addr' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'Elf64_Addr' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'Elf64_Xword' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'Elf64_Xword' Tested on PS3 (ppc64) with 32 and 64 bit builds. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> 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-05kexec/kexec.h: Bring put/get_unaligned() back from the dead.Paul Mundt
This re-enables the fairly generic put/get_unaligned() routines in kexec.h, while tidying up the variable shadowing clash that results when using it in places like machine_apply_elf_rel(). Needed for SH ELF relocations. IA64 still does its own put_unaligned64(), which should likely also be converted over to using put_unaligned() directly. 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-27Let kexec work on IBM QS2x blade serversMaxim Shchetynin
Hello, please have a look at the following patch. This patch allows kexec to work on IBM QS2x blades. Would it be possible to apply this patch to a next kexec version? Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com> 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-08-27arm: asm/page.h is no longer exported to userspaceMarc Kleine-Budde
In recent kernels "asm/page.h" isn't exported to userspace anymore, thus the include is removed. Further this patch defines _XOPEN_SOURCE, in order to use getpagesize. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27Update INSTALLBernhard Walle
That patch should merge my accidentally written INSTALL file with that already present in the git tree. It adds following items: - static compilation - cross compilation And updates the instructions to build the auto-generated files to use the "bootstrap" script already present. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27Add INSTALL to tarballBernhard Walle
This patch just adds the installation file to the tarball. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-08-27Move $(LIBS) on the endBernhard Walle
To make static compilation work with LDFLAGS=-static ./configure make we have to move $(LIBS) on the end of the compiler line. Static compilation has been requested by "Yinghai Lu" <yhlu.kernel@gmail.com>. Although I don't see the practical benefit in most cases, I don't think we should not support it. Since kexec does not use name resolution functions of libc, it's valid to use static linking. Tested on x86_64-suse-linux. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-19kexec-tools 2.0.0-gitSimon Horman
Add -git to version so it doesn't look like a release. This is just so when people build code from git it can be identified as such from the version string. Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-19kexec-tools 2.0.0Simon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-16Allow BUILD_CFLAGS and TARGET_CFLAGS to be specified at configure timeJeremy Kerr
Currently, we're unconditionally setting the build and target cflags in the configure script, which means that they can't be easily overwritten. This change conditionally sets these variables if they're not specified during configure, allowing something like: BUILD_CFLAGS=-Werror ./configure Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-16Add .gitignore to ignore auto genrated files.Isaku Yamahata
Add .gitignore to ignore auto genrated files. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-15Use CFLAGS for compiling bin2hexBernhard Walle
This is a minor correction in the Makefile to use the CFLAGS (from configure) also for bin2hex. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-14kexec-tools 2.0.0-gitSimon Horman
Add -git to version so it doesn't look like a release. This is just so when people build code from git it can be identified as such from the version string. Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-14kexec-tools 2.0.0-rc1Simon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-14Include firmware_memmap.h in the distribution tarballSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-11Use get_memory_ranges() on x86-64.Bernhard Walle
Because the get_memory_ranges() function was the same on i386 and x86_64, and because that /sys/firmware/memmap interface should also be used for x86_64 without *new* code duplication, that part was moved out in a new file called kexec-x86-common.c. That file only contains the memory map parsing for both the "old" /proc/iomem interface and the new /sys/firmware/memmap interface. That file is now built for i386 and x86_64. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-11Remove redundancy between get_memory_ranges_proc_iomem() and ↵Bernhard Walle
get_memory_ranges_sysfs() With the previous patch, we have a duplication between that both functions for following tasks: - don't report the interrupt table as RAM, - set the mem_min and mem_max limits for kdump. This patch removes that redundancy into the function get_memory_ranges() that calls both functions internally. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-11Parse /sys/firmware/memmap.Bernhard Walle
After the patch that provides /sys/firmware/memmap has been merged in the 'tip' tree by Ingo Molnar, kexec should use that interface. This patch implements architecture-independent parsing in a new file called firmware_memmap.c. The x86 part is ported to use that memory map for kexec. We don't use that memory map for building the ELF core headers, that was the intention for that new interface. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-11kexec/crashdump.c: remove useless codeWANG Cong
I think we don't need to print fopen errors when stat fails. Signed-off-by: WANG Cong <wangcong@zeuux.org> Cc: Simon Horman <horms@verge.net.au> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-07Fix compiler warning in kexec-x86.cBernhard Walle
This patch fixes following compiler warning: kexec/arch/i386/kexec-x86.c:234: \ warning: missing initializer kexec/arch/i386/kexec-x86.c:234: \ warning: (near initialization for 'arches[5].arch') Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-07Remove trailing whitespaceBernhard Walle
This patch just removes trailing whitespace from kexec/arch/i386/kexec-x86.c before modifying something. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-07-04[ppc64] Allow 32 bit kexec binary to boot kdump kernel on ppc64 architectureSachin P. Sant
Signed-off-by : Sachin Sant <sachinp@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-06-27'make dist-clean' should clean more filesWANG Cong
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-06-27kexec/crashdump.c: remove file descriptor leaks; make kdump_info argument to ↵WANG Cong
get_vmcoreinfo() const Add the missing fclose(). Constify a char pointer. Signed-off-by: WANG Cong <wangcong@zeuux.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-06-13Fix wrong remove_parameter() callsBernhard Walle
When --reuse-cmdline is specified, kexec automatically removes some command line parameter that are *known* to break the kexec'd target. That patch corrects that behaviour: 1. BOOT_IMAGE should be removed always when --reuse-cmdline is specified since it's likely that the kernel is not the same as the running kernel. As only lilo-like bootloaders (i.e. not GRUB) adds that parameter, there's no need to add a BOOT_IMAGE here. 2. crashkernel should be only removed when 'kexec -p' is called. For the normal kexec, the crashkernel parameter can be passed as in the running kernel. The mistake has been introduced by commit 3c5bb06948881b3e31c783c19edef74275794280 by myself. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-06-12Fix implicit declaration of inb/outbBernhard Walle
This patch fixes following compiler warning: purgatory/arch/i386/console-x86.c:84: \ warning: implicit declaration of function `outb' purgatory/arch/i386/console-x86.c:89: \ warning: implicit declaration of function `inb' Found on x86_64. The problem did not happen with i386. Fix tested on x86_64-suse-linux and i586-suse-linux. I also added __always_inline__ to make sure that the function gets always inlined, regardless of optimisation compiler flags. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-28EDD fixBernhard Walle
This patch fixes EDD support where the BIOS reports a length lower than the actual length of raw_data in sysfs. That's no problem -- the check only needs to catch the case where the sysfs file is *smaller* than the BIOS reported length. Also add a newline at the end of the error message. The problem was introduced in 3bf0213789d56054f601c5a06372f78567aacdd9 by myself, the initial EDD implementation. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-28Don't run libtoolize and automake in bootstrap.Bernhard Walle
This patch removes the 'automake' and 'libtoolize' calls from the 'bootstrap'. The bug has been introduced by commit 6f65cb623cdb82f712144e438d9aa2f097376251 by myself. Automake and Libtool are not used in kexec-tools. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-28Specify the arch on kexec_unload.Bernhard Walle
This fixes the problem in kexec-tools that the patch http://article.gmane.org/gmane.linux.kernel/685027 tries to fix in kernel. The fix in userspace is correct. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-28Use 'long long' for printf() format string and ELF64 numbers.Bernhard Walle
Since 'long long' is 64 bit wide on almost any platform, especially on 32 bit platforms (like i386) while 'long' is only 64 bit on 64 bit platforms but 32 bit on 32 bit platforms. Thus, 'long long' is more suited and fixes compiler warnings like kexec/crashdump-elf.c:160: warning: format '%lx' expects type \ 'long unsigned int', but argument 4 has type 'Elf64_Off' kexec/crashdump-elf.c:160: warning: format '%lx' expects type \ 'long unsigned int', but argument 5 has type 'Elf64_Addr' ... kexec/crashdump-elf.c:248: warning: format '%lx' expects type \ 'long unsigned int', but argument 8 has type 'Elf64_Xword' Tested on i686-pc-linux-gnu. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-28Fix build without cross compilationBernhard Walle
This patch fixes build on "normal" Linux hosts without cross compiler. The regression was introduced with commit 6f95d707544ab3417673990e6a78b27b79737856 Author: Jamey Sharp <jamey@thetovacompany.com> Date: Thu May 15 17:03:09 2008 -0700 Use target CC and LD to build kdump and kexec_test. Signed-off-by: Jamey Sharp <jamey@thetovacompany.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-05-21Update KEXEC_ARCH_* constants from Linux kernel headers.Jamey Sharp
Signed-off-by: Jamey Sharp <jamey@thetovacompany.com> 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>