~ubuntu-branches/ubuntu/raring/ipxe/raring

« back to all changes in this revision

Viewing changes to src/arch/i386/include/rtc.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-11-14 15:47:31 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20121114154731-jhuy5d1h2jw75qe9
Tags: 1.0.0+git-4.d6b0b76-0ubuntu1
* New upstream snapshot:
  - d/p/iscsi*.patch: Dropped - included in snapshot.
  - Refreshed all other patches.
* d/p/enable-https.patch: Enable HTTPS support (LP: #1025239).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _RTC_H
 
2
#define _RTC_H
 
3
 
 
4
/** @file
 
5
 *
 
6
 * CMOS Real-Time Clock (RTC)
 
7
 *
 
8
 * The CMOS/RTC registers are documented (with varying degrees of
 
9
 * accuracy and consistency) at
 
10
 *
 
11
 *    http://www.nondot.org/sabre/os/files/MiscHW/RealtimeClockFAQ.txt
 
12
 *    http://wiki.osdev.org/RTC
 
13
 *    http://wiki.osdev.org/CMOS
 
14
 */
 
15
 
 
16
FILE_LICENCE ( GPL2_OR_LATER );
 
17
 
 
18
#include <pic8259.h>
 
19
 
 
20
/** RTC IRQ */
 
21
#define RTC_IRQ 8
 
22
 
 
23
/** RTC interrupt vector */
 
24
#define RTC_INT IRQ_INT ( RTC_IRQ )
 
25
 
 
26
/** CMOS/RTC address (and NMI) register */
 
27
#define CMOS_ADDRESS 0x70
 
28
 
 
29
/** NMI disable bit */
 
30
#define CMOS_DISABLE_NMI 0x80
 
31
 
 
32
/** CMOS/RTC data register */
 
33
#define CMOS_DATA 0x71
 
34
 
 
35
/** RTC seconds */
 
36
#define RTC_SEC 0x00
 
37
 
 
38
/** RTC minutes */
 
39
#define RTC_MIN 0x02
 
40
 
 
41
/** RTC hours */
 
42
#define RTC_HOUR 0x04
 
43
 
 
44
/** RTC weekday */
 
45
#define RTC_WDAY 0x06
 
46
 
 
47
/** RTC day of month */
 
48
#define RTC_MDAY 0x07
 
49
 
 
50
/** RTC month */
 
51
#define RTC_MON 0x08
 
52
 
 
53
/** RTC year */
 
54
#define RTC_YEAR 0x09
 
55
 
 
56
/** RTC status register A */
 
57
#define RTC_STATUS_A 0x0a
 
58
 
 
59
/** RTC update in progress bit */
 
60
#define RTC_STATUS_A_UPDATE_IN_PROGRESS 0x80
 
61
 
 
62
/** RTC status register B */
 
63
#define RTC_STATUS_B 0x0b
 
64
 
 
65
/** RTC 24 hour format bit */
 
66
#define RTC_STATUS_B_24_HOUR 0x02
 
67
 
 
68
/** RTC binary mode bit */
 
69
#define RTC_STATUS_B_BINARY 0x04
 
70
 
 
71
/** RTC Periodic Interrupt Enabled bit */
 
72
#define RTC_STATUS_B_PIE 0x40
 
73
 
 
74
/** RTC status register C */
 
75
#define RTC_STATUS_C 0x0c
 
76
 
 
77
/** RTC status register D */
 
78
#define RTC_STATUS_D 0x0d
 
79
 
 
80
/** CMOS default address */
 
81
#define CMOS_DEFAULT_ADDRESS RTC_STATUS_D
 
82
 
 
83
#endif /* _RTC_H */