annotate kernel/arch/qemu_vexpress/vexpressA9.c3 @ 402:0fb6633c42f6

Moved several files to logical locations
author Windel Bouwman
date Thu, 19 Feb 2015 00:13:07 +0100
parents 2ec730e45ea1
children 9eb1fc6aad6c
rev   line source
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
1 module arch;
367
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 362
diff changeset
2 import io;
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
3
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
4
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
5 function void init()
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
6 {
354
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 353
diff changeset
7 // putc(65)
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
8 io.print2("PFR0 = ", pfr0());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
9 io.print2("PFR1 = ", pfr1());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
10 io.print2("MMFR0 = ", mmfr0());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
11
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
12 // This below is not compatible with all qemu versions:
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
13 // io.print2("MPUIR = ", arch.mpuir());
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
14 }
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
15
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
16 function void putc(int c)
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
17 {
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
18 var int *UART0DR;
388
e07c2a9abac1 Enabled paging in kernel
Windel Bouwman
parents: 381
diff changeset
19 UART0DR = cast<int*>(0x109000); // UART0 DR register when remapped at 1MB
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
20 *UART0DR = c;
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
21 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
22
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
23 function void halt()
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
24 {
402
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
25 while(true)
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
26 {
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
27 }
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
28 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
29
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
30 function int pfr0();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
31 function int pfr1();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
32 function int mmfr0();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
33 // function int mpuir();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
34