Thumb-2: Pass a Thumb-2 address to the secondary CPUs to jump to

This patch sets bit 0 in the startup address passed to the secondary
CPUs so that they branch into Thumb-2 mode.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
Catalin Marinas 2009-07-24 12:33:00 +01:00
parent adca6dc23b
commit dff2ab16ac
1 changed files with 6 additions and 12 deletions

View File

@ -20,6 +20,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/localtimer.h> #include <asm/localtimer.h>
#include <asm/unified.h>
#include <mach/board-eb.h> #include <mach/board-eb.h>
#include <mach/board-pb11mp.h> #include <mach/board-pb11mp.h>
@ -137,26 +138,19 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
static void __init poke_milo(void) static void __init poke_milo(void)
{ {
extern void secondary_startup(void);
/* nobody is to be released from the pen yet */ /* nobody is to be released from the pen yet */
pen_release = -1; pen_release = -1;
/* /*
* write the address of secondary startup into the system-wide * Write the address of secondary startup into the system-wide flags
* flags register, then clear the bottom two bits, which is what * register. The BootMonitor waits for this register to become
* BootMonitor is waiting for * non-zero.
*/ */
#if 1
#define REALVIEW_SYS_FLAGSS_OFFSET 0x30 #define REALVIEW_SYS_FLAGSS_OFFSET 0x30
__raw_writel(virt_to_phys(realview_secondary_startup), #define REALVIEW_SYS_FLAGSC_OFFSET 0x34
__raw_writel(BSYM(virt_to_phys(realview_secondary_startup)),
__io_address(REALVIEW_SYS_BASE) + __io_address(REALVIEW_SYS_BASE) +
REALVIEW_SYS_FLAGSS_OFFSET); REALVIEW_SYS_FLAGSS_OFFSET);
#define REALVIEW_SYS_FLAGSC_OFFSET 0x34
__raw_writel(3,
__io_address(REALVIEW_SYS_BASE) +
REALVIEW_SYS_FLAGSC_OFFSET);
#endif
mb(); mb();
} }