1 /* See COPYRIGHT for copyright information. */
3 #ifndef _KERN_KCLOCK_H_
4 #define _KERN_KCLOCK_H_
6 #define IO_RTC 0x070 /* RTC port */
8 #define MC_NVRAM_START 0xe /* start of NVRAM: offset 14 */
9 #define MC_NVRAM_SIZE 50 /* 50 bytes of NVRAM */
11 /* NVRAM bytes 7 & 8: base memory size */
12 #define NVRAM_BASELO (MC_NVRAM_START + 7) /* low byte; RTC off. 0x15 */
13 #define NVRAM_BASEHI (MC_NVRAM_START + 8) /* high byte; RTC off. 0x16 */
15 /* NVRAM bytes 9 & 10: extended memory size */
16 #define NVRAM_EXTLO (MC_NVRAM_START + 9) /* low byte; RTC off. 0x17 */
17 #define NVRAM_EXTHI (MC_NVRAM_START + 10) /* high byte; RTC off. 0x18 */
19 /* NVRAM bytes 34 and 35: extended memory POSTed size */
20 #define NVRAM_PEXTLO (MC_NVRAM_START + 34) /* low byte; RTC off. 0x30 */
21 #define NVRAM_PEXTHI (MC_NVRAM_START + 35) /* high byte; RTC off. 0x31 */
23 /* NVRAM byte 36: current century. (please increment in Dec99!) */
24 #define NVRAM_CENTURY (MC_NVRAM_START + 36) /* RTC offset 0x32 */
26 u_int
mc146818_read(void *sc
, u_int reg
);
27 void mc146818_write(void *sc
, u_int reg
, u_int datum
);
28 void kclock_init(void);
30 #endif // not _KERN_KCLOCK_H_