annotate kernel/arch/qemu_vexpress/vexpressA9.c3 @ 410:6aa9743ed362 tip

Reflect change in c3 public modifier
author Windel Bouwman
date Mon, 23 Feb 2015 21:06:04 +0100
parents ad6be5454067
children
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
410
6aa9743ed362 Reflect change in c3 public modifier
Windel Bouwman
parents: 408
diff changeset
5 public function void init()
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
6 {
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
7 io.print2("PFR0 = ", pfr0());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
8 io.print2("PFR1 = ", pfr1());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
9 io.print2("MMFR0 = ", mmfr0());
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
10
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
11 // This below is not compatible with all qemu versions:
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
12 // io.print2("MPUIR = ", arch.mpuir());
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
13 }
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
14
410
6aa9743ed362 Reflect change in c3 public modifier
Windel Bouwman
parents: 408
diff changeset
15 public function void putc(int c)
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
16 {
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
17 var int *UART0DR;
388
e07c2a9abac1 Enabled paging in kernel
Windel Bouwman
parents: 381
diff changeset
18 UART0DR = cast<int*>(0x109000); // UART0 DR register when remapped at 1MB
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
19 *UART0DR = c;
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
20 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
21
410
6aa9743ed362 Reflect change in c3 public modifier
Windel Bouwman
parents: 408
diff changeset
22 public function void halt()
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
23 {
402
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
24 while(true)
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
25 {
0fb6633c42f6 Moved several files to logical locations
Windel Bouwman
parents: 389
diff changeset
26 }
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
27 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
28
408
ad6be5454067 Added image build task
Windel Bouwman
parents: 407
diff changeset
29 // Functions implemented in assembly:
410
6aa9743ed362 Reflect change in c3 public modifier
Windel Bouwman
parents: 408
diff changeset
30 public function byte* get_image_address();
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
31 function int pfr0();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
32 function int pfr1();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
33 function int mmfr0();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
34 // function int mpuir();
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 367
diff changeset
35