comparison kernel/arch/qemu_vexpress/start.asm @ 404:a284749c5729

Improved build scripts
author Windel Bouwman
date Thu, 19 Feb 2015 14:08:17 +0100
parents 2ec730e45ea1
children b1daa462ee17
comparison
equal deleted inserted replaced
403:1613c9d479bf 404:a284749c5729
1
2 ; This file contains the low level assembly code required for interrupt
3 ; handling and virtual memory.
1 4
2 section reset 5 section reset
3 6
4 interrupt_vector_table: 7 interrupt_vector_table:
5 ivt_reset: B start ; 0x0 reset 8 ivt_reset: B start ; 0x0 reset
11 ivt_irq: B undef_handler ; 0x18 IRQ 14 ivt_irq: B undef_handler ; 0x18 IRQ
12 ivt_fiq: B undef_handler ; 0x18 FIQ 15 ivt_fiq: B undef_handler ; 0x18 FIQ
13 16
14 17
15 start: 18 start:
19
20 ; Setup the memory manager and the stack before entering kernel
16 21
17 ; Setup TTBR1 (translation table base register) 22 ; Setup TTBR1 (translation table base register)
18 23
19 ldr r0, =kernel_table0 ; pseudo instruction which loads the value of the symbol 24 ldr r0, =kernel_table0 ; pseudo instruction which loads the value of the symbol
20 ; -KERNEL_BASE 25 ; -KERNEL_BASE
38 orr r0, r0, r1 ; TODO: implement orr r0, r0, 1 43 orr r0, r0, r1 ; TODO: implement orr r0, r0, 1
39 mcr p15, 0, r0, c1, c0, 0 44 mcr p15, 0, r0, c1, c0, 0
40 45
41 ; Setup stack: 46 ; Setup stack:
42 mov sp, 0x30000 47 mov sp, 0x30000
43 BL kernel_start ; Branch to main (this is actually in the interrupt vector) 48 BL kernel_start ; Branch to main (this is actually in the interrupt vector)
44 local_loop: 49 local_loop:
45 B local_loop 50 B local_loop
46 51
47 52
48 ; Interrupt handlers: 53 ; Interrupt handlers: