thanks to damocles, two places changed. one relates to the performance boost.
[mit-jos.git] / kern / kclock.h
blobecea06e3b69607709042e26407d361fe18c31b98
1 /* See COPYRIGHT for copyright information. */
3 #ifndef JOS_KERN_KCLOCK_H
4 #define JOS_KERN_KCLOCK_H
5 #ifndef JOS_KERNEL
6 # error "This is a JOS kernel header; user programs should not #include it"
7 #endif
9 #define IO_RTC 0x070 /* RTC port */
11 #define MC_NVRAM_START 0xe /* start of NVRAM: offset 14 */
12 #define MC_NVRAM_SIZE 50 /* 50 bytes of NVRAM */
14 /* NVRAM bytes 7 & 8: base memory size */
15 #define NVRAM_BASELO (MC_NVRAM_START + 7) /* low byte; RTC off. 0x15 */
16 #define NVRAM_BASEHI (MC_NVRAM_START + 8) /* high byte; RTC off. 0x16 */
18 /* NVRAM bytes 9 & 10: extended memory size */
19 #define NVRAM_EXTLO (MC_NVRAM_START + 9) /* low byte; RTC off. 0x17 */
20 #define NVRAM_EXTHI (MC_NVRAM_START + 10) /* high byte; RTC off. 0x18 */
22 /* NVRAM bytes 34 and 35: extended memory POSTed size */
23 #define NVRAM_PEXTLO (MC_NVRAM_START + 34) /* low byte; RTC off. 0x30 */
24 #define NVRAM_PEXTHI (MC_NVRAM_START + 35) /* high byte; RTC off. 0x31 */
26 /* NVRAM byte 36: current century. (please increment in Dec99!) */
27 #define NVRAM_CENTURY (MC_NVRAM_START + 36) /* RTC offset 0x32 */
29 unsigned mc146818_read(unsigned reg);
30 void mc146818_write(unsigned reg, unsigned datum);
31 void kclock_init(void);
33 #endif // !JOS_KERN_KCLOCK_H