diff kernel/arch/qemu_vexpress/startup_a9.asm @ 386:2a970e7270e2

Added repeat assembler macro
author Windel Bouwman
date Thu, 01 May 2014 17:40:59 +0200
parents d056b552d3f4
children e07c2a9abac1
line wrap: on
line diff
--- a/kernel/arch/qemu_vexpress/startup_a9.asm	Thu May 01 14:03:12 2014 +0200
+++ b/kernel/arch/qemu_vexpress/startup_a9.asm	Thu May 01 17:40:59 2014 +0200
@@ -25,10 +25,17 @@
 mov r0, 0x1  ; TBD: why set this to 1?
 mcr p15, 0, r0, c2, c0, 2
 
+
+; Set domain 0 to manager:
+mov r0, 3
+mcr p15, 0, r0, c3, c0, 0
+
+
 ; Enable the VMSA (Virtual memory system architecture):
 mrc p15, 0, r0, c1, c0, 0
 ; TODO:
-; orr r0, r0, 0x1
+; mov r1, 0x1
+; orr r0, r0, r1 ; TODO: implement orr r0, r0, 1
 mcr p15, 0, r0, c1, c0, 0
 
 ; Setup stack:
@@ -48,6 +55,7 @@
 ; Called to identify the proc:
 arch_pfr0:
 mrc p15, 0, r0, c0, c1, 0
+ldr r0, =kernel_table0
 mov pc, lr
 
 arch_pfr1:
@@ -69,5 +77,8 @@
 section mem_tables
 
 kernel_table0:
- dcd 0x000402
+ dcd 0x000402 ; Identity map first 1 MB
+ repeat 0xFFE
+ dcd 0
+ endrepeat