ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / head.S
index 278c1b0ebb2ee340fcb0e4f4b010c80e535c9308..742b6108a00168b8ed8c391c6d8e8b1b9c438fc6 100644 (file)
  * 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