xref: /csrg-svn/sys/i386/isa/rtc.h (revision 63364)
149573Swilliam /*-
2*63364Sbostic  * Copyright (c) 1990, 1993
3*63364Sbostic  *	The Regents of the University of California.  All rights reserved.
449573Swilliam  *
549573Swilliam  * This code is derived from software contributed to Berkeley by
649573Swilliam  * William Jolitz.
749573Swilliam  *
849573Swilliam  * %sccs.include.redist.c%
949573Swilliam  *
10*63364Sbostic  *	@(#)rtc.h	8.1 (Berkeley) 06/11/93
1149573Swilliam  */
1249573Swilliam 
1345548Sbill /*
1445548Sbill  * RTC Register locations
1545548Sbill  */
1645548Sbill 
1745548Sbill #define RTC_SEC		0x00	/* seconds */
1845548Sbill #define RTC_SECALRM	0x01	/* seconds alarm */
1945548Sbill #define RTC_MIN		0x02	/* minutes */
2045548Sbill #define RTC_MINALRM	0x03	/* minutes alarm */
2145548Sbill #define RTC_HRS		0x04	/* hours */
2245548Sbill #define RTC_HRSALRM	0x05	/* hours alarm */
2345548Sbill #define RTC_WDAY	0x06	/* week day */
2445548Sbill #define RTC_DAY		0x07	/* day of month */
2545548Sbill #define RTC_MONTH	0x08	/* month of year */
2645548Sbill #define RTC_YEAR	0x09	/* month of year */
2745548Sbill #define RTC_STATUSA	0x0a	/* status register A */
2849573Swilliam #define  RTCSA_TUP	 0x80	/* time update, don't look now */
2945548Sbill 
3049573Swilliam #define RTC_STATUSB	0x0b	/* status register B */
3149573Swilliam 
3249573Swilliam #define RTC_INTR	0x0c	/* status register C (R) interrupt source */
3349573Swilliam #define  RTCIR_UPDATE	 0x10	/* update intr */
3449573Swilliam #define  RTCIR_ALARM	 0x20	/* alarm intr */
3549573Swilliam #define  RTCIR_PERIOD	 0x40	/* periodic intr */
3649573Swilliam #define  RTCIR_INT	 0x80	/* interrupt output signal */
3749573Swilliam 
3849573Swilliam #define RTC_STATUSD	0x0d	/* status register D (R) Lost Power */
3949573Swilliam #define  RTCSD_PWR	 0x80	/* clock lost power */
4049573Swilliam 
4149573Swilliam #define RTC_DIAG	0x0e	/* status register E - bios diagnostic */
4249699Swilliam #define RTCDG_BITS	"\020\010clock_battery\007ROM_cksum\006config_unit\005memory_size\004fixed_disk\003invalid_time"
4349573Swilliam 
4449573Swilliam #define RTC_RESET	0x0f	/* status register F - reset code byte */
4549573Swilliam #define	 RTCRS_RST	 0x00		/* normal reset */
4649573Swilliam #define	 RTCRS_LOAD	 0x04		/* load system */
4749573Swilliam 
4845548Sbill #define RTC_BASELO	0x15	/* low byte of basemem size */
4945548Sbill #define RTC_BASEHI	0x16	/* high byte of basemem size */
5045548Sbill #define RTC_EXTLO	0x17	/* low byte of extended mem size */
5145548Sbill #define RTC_EXTHI	0x18	/* low byte of extended mem size */
5249573Swilliam 
5349573Swilliam #define RTC_CENTURY	0x32	/* current century - please increment in Dec99*/
54