summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'for-next/misc'Sascha Hauer2013-02-041-15/+28
|\ \
| * | arm-mmu: switch pte flags vars to lower caseAlexander Aring2013-01-251-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old cache/uncache pte flags were declared as defines. Since these flags are determine at runtime they are static variables. This patch switch the naming style of these variables to lower case which is typically used for variables. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm-mmu: move PAGE_ALIGN macro to common.hAlexander Aring2013-01-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PAGE_ALIGN macro is needed to align addresses to page boundaries. Move this macro to another PAGE_* defines. Commands which uses remap_range function needs this macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remap_range: make function 'remap_range' globalAlexander Aring2013-01-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change function remap_range in arm architecture to make it global accessable. For example command 'memtest' can change pte flags to enable or disable cache. Add dummy function for others architectures that doesn't have mmu or pte support. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ARM mmu: Use pr_debugSascha Hauer2013-01-271-3/+24
| |/ |/| | | | | | | | | Also, specify a pr_fmt and add missing GPL header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM v7: Fix register corruption in v7_mmu_cache_offSascha Hauer2013-01-231-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v7_mmu_cache_flush stores registers on the stack and restores them afterwards. Additionally v7_mmu_cache_flush is called from v7_mmu_cache_off *after* disabling the MMU. With this the following can happen: - v7_mmu_cache_off disables the MMU. From now on no new values go to the data cache. - v7_mmu_cache_off calls v7_mmu_cache_flush which in turn puts registers on the stack. Due to the MMU being disabled they do not go into the data cache. - In v7_mmu_cache_flush the memory the stack is pointing to is overwritten with the values currently being in the cache. - v7_mmu_cache_flush restores the registers from the stack with values from the cache and not the memory where the values have previously been written to. Fix this by storing the registers on the stack *before* we disable the MMU and restore them after we have called v7_mmu_cache_flush. This way v7_mmu_cache_flush still restores corrupt register values for the case when the MMU has been disabled, but we will restore correct values afterwards. This has been first observed when switching to gcc-4.7.2 when compiling in Thumb2 mode, but could explain earlier problems also. The result here was that the register holding the kernel address in start_linux() was corrupted so that the kernel could not be started. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm-mmu: remove semicolon in arm mmu.cAlexander Aring2013-01-141-1/+1
| | | | | | | Remove semicolon in PAGE_ALIGN macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Cleanup Kconfig filesAlexander Shiyan2012-12-081-4/+3
| | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start-pbl.c: unifify path to lib/decompress_*.cAntony Pavlov2012-11-201-1/+1
| | | | | | | It's three levels up, not four. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start-pbl.c: make errorfn() staticAntony Pavlov2012-11-191-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bcm2835'Sascha Hauer2012-11-161-0/+5
|\ | | | | | | | | Conflicts: arch/arm/configs/versatilepb_defconfig
| * ARM1176: add supportCarlo Caione2012-10-211-0/+5
| | | | | | | | | | Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm-start' into for-next/armSascha Hauer2012-10-174-75/+53
|\ \
| * | ARM: simplify start.cSascha Hauer2012-10-081-18/+4
| | | | | | | | | | | | | | | | | | | | | start() for the PBL case is a duplicate of board_init_lowlevel_return(). Instead of duplicating it just call it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: cleanup piggydata copy checkSascha Hauer2012-10-051-20/+8
| | | | | | | | | | | | | | | | | | Replace to gotos with a single if(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: add assembly function for setting up C environmentSascha Hauer2012-10-054-37/+43
| |/ | | | | | | | | | | | | | | | | | | | | Sometimes Assembler beats C. In this case a small assembler function called without parameters can: - copy a binary to its link address - clear the bss - return to the same position in the copied binary Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: ensure irqs are disabled at barebox exitVicente Bergas2012-10-151-0/+11
| | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: add rename PSR bits to match linux namesVicente Bergas2012-10-152-4/+3
| | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: introduce arm_setup_stack function and use itSascha Hauer2012-10-132-5/+2
| | | | | | | | | | | | | | We have enough places which setup0 a stack to justify a static inline function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Support multiple ARM architecturesSascha Hauer2012-10-137-73/+191
| | | | | | | | | | | | | | The different ARM architectures need different cache functions. This patch makes them selectable during runtime. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: no need to call cache functions when MMU is disabledSascha Hauer2012-10-121-11/+2
| | | | | | | | | | | | | | | | Without MMU enabled we do not need to call __mmu_cache_* as the caches are not enabled. Calling flush_icache() before jumping to new code is enough. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM exceptions: Do not use hardcoded STACK_BASESascha Hauer2012-10-121-8/+7
| | | | | | | | | | | | | | | | | | The exception handlers need some space to write to. Traditionally this has been some stack space. This is not necessary at all, so just use some variable and get rid of the compile time fixed stack address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Add cpu_architecture() functionSascha Hauer2012-10-101-0/+47
|/ | | | | | | Once we run on multiple SoCs we must know which arm architecture we are on. Add cpu_architecture() from the kernel to detect it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Fix Kconfig link for Cirrus Logic EP9312 CPU.Alexander Shiyan2012-10-051-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: actually create cached mappings in the decompressorSascha Hauer2012-10-041-4/+3
| | | | | | | | | We called create_sections with 4096MB as size argument, but create_sections expected the argument in bytes, so create sections was completely optimized away due to the size >>= 20. This patch changes the size argument to be in megabytes and adjusts map_cachable to pass the argument in megabytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: Provide a dummy error function for the decompressorSascha Hauer2012-10-041-1/+6
| | | | | | | | | We can't do anything useful in the error function, so we just hang. This has the advantage that at least when a JTAG debugger is connected we can see what happens. Otherwise the code just jumps to NULL in case of an error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/arm-board-reset'Sascha Hauer2012-10-034-68/+26
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/cpu/start-reset.c arch/arm/include/asm/barebox-arm.h arch/arm/mach-omap/Kconfig arch/arm/mach-omap/omap3_core.S
| * ARM: give boards control of the reset entry pointJan Luebbe2012-09-274-65/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some SoCs (for example AM35xx), the ROM bootloader passes useful information in r0 when jumping to barebox. To avoid overwriting this in the generic reset code, we introduce common_reset as a C function and as an assembler macro. This is then called form the reset entry point (either in common or in board code). This patch is based on code by Sascha Hauer <s.hauer@pengutronix.de>. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: remove ARCH_HAS_LOWLEVEL_INITSascha Hauer2012-09-271-4/+0
| | | | | | | | | | | | | | | | This is unused now and not needed. We have a board_init_lowlevel. If a board needs some architecture setup it can always call it from its board_init_lowlevel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm-remove-arch-init-ll'Sascha Hauer2012-10-031-4/+0
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/include/asm/barebox-arm.h
| * | ARM: remove ARCH_HAS_LOWLEVEL_INITSascha Hauer2012-09-251-4/+0
| |/ | | | | | | | | | | | | | | This is unused now and not needed. We have a board_init_lowlevel. If a board needs some architecture setup it can always call it from its board_init_lowlevel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-034-14/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-14/+0
| | | | | | | | | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2012-10-033-19/+16
|\ \ \
| * | | ARM lowlevel: Use get_runtime_offsetSascha Hauer2012-09-092-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach to get the offset between link and runtime address is fragile. It requires a big fat comment to put no code above it and it requires an extra linker section. Instead use a small assembler function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM lowlevel: Update function documentationSascha Hauer2012-09-093-1/+10
| |/ / | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | / ARM: Disable MMU feature in PBLSascha Hauer2012-10-031-1/+5
| |/ |/| | | | | | | | | | | remap_cache currently does not work, so enabling the MMU in the PBL currently does not make sense. Disable it for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM mmu: use xmemalignSascha Hauer2012-09-161-1/+1
|/ | | | | | So we do not silently fail. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* create a common ARM flush_icache functionSascha Hauer2012-08-132-6/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: enable MMU during decompressionSascha Hauer2012-08-132-0/+75
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM MMU: call __mmu_cache_* as regular C functionsSascha Hauer2012-08-132-19/+14
| | | | | | | | Now that __mmu_cache_* restore the registers they can be called as regular C functions. Create a header file for them and use C functions rather than inline assembly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM __mmu_cache_*: Do not clobber registersSascha Hauer2012-08-132-3/+6
| | | | | | | Save/restore the registers used in __mmu_cache_* so that they can be called as regular C functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* compressed image: add gzip supportJean-Christophe PLAGNIOL-VILLARD2012-08-031-0/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ARM: add early malloc support needed by the decompressorJean-Christophe PLAGNIOL-VILLARD2012-08-031-0/+8
| | | | | | This is not needed by lzo but by gunzip, xz and others. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add compressed image supportJean-Christophe PLAGNIOL-VILLARD2012-08-031-4/+55
| | | | | | | | | | | | | | | | | | This allows for creating a lzo compressed binary unsing the pbl. Only copy the piggydata if needed. Add CONFIG_PBL_FORCE_PIGGYDATA_COPY option In some case we need to copy the PIGGYDATA as the link address as example we run from SRAM and shutdown the SDRAM/DDR for reconfiguration but most of the time we just need to copy the executable code. based on Sascha Hauer Add compressed image support Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add pre-bootloader (pbl) image supportJean-Christophe PLAGNIOL-VILLARD2012-08-034-39/+165
| | | | | | | | | | | | | | | | | | | | | This allows for creating a pre-bootloader binary for - nand boot - mmc boot - compressed image The pbl will be incharge of the lowlevel init if needed. The barebox will skip it. Import string functions from linux 3.4 (arch/arm/boot/compressed/string.c) and implement a dummy panic. For now on introduce dummy zbarebox* targets and c code that will contain later the decompressor. This only implemeted on ARM. This patch is based on Sascha Hauer <s.hauer@pengutronix.de> Add compressed image support patch Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ARM: move exception vector table to exceptions.SSascha Hauer2012-07-242-34/+19
| | | | | | | start.c has nothing to do with the exception vector table anymore, so move it next to the exception handling code in exceptions.S Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Separate assembler functions into their own sectionSascha Hauer2012-07-234-6/+27
| | | | | | To let the linker remove unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM startup: calculate offset instead of runtime addressSascha Hauer2012-07-231-6/+6
| | | | | | | Calculating the offset between runtime and linked address makes the intention of the binary copy function a bit more clear. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Enable unaligned accesses on armv6 and laterSascha Hauer2012-07-101-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | We have the following in the tree: |commit af42feb9d255bc3ea3b514180f265479ea8834f9 |Author: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> |Date: Mon Jan 2 11:49:17 2012 +0100 | | ARM: set SCTRL[A] only when architecture does not support unaligned access | | Recent gcc generates code with unaligned access when architecture | supports it. Setting A bit unconditionally causes data-aborts on such | code rendering barebox unusable. | | Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> What the patch tried is correct: We should set the A bit only when the architecture does not support unaligned accesses. To figure out whether the architecture supports unaligned accesses the patch tested for the U bit which is wrong. The U bit may be 0 after a reset, so instead of testing for the U bit we have to set it. This can be done on armv6 and later. All others have the A bit set to trap unaligned accesses. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>