Avoids nehalem keyboard issues, better monitors
[akaros.git] / kern / arch / i686 / 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 #ifdef __SHARC__
9 #pragma nosharc
10 #endif
11
12 #include <arch/x86.h>
13
14 #include <kclock.h>
15
16
17 unsigned
18 mc146818_read(unsigned reg)
19 {
20         outb(IO_RTC, reg);
21         return inb(IO_RTC+1);
22 }
23
24 void
25 mc146818_write(unsigned reg, unsigned datum)
26 {
27         outb(IO_RTC, reg);
28         outb(IO_RTC+1, datum);
29 }
30
31
32