1
#include <linux/linkage.h>
2
#include <linux/init.h>
4
.section ".text.head", "ax"
8
* Tegra specific entry point for secondary CPUs.
9
* The secondary kernel init calls v7_flush_dcache_all before it enables
10
* the L1; however, the L1 comes out of reset in an undefined state, so
11
* the clean + invalidate performed by v7_flush_dcache_all causes a bunch
12
* of cache lines with uninitialized data and uninitialized tags to get
13
* written out to memory, which does really unpleasant things to the main
14
* processor. We fix this by performing an invalidate, rather than a
15
* clean + invalidate, before jumping into the kernel.
17
ENTRY(v7_invalidate_l1)
19
mcr p15, 2, r0, c0, c0, 0
20
mrc p15, 1, r0, c0, c0, 0
23
and r2, r1, r0, lsr #13
27
and r3, r1, r0, lsr #3 @ NumWays - 1
28
add r2, r2, #1 @ NumSets
31
add r0, r0, #4 @ SetShift
34
add r4, r3, #1 @ NumWays
35
1: sub r2, r2, #1 @ NumSets--
36
mov r3, r4 @ Temp = NumWays
37
2: subs r3, r3, #1 @ Temp--
40
orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift)
41
mcr p15, 0, r5, c7, c6, 2
48
ENDPROC(v7_invalidate_l1)
50
ENTRY(tegra_secondary_startup)
53
mrc p15, 0, r0, c0, c0, 5
61
ENDPROC(tegra_secondary_startup)