diff experiments/qemu_vexpress_a9/startup.s @ 386:2a970e7270e2

Added repeat assembler macro
author Windel Bouwman
date Thu, 01 May 2014 17:40:59 +0200
parents c7cc54c0dfdf
children 34ac19044b8a
line wrap: on
line diff
--- a/experiments/qemu_vexpress_a9/startup.s	Thu May 01 14:03:12 2014 +0200
+++ b/experiments/qemu_vexpress_a9/startup.s	Thu May 01 17:40:59 2014 +0200
@@ -1,8 +1,53 @@
 
+.section .init
 
 .global _Reset;
 _Reset:
  LDR sp, =stack_top
+
+ ldr r2, =0x10009000
+
+ mov r1, #'1'
+ str r1, [r2]
+
+ ldr r0, =kernel_table0
+ mcr p15, 0, r0, c2, c0, 1
+ mcr p15, 0, r0, c2, c0, 0
+
+ mov r1, #'2'
+ str r1, [r2]
+
+ mov r1, #'3'
+ str r1, [r2]
+
+mov r0, #3
+mcr p15, 0, r0, c3, c0, 0
+
+ mov r1, #'4'
+ str r1, [r2]
+
+mrc p15, 0, r0, c1, c0, 0
+orr r0, r0, #1
+mcr p15, 0, r0, c1, c0, 0
+
+ mov r1, #'5'
+ str r1, [r2]
+
+
  BL start
  B .
 
+
+
+.section .padata
+
+kernel_table0:
+ .long 0x0402
+ .rept 0xFFF
+  .long 0x0
+ .endr
+
+ .rept 0xFFF
+  .long 0x0
+ .endr
+