aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed
AgeCommit message (Collapse)Author
2011-05-21ARM: zImage: make sure the stack is 64-bit alignedNicolas Pitre
commit 3bd2cbb95543acf44fe123eb9f038de54e655eb4 upstream. With ARMv5+ and EABI, the compiler expects a 64-bit aligned stack so instructions like STRD and LDRD can be used. Without this, mysterious boot failures were seen semi randomly with the LZMA decompressor. While at it, let's align .bss as well. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-19ARM: 6739/1: update .gitignore for boot/compressedNicolas Pitre
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-05Merge branches 'ftrace', 'gic', 'io', 'kexec', 'mod', 'sa11x0', 'sh' and ↵Russell King
'versatile' into devel
2010-12-05ARM: 6515/1: Add zboot support for SuperH Mobile ARMKuninori Morimoto
When CONFIG_ZBOOT_ROM is selected, the resulting zImage file will be small boot loader and may be burned to rom or flash. This is the non-board-specific framework portion of this patch-set. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-30ARM: 6503/1: Thumb-2: Restore sensible zImage header layout for ↵Dave Martin
CONFIG_THUMB2_KERNEL The code which makes up the zImage header intends to leave a 32-byte gap followed by a branch to the real entry point, a magic number, and a word containing the absolute entry point address. This gets messed up with with CONFIG_THUMB2_KERNEL, because the size of the initial padding NOPs changes. Instead, the header can be made fully compatible by restoring it to ARM. In the Thumb-2 case, we can replace the initial NOPs with a sequence which switches to Thumb and jumps to the real entry point. As a consequence, the zImage entry point is now always ARM, so no special magic is needed any more for the uImage rules in the Thumb-2 case. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-30ARM: 6502/1: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.SDave Martin
Some instruction operand combinations are used here which are nor permitted in Thumb-2. In particular, most uses of pc as an operand are disallowed in Thumb-2, and deprecated in ARM from ARMv7 onwards. The modified code introduced by this patch should be compatible with all architecture versions >= v3, with or without CONFIG_THUMB2_KERNEL. 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> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-22ARM: avoid marking decompressor .stack section as having contentsRussell King
The .stack section doesn't contain any contents, and doesn't require initialization either. Rather than marking the output section with 'NOLOAD' but still having it exist in the object files, mark it with %nobits which avoids the assembler marking the section with 'CONTENTS'. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-19ARM: Fix build error when using KCONFIG_CONFIGRussell King
Jonathan Cameron reports that when using the environment variable KCONFIG_CONFIG, he encounters this error: make[2]: *** No rule to make target `.config', needed by `arch/arm/boot/compressed/vmlinux.lds' Reported-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-09ARM: Partially revert "Auto calculate ZRELADDR and provide option for ↵Russell King
exceptions" Partially revert e69edc7, which introduced automatic zreladdr support. The change in the way the manual definition is defined seems to be error and conflict prone. Go back to the original way we were handling this for the time being, while keeping the automatic zreladdr facility. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-08-10Merge branches 'master' and 'devel' into for-linusRussell King
Conflicts: arch/arm/Kconfig arch/arm/mm/Kconfig
2010-08-10ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR"Rabin Vincent
"ARM: Auto calculate ZRELADDR and provide option for exceptions" broke the Thumb-2 decompressor because it removed an entry in the LC0 table but didn't adjust the offset the Thumb-2 code uses to load the SP from that table. Fix it, and also change the ARM code to use the separate SP-load since ARM instructions that include the SP in the LDM register list are deprecated. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-08-06Merge branch 'devel' of ↵Russell King
git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable Conflicts: arch/arm/mach-pxa/palmt5.c arch/arm/mach-pxa/palmtreo.c
2010-08-05[ARM] pxa: PXA_SHARPSL_DETECT_MACH_ID to include head-sharpsl.SEric Miao
With kexec-based kernel boot loader on Zaurus, the machine ID is actually correctly passed, and head-sharpsl.S is not necessary. Introduce PXA_SHARPSL_DETECT_MACH_ID, and include head-sharpsl.S only when that's explicitly enabled. Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-08-03Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (291 commits) ARM: AMBA: Add pclk support to AMBA bus infrastructure ARM: 6278/2: fix regression in RealView after the introduction of pclk ARM: 6277/1: mach-shmobile: Allow users to select HZ, default to 128 ARM: 6276/1: mach-shmobile: remove duplicate NR_IRQS_LEGACY ARM: 6246/1: mmci: support larger MMCIDATALENGTH register ARM: 6245/1: mmci: enable hardware flow control on Ux500 variants ARM: 6244/1: mmci: add variant data and default MCICLOCK support ARM: 6243/1: mmci: pass power_mode to the translate_vdd callback ARM: 6274/1: add global control registers definition header file for nuc900 mx2_camera: fix type of dma buffer virtual address pointer mx2_camera: Add soc_camera support for i.MX25/i.MX27 arm/imx/gpio: add spinlock protection ARM: Add support for the LPC32XX arch ARM: LPC32XX: Arch config menu supoport and makefiles ARM: LPC32XX: Phytec 3250 platform support ARM: LPC32XX: Misc support functions ARM: LPC32XX: Serial support code ARM: LPC32XX: System suspend support ARM: LPC32XX: GPIO, timer, and IRQ drivers ARM: LPC32XX: Clock driver ...
2010-07-31Merge branch 'devel-stable' into develRussell King
Conflicts: arch/arm/kernel/entry-armv.S arch/arm/kernel/setup.c arch/arm/mm/init.c
2010-07-29ARM: 6270/1: clean files in arch/arm/boot/compressed/Magnus Damm
Update the compressed boot Makefile for ARM to remove files during clean. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-12ARM: Auto calculate ZRELADDR and provide option for exceptionsEric Miao
As long as the zImage is placed within the 128MB range from the start of memory, ZRELADDR (Address where the decompressed kernel will be placed, usually == PHYS_OFFSET + TEXT_OFFSET) can be determined at run-time by masking PC with 0xf80000000. Running through all the Makefile.boot, all those zreladdr-y addresses == 0x[0-f][08]00_0000 + TEXT_OFFSET can be determined at run-time. Option CONFIG_AUTO_ZRELADDR and CONFIG_ZRELADDR are introduced, CONFIG_ZRELADDR _must_ be explicitly specified if: - ((zreladdr-y - TEXT_OFFSET) & ~0xf8000000) != 0, which means masking PC with 0xf8000000 will result in an incorrect address. Currently this is only a problem on u300. - or the assumption of the zImage being loaded by the bootloader within the first 128MB of RAM is incorrect - or when ZBOOT_ROM is used, where the above assumption is usually wrong. [ukleinek: changed mask from 0xf0000000 to 0xf8000000 for mx1 and shark + some review fixes from the mailing list] Original-Idea-and-Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-07ARM: Remove unused PARAMS_PHYS from arch/arm/boot/compressedEric Miao
The only reference in arch/arm/boot/compressed to PARAMS_PHYS is params() in head.S, which can be directly converted to the exact address as specified by arch/arm/mach-rpc/Makefile.boot. Signed-off-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-07ARM: zImage: don't define unused symbol initrd_physUwe Kleine-König
The only user of initrd_phys is arch/arm/boot/bootp/init.S which still gets the value passed to. Acked-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-07ARM: remove bit-rotten STANDALONE_DEBUG for decompressorUwe Kleine-König
I tried to get this running to debug the regression introduced by e7db7b4 without success. But this has several problems that make it hard to fix: - lib/decompress_inflate.c includes in-kernel headers that make it difficult to compile for user space. - the binary formats changed both in kernel and user space and at least for the kernel side there isn't only a single variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2010-06-24ARM: Remove support for LinkUp Systems L7200 SDP.Russell King
This hasn't been actively maintained for a long time, only receiving the occasional build update when things break. I doubt anyone has one of these on their desks anymore. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-06-17ARM: zImage: annotate debug functions about corrupted registersUwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-06-17ARM: zImage: fix comments for cache_on, cache_off and cache_clean_flushUwe Kleine-König
This adds missing registers to the list of corrupted registers and removes a wrong comment about r9 on entry While at it the formatting of the comment to cache_off is changed to resemble the other two. Acked-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-06-17ARM: zImage: __armv3_mpu_cache_flush: respect should-be-zero specificationUwe Kleine-König
Probably the register content for cache operations is "don't care" in practice, but as r1 is explicitly zeroed, use that one. Acked-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-06-17ARM: zImage: some comments for __armv3_mpu_cache_onUwe Kleine-König
__armv3_mpu_cache_on seems broken. As there is noone around who knows about these machines just keep the code as is but point out the strange things. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-06-17ARM: zImage: don't hard code the stack size twiceUwe Kleine-König
Acked-by: Eric Miao <eric.miao@canonical.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-05-17Merge branch 'devel-stable' into develRussell King
Conflicts: arch/arm/Kconfig arch/arm/include/asm/system.h arch/arm/mm/Kconfig
2010-05-06[ARM] pxa: update cpuid pattern for pxa9xx in head.SHaojian Zhuang
Update CPUID pattern of PXA9xx in head.S and fix the duplicate entries for pxa935. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-04-14ARM: 6026/1: ARM: Add support for LZMA-compressed kernel imagesAlbin Tonnerre
This patch allows using a kernel image compressed with LZMA on ARM. Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage, as the size benefit is quite significant (about 25% smaller with LZMA compared to GZIP) Tested-by: Martin Michlmayr <tbm@cyrius.com> Tested-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-07ARM: 6031/1: fix Thumb-2 decompressorRabin Vincent
98e12b5a6e05413 ("ARM: Fix decompressor's kernel size estimation for ROM=y") broke the Thumb-2 decompressor because it added an entry in the LC0 table but didn't adjust the offset the Thumb-2 code uses to load the SP from that table. Fix it. Cc: stable <stable@kernel.org> Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-03-15ARM: 5990/1: ARM: use __armv5tej_mmu_cache_flush for V5TEJ instead of ↵Sascha Hauer
__armv4_mmu_cache_flush This got broken with commit 0e056f20 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-03-15ARM: Add final piece to fix XIP decompressor in read-only memoryRussell King
This defines STATIC_RW_DATA, which prevents the read/write malloc management data being declared with a static attribute. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-03-13ARM: 5985/2: ARM: Fix Samsung build after "ARM: Eliminate decompressor ↵Mark Brown
-Dstatic= PIC hack" Commit 5de813b6 (ARM: Eliminate decompressor -Dstatic= PIC hack) among other things changed the declared type of the error() function to an extern, conflicting with the forward declartion in the Samsung plat/uncompress.h which appears to have been relying on the static being defined away, causing build failures since error() ends up with a GOT relocation but the linker script discards all GOT relocated data and functions: arch/arm/boot/compressed/decompress.o: In function `gunzip': /home/broonie/git/linux-2.6/arch/arm/boot/compressed/../../../../lib/decompress_ +inflate.c:68: undefined reference to `error' and so on. Fix this by moving the declaration into uncompress/misc.c where it is shared with the rest of the code, correcting the definition as we go. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-03-08Merge branch 'master' into for-linusRussell King
2010-02-26ARM: Fix decompressor's kernel size estimation for ROM=yRussell King
Commit 2552fc2 changed the way the decompressor decides if it is safe to decompress the kernel directly to its final location. Unfortunately, it took the top of the compressed data as being the stack pointer, which it is for ROM=n cases. However, for ROM=y, the stack pointer is not relevant, and results in the wrong answer. Fix this by explicitly storing the end of the biggybacked data in the decompressor, and use that to calculate the compressed image size. CC: <stable@kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-25Merge branch 'misc2' into develRussell King
2010-02-25ARM: Eliminate decompressor -Dstatic= PIC hackRussell King
We used to build decompressors with -Dstatic= to avoid any local data being generated. The problem is that local data generates GOTOFF relocations, which means we can't relocate the data relative to the text segment. Global data, on the other hand, goes through the GOT, and can be relocated anywhere. Unfortunately, with the new decompressors, this presents a problem since they declare static data within functions, and this leads to stack overflow. Fix this by separating out the decompressor code into a separate file, and removing 'static' from BSS data in misc.c. Also, discard the .data section - this means that should we end up with read/write initialized data, the decompressor will fail to link and the problem will be obvious. Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: 5910/1: ARM: Add tmp register for addruart and loadspTony Lindgren
Otherwise more complicated uart configuration won't be possible. We can use r1 for tmp register for both head.S and debug.S. NOTE: This patch depends on another patch to add the the tmp register into all debug-macro.S files. That can be done with: $ sed -i -e "s/addruart,rx|addruart, rx/addruart, rx, tmp/" arch/arm/*/include/*/debug-macro.S Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-19ARM: 5884/1: arm: Fix DCC console for v7Tony Lindgren
Without this patch arch/arm/compressed/head.S defaults to generic DCC code that does not work for v7. For more information on the v7 DCC, see Cortex-A8 TRM "12.11.1 Debug communications channel". To use it with post 2.6.33-rc1 or later, you need to have: CONFIG_DEBUG_LL=y ONFIG_DEBUG_ICEDCC=y CONFIG_EARLY_PRINTK=y Earlier kernels need commit 93fd03a8c6728b58879f8af20ffd55d9c32a778b backported. Tested on omap3430. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-18ARM: 5882/1: ARM: Fix uncompress code compile for different defines of ↵Tony Lindgren
flush(void) Because of the include of the decompress_inflate.c file from boot/compress/misc.c, there are different flush() defines: In file included from arch/arm/boot/compressed/misc.c:249: arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:138:29: error: macro "flush" passed 2 arguments, but takes just 0 Fix this by removing the define of flush() in misc.c for CONFIG_DEBUG_ICEDCC as it's already defined in mach/uncompress.h, and that is being included unconditionally. Also use a static inline function instead of define for mach-mxc and mach-gemini to avoid similar bug for those platforms. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-11arm: add support for LZO-compressed kernelsAlbin Tonnerre
- changes to ach/arch/boot/Makefile to make it easier to add new compression types - new piggy.lzo.S necessary for lzo compression - changes in arch/arm/boot/compressed/misc.c to allow the use of lzo or gzip, depending on the config - Kconfig support Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Tested-by: Wu Zhangjin <wuzhangjin@gmail.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Tested-by: Russell King <rmk@arm.linux.org.uk> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-27ARM: add base support for Marvell Dove SoCSaeed Bishara
The Marvell Dove (88AP510) is a high-performance, highly integrated, low power SoC with high-end ARM-compatible processor (known as PJ4), graphics processing unit, high-definition video decoding acceleration hardware, and a broad range of peripherals. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-09-15Nicolas Pitre has a new email addressNicolas Pitre
Due to problems at cam.org, my nico@cam.org email address is no longer valid. FRom now on, nico@fluxnic.net should be used instead. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-12Merge branch 'master' into develRussell King
2009-07-25ARM: includecheck fix: misc.cJaswinder Singh Rajput
fix the following 'make includecheck' warning: arch/arm/boot/compressed/misc.c: linux/compiler.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-07-24nommu: Fix compressed/head.S to not perform MMU specific operationsCatalin Marinas
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-07-24Thumb-2: Implement the unified boot codeCatalin Marinas
This patch adds the ARM/Thumb-2 unified support for the arch/arm/boot/* files. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-07-24Thumb-2: Add some .align statements to the .S filesCatalin Marinas
Since the Thumb-2 instructions can be 16-bit wide, data in the .text sections may not be aligned to a 32-bit word and this leads to unaligned exceptions. This patch does not affect the ARM code generation. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-06-19[ARM] Add old Feroceon support to compressed/head.SJoonyoung Shim
This patch supports the cache handling for some old Feroceon cores for which the CPU ID is like 0x41159260. This is a complement to commit ab6d15d50637fc25ee941710b23fed09ceb28db3. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-05-30Add core support for ARMv6/v7 big-endianCatalin Marinas
Starting with ARMv6, the CPUs support the BE-8 variant of big-endian (byte-invariant). This patch adds the core support: - setting of the BE-8 mode via the CPSR.E register for both kernel and user threads - big-endian page table walking - REV used to rotate instructions read from memory during fault processing as they are still little-endian format - Kconfig and Makefile support for BE-8. The --be8 option must be passed to the final linking stage to convert the instructions to little-endian Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>