aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/relocate_kernel.S
Commit message (Collapse)AuthorAgeFilesLines
* ARM: 6497/1: kexec: Correct data alignment for CONFIG_THUMB2_KERNELDave Martin2010-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Directives such as .long and .word do not magically cause the assembler location counter to become aligned in gas. As a result, using these directives in code sections can result in misaligned data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL). This is a Bad Thing, since the ABI permits the compiler to assume that fundamental types of word size or above are word- aligned when accessing them from C. If the data is not really word-aligned, this can cause impaired performance and stray alignment faults in some circumstances. In general, the following rules should be applied when using data word declaration directives inside code sections: * .quad and .double: .align 3 * .long, .word, .single, .float: .align (or .align 2) * .short: No explicit alignment required, since Thumb-2 instructions are always 2 or 4 bytes in size. immediately after an instruction. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 6119/1: kdump: skip indirection page when crashingMika Westerberg2010-07-091-0/+6
| | | | | | | | When we are crashing there is no indirection page in place. Only control page is present. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4736/1: Export atags to userspace and allow kexec to use customised atagsRichard Purdie2008-02-041-26/+4
| | | | | | | | | | | | | | | | | | | | Currently, the atags used by kexec are fixed to the ones originally used to boot the kernel. This is less than ideal as changing the commandline, initrd and other options would be a useful feature. This patch exports the atags used for the current kernel to userspace through an "atags" file in procfs. The presence of the file is controlled by its own Kconfig option and cleans up several ifdef blocks into a separate file. The tags for the new kernel are assumed to be at a fixed location before the kernel image itself. The location of the tags used to boot the original kernel is unimportant and no longer saved. Based on a patch from Uli Luckas <u.luckas@road.de> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Uli Luckas <u.luckas@road.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23)Mike Westerhof2007-10-121-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch resolves a kexec boot failure that can occur because no ATAGs are passed in to the kexec'd kernel. Currently the newly-kexec'd kernel may fail if it requires specific ATAGs, or it may fail because the fixed memory location at which it expects to find the ATAGs may contain random data instead of ATAGs. The patch ensures that any ATAGs passed to the current kernel at boot time are copied to a static buffer, and are copied back when kexec copies the new kernel into place. Thus the new kernel sees the same ATAGs from kexec and the boot loader. The boot parameters are copied without regard to type, content, or length -- this patch's scope is limited soley to saving and restoring a fixed-size block of memory containing the kernel's boot parameters. Additional functionality to examine, alter, or replace the ATAGs (using kexec, for example) can be implemented by manipulating the static buffer containing the preserved ATAGs. Note: the size of the buffer (1.5KB) is selected to comfortably hold one of each ATAG type, including a maximum-length command line and the maximum number of ATAG_MEM structures currently supported by the kernel. Should an ATAG list exceed that limit, the list will be silently truncated to that limit (to do other- wise at that point in the boot process would make a simple problem exceedingly complicated). [Note: this is the same patch as 4579, modified to accomodate the ATAG changes introduced in 2.6.23] Signed-off-by: Mike Westerhof <mwester at dls.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4137/1: Add kexec supportRichard Purdie2007-02-161-0/+74
Add kexec support to ARM. Improvements like commandline handling could be made but this patch gives basic functional support. It uses the next available syscall number, 347. Once the syscall number is known, userspace support will be finalised/submitted to kexec-tools, various patches already exist. Originally based on a patch by Maxim Syrchin but updated and forward ported by various people. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>