Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258226
b: refs/heads/master
c: 540b573
h: refs/heads/master
v: v3
  • Loading branch information
Dave Martin authored and Russell King committed Jul 19, 2011
1 parent 31c19ec commit 10fcbc0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7e89b16eb90e7bdf0d71bd5ba265ce8d424f30b
refs/heads/master: 540b573875bd26dfe39aa18d22dc195f275fc0df
5 changes: 5 additions & 0 deletions trunk/Documentation/arm/Booting
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,8 @@ In either case, the following conditions must be met:
- The boot loader is expected to call the kernel image by jumping
directly to the first instruction of the kernel image.

On CPUs supporting the ARM instruction set, the entry must be
made in ARM state, even for a Thumb-2 kernel.

On CPUs supporting only the Thumb instruction set such as
Cortex-M class CPUs, the entry must be made in Thumb state.
3 changes: 2 additions & 1 deletion trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ not_relocated: mov r0, #0
mov r0, #0 @ must be zero
mov r1, r7 @ restore architecture number
mov r2, r8 @ restore atags pointer
mov pc, r4 @ call kernel
ARM( mov pc, r4 ) @ call kernel
THUMB( bx r4 ) @ entry point is always ARM

.align 2
.type LC0, #object
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/kernel/head-nommu.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@
* numbers for r1.
*
*/
.arm

__HEAD
ENTRY(stext)

THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM.
THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
THUMB( .thumb ) @ switch to Thumb now.
THUMB(1: )

setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
@ and irqs disabled
#ifndef CONFIG_CPU_CP15
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@
* crap here - that's what the boot loader (or in extreme, well justified
* circumstances, zImage) is for.
*/
.arm

__HEAD
ENTRY(stext)

THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM.
THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
THUMB( .thumb ) @ switch to Thumb now.
THUMB(1: )

setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
@ and irqs disabled
mrc p15, 0, r9, c0, c0 @ get processor id
Expand Down

0 comments on commit 10fcbc0

Please sign in to comment.