summaryrefslogtreecommitdiff
path: root/tb/sim/smp_boot.S
blob: 669508b395d28035974838e7174a1dd8ef89213b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.global reset

reset:
	adr   r0, cpus

.inc_cpus:
	ldrex r1, [r0]
	add   r1, r1, #1
	strex r2, r1, [r0]
	teq   r2, #0
	bne   .inc_cpus

	cmp   r1, #1
	movne pc, lr

	ldr   r1, =0x30140000
	ldr   r2, [r1]
	ldr   r3, =0x01010100
	str   r3, [r1]
	ldr   r3, [r1]
.wait:
	ldr   r1, [r0]
	b     .wait

cpus: .word 0