annotate kernel/arch/vexpressA9.c3 @ 362:c05ab629976a

Added CPUID for arm
author Windel Bouwman
date Sat, 15 Mar 2014 10:56:34 +0100
parents 5477e499b039
children 577ed7fb3fe4
rev   line source
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
1 module arch;
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
2
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
3
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
4 function void init()
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
5 {
354
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 353
diff changeset
6 // putc(65)
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
7 }
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
8
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
9 function int pfr0();
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
10 function int pfr1();
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
11 function int mmfr0();
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
12 function int mpuir();
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 354
diff changeset
13
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
14 function void putc(int c)
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
15 {
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
16 var int *UART0DR;
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
17 UART0DR = cast<int*>(0x10009000); // UART0 DR register
353
b8ad45b3a573 Started with strings
Windel Bouwman
parents: 352
diff changeset
18 *UART0DR = c;
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
19 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
20
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
21 function void halt()
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
22 {
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
23 }
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents:
diff changeset
24