Massive reorganizing and making all the makefiles consistent.
[akaros.git] / kern / src / kclock.c
1 /* See COPYRIGHT for copyright information. */
2
3 /* Support for two time-related hardware gadgets: 1) the run time
4  * clock with its NVRAM access functions; 2) the 8253 timer, which
5  * generates interrupts on IRQ 0.
6  */
7
8 #include <inc/x86.h>
9
10 #include <kern/kclock.h>
11
12
13 unsigned
14 mc146818_read(unsigned reg)
15 {
16         outb(IO_RTC, reg);
17         return inb(IO_RTC+1);
18 }
19
20 void
21 mc146818_write(unsigned reg, unsigned datum)
22 {
23         outb(IO_RTC, reg);
24         outb(IO_RTC+1, datum);
25 }
26
27
28