ivt_irq: b IRQHandler @ 0x18 IRQ
ivt_fiq: b . @ 0x1C FIQ (Fast interrupt)
+init_lock: .long 0
+
+.extern SHORTLOCK
.globl _start
_start:
+ ldr r1, =init_lock
+ mov r0, #1
+ swp r0, r0, [r1]
+ tst r0,r0
+ bne .smp_halt
+
ldr r2, =UART0_PADDR
mov r1, #'A'
str r1, [r2]
@
mrc p15, 0, r0, c0, c1, 1
and r0, #0xF0
+ beq .no_sec_ext
@ - Present
- ldrne r0,=KERNEL_BASE
- mcrne p15, 0, r0, c12, c0, 0 @ Set the VBAR (brings exceptions into high memory)
+ ldr r0,=KERNEL_BASE
+ mcr p15, 0, r0, c12, c0, 0 @ Set the VBAR (brings exceptions into high memory)
+ b .exceptions_vectored
+.no_sec_ext:
@ - Absent
- mrceq p15, 0, r0, c1, c0, 0 @ Set SCTLR.V
- orreq r0, #0x2000
- mcreq p15, 0, r0, c1, c0, 0
+ mrc p15, 0, r0, c1, c0, 0 @ Set SCTLR.V
+ orr r0, #0x2000
+ mcr p15, 0, r0, c1, c0, 0
+.exceptions_vectored:
mov r1, #'-'
str r1, [r2]
ldr r0, =kmain
mov pc, r0
1: b 1b @ Infinite loop
+.smp_halt:
+1: b 1b
.comm irqstack, 0x1000 @ ; 4KiB Stack
.comm abortstack, 0x1000 @ ; 4KiB Stack