summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/lowlevel.S
Commit message (Collapse)AuthorAgeFilesLines
* arm/cpu/lowlevel: fix: possible processor mode changeAlexander Kurz2016-03-041-1/+3
| | | | | | | | | | | This is a re-application of fix 17644b55. arm_cpu_lowlevel_init() will set the processor mode to 0x13 (supervisor). When this function is entered via a different processor mode, register banking will happen to lr (r14), resulting in an invalid return address. This fix will preserve the return address manually. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm/cpu/lowlevel: Don't save the return address in another registerUwe Kleine-König2014-12-151-2/+1
| | | | | | | | | The corresponding code doesn't use the lr register (neither explicitly nor implicitly by the bl instruction), so there is no gain in using r2 here. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm/cpu/lowlevel: add and fix comments for CPSR and SCTLR accessesUwe Kleine-König2014-12-151-5/+7
| | | | | | | | | A part of the existing comments was incomplete or missleading. Adding the register name to mcr/mrc instructions helps finding the corresponding documentation in the manuals. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm/cpu/lowlevel: invalidate i-cache before enablingUwe Kleine-König2014-12-151-3/+20
| | | | | | | | | | | | | | | | Architecturally the cache contents are undefined so it might well contain stale data at reset. So better be save than sorry. I verifyed that the added instructions are defined for both, ARMv6 and ARMv7, using the ARM Architecture Reference Manual, ARMv7-A and ARMv7-R edition (ARM DDI 0406C.c). For the already existing mcr instruction see the newly added comment. This patch also unifies handling of ARMv6 and ARMv7, the isb instruction can also be done on the latter via mcr which simplifies the code a bit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bugfix: don't rely on lr in arm_cpu_lowlevel_init张忠山2014-02-271-1/+2
| | | | | Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Create an assembly arm_cpu_lowlevel_init functionSascha Hauer2013-08-071-0/+39
To avoid the code duplication between the static inline C function and the assembly macro. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>