提交 1b3a02eb 编写于 作者: T Tony Thompson 提交者: Catalin Marinas

ARMv7: Check whether the SMP/nAMP mode was already enabled

If running in non-secure mode, enabling this register will fault.
Signed-off-by: NTony Thompson <Anthony.Thompson@arm.com>
Acked-by: NSrinidhi Kasagar <srinidhikasagar@gmail.com>
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 b419148e
......@@ -186,9 +186,10 @@ cpu_v7_name:
*/
__v7_setup:
#ifdef CONFIG_SMP
mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode and
orr r0, r0, #(1 << 6) | (1 << 0) @ TLB ops broadcasting
mcr p15, 0, r0, c1, c0, 1
mrc p15, 0, r0, c1, c0, 1
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
#endif
adr r12, __v7_setup_stack @ the local stack
stmia r12, {r0-r5, r7, r9, r11, lr}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册