iPXE
Defines | Functions
rtc.h File Reference

CMOS Real-Time Clock (RTC) More...

#include <pic8259.h>

Go to the source code of this file.

Defines

#define RTC_IRQ   8
 RTC IRQ.
#define RTC_INT   IRQ_INT ( RTC_IRQ )
 RTC interrupt vector.
#define CMOS_ADDRESS   0x70
 CMOS/RTC address (and NMI) register.
#define CMOS_DISABLE_NMI   0x80
 NMI disable bit.
#define CMOS_DATA   0x71
 CMOS/RTC data register.
#define RTC_SEC   0x00
 RTC seconds.
#define RTC_MIN   0x02
 RTC minutes.
#define RTC_HOUR   0x04
 RTC hours.
#define RTC_WDAY   0x06
 RTC weekday.
#define RTC_MDAY   0x07
 RTC day of month.
#define RTC_MON   0x08
 RTC month.
#define RTC_YEAR   0x09
 RTC year.
#define RTC_STATUS_A   0x0a
 RTC status register A.
#define RTC_STATUS_A_UPDATE_IN_PROGRESS   0x80
 RTC update in progress bit.
#define RTC_STATUS_B   0x0b
 RTC status register B.
#define RTC_STATUS_B_24_HOUR   0x02
 RTC 24 hour format bit.
#define RTC_STATUS_B_BINARY   0x04
 RTC binary mode bit.
#define RTC_STATUS_B_PIE   0x40
 RTC Periodic Interrupt Enabled bit.
#define RTC_STATUS_C   0x0c
 RTC status register C.
#define RTC_STATUS_D   0x0d
 RTC status register D.
#define CMOS_DEFAULT_ADDRESS   RTC_STATUS_D
 CMOS default address.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)

Detailed Description

CMOS Real-Time Clock (RTC)

The CMOS/RTC registers are documented (with varying degrees of accuracy and consistency) at

http://www.nondot.org/sabre/os/files/MiscHW/RealtimeClockFAQ.txt http://wiki.osdev.org/RTC http://wiki.osdev.org/CMOS

Definition in file rtc.h.


Define Documentation

#define RTC_IRQ   8

RTC IRQ.

Definition at line 21 of file rtc.h.

Referenced by rtc_entropy_disable(), and rtc_entropy_enable().

#define RTC_INT   IRQ_INT ( RTC_IRQ )

RTC interrupt vector.

Definition at line 24 of file rtc.h.

Referenced by rtc_hook_isr(), and rtc_unhook_isr().

#define CMOS_ADDRESS   0x70

CMOS/RTC address (and NMI) register.

Definition at line 27 of file rtc.h.

Referenced by rtc_disable_int(), rtc_enable_int(), rtc_hook_isr(), and rtc_readb().

#define CMOS_DISABLE_NMI   0x80

NMI disable bit.

Definition at line 30 of file rtc.h.

Referenced by rtc_disable_int(), and rtc_enable_int().

#define CMOS_DATA   0x71

CMOS/RTC data register.

Definition at line 33 of file rtc.h.

Referenced by rtc_disable_int(), rtc_enable_int(), rtc_hook_isr(), and rtc_readb().

#define RTC_SEC   0x00

RTC seconds.

Definition at line 36 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_MIN   0x02

RTC minutes.

Definition at line 39 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_HOUR   0x04

RTC hours.

Definition at line 42 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_WDAY   0x06

RTC weekday.

Definition at line 45 of file rtc.h.

#define RTC_MDAY   0x07

RTC day of month.

Definition at line 48 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_MON   0x08

RTC month.

Definition at line 51 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_YEAR   0x09

RTC year.

Definition at line 54 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_STATUS_A   0x0a

RTC status register A.

Definition at line 57 of file rtc.h.

Referenced by rtc_is_busy(), and rtc_read_time().

RTC update in progress bit.

Definition at line 60 of file rtc.h.

Referenced by rtc_is_busy().

#define RTC_STATUS_B   0x0b

RTC status register B.

Definition at line 63 of file rtc.h.

Referenced by rtc_disable_int(), rtc_enable_int(), and rtc_read_time().

#define RTC_STATUS_B_24_HOUR   0x02

RTC 24 hour format bit.

Definition at line 66 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_STATUS_B_BINARY   0x04

RTC binary mode bit.

Definition at line 69 of file rtc.h.

Referenced by rtc_read_time().

#define RTC_STATUS_B_PIE   0x40

RTC Periodic Interrupt Enabled bit.

Definition at line 72 of file rtc.h.

Referenced by rtc_disable_int(), and rtc_enable_int().

#define RTC_STATUS_C   0x0c

RTC status register C.

Definition at line 75 of file rtc.h.

Referenced by rtc_enable_int(), and rtc_hook_isr().

#define RTC_STATUS_D   0x0d

RTC status register D.

Definition at line 78 of file rtc.h.

CMOS default address.

Definition at line 81 of file rtc.h.

Referenced by rtc_disable_int(), and rtc_enable_int().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )