Mercurial > lcfOS
comparison kernel/startup_a9.asm @ 375:19eacf4f7270
Started on memory manager
author | Windel Bouwman |
---|---|
date | Sun, 23 Mar 2014 15:44:06 +0100 |
parents | 577ed7fb3fe4 |
children | 9667d78ba79e |
comparison
equal
deleted
inserted
replaced
374:72a3b646d543 | 375:19eacf4f7270 |
---|---|
1 | 1 |
2 | |
3 interrupt_vector_table: | |
4 ivt_reset: B start ; 0x0 reset | |
5 ivt_undef: B undef_handler ; 0x4 undefined instruction | |
6 ivt_svc: B undef_handler ; 0x08 Supervisor call | |
7 ivt_prefetch: B undef_handler ; 0x0C prefetch abort | |
8 ivt_data: B undef_handler ; 0x10 data abort | |
9 ivt_hyptrap: B undef_handler ; 0x14 not used | |
10 ivt_irq: B undef_handler ; 0x18 IRQ | |
11 ivt_fiq: B undef_handler ; 0x18 FIQ | |
12 | |
13 | |
14 start: | |
15 | |
16 ; Setup TTBR1 (translation table base register) | |
17 | |
18 mov r0, 0 | |
19 mcr p15, 0, r0, c2, c0, 1 ; TTBR1 | |
20 mcr p15, 0, r0, c2, c0, 0 ; TTBR0 | |
21 | |
22 ; Prepare the TTBCR (translation table base control register) | |
23 mov r0, 0x1 ; TBD: why set this to 1? | |
24 mcr p15, 0, r0, c2, c0, 2 | |
25 | |
26 ; Enable the VMSA (Virtual memory system architecture): | |
27 mrc p15, 0, r0, c1, c0, 0 | |
28 ; TODO: | |
29 ; orr r0, r0, 0x1 | |
30 mcr p15, 0, r0, c1, c0, 0 | |
31 | |
32 ; Setup stack: | |
2 mov sp, 0x30000 | 33 mov sp, 0x30000 |
3 BL kernel_start ; Branch to main (this is actually in the interrupt vector) | 34 BL kernel_start ; Branch to main (this is actually in the interrupt vector) |
4 local_loop: | 35 local_loop: |
5 B local_loop | 36 B local_loop |
6 | 37 |
38 | |
39 ; Interrupt handlers: | |
40 | |
41 undef_handler: | |
42 B undef_handler | |
7 | 43 |
8 ; Called to identify the proc: | 44 ; Called to identify the proc: |
9 archmem_pfr0: | 45 archmem_pfr0: |
10 mrc p15, 0, r0, c0, c1, 0 | 46 mrc p15, 0, r0, c0, c1, 0 |
11 mov pc, lr | 47 mov pc, lr |