OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcRtcLibInternal.h
Go to the documentation of this file.
1
19#ifndef OC_RTC_LIB_INTERNAL_H
20#define OC_RTC_LIB_INTERNAL_H
21
22//
23// Available on all platforms, requires NMI bit handling.
24//
25#define R_PCH_RTC_INDEX 0x70
26#define R_PCH_RTC_TARGET 0x71
27#define R_PCH_RTC_EXT_INDEX 0x72
28#define R_PCH_RTC_EXT_TARGET 0x73
29
30//
31// Available on Ivy Bridge and newer. Ignores NMI bit.
32//
33#define R_PCH_RTC_INDEX_ALT 0x74
34#define R_PCH_RTC_TARGET_ALT 0x75
35#define R_PCH_RTC_EXT_INDEX_ALT 0x76
36#define R_PCH_RTC_EXT_TARGET_ALT 0x77
37
38//
39// RTC Memory bank size
40//
41#define RTC_BANK_SIZE 0x80
42
43//
44// RTC INDEX bit mask
45//
46#define RTC_DATA_MASK 0x7F
47#define RTC_NMI_MASK 0x80
48
49//
50// Standard register addresses.
51//
52#define RTC_ADDRESS_SECONDS 0 // R/W Range 0..59
53#define RTC_ADDRESS_SECONDS_ALARM 1 // R/W Range 0..59
54#define RTC_ADDRESS_MINUTES 2 // R/W Range 0..59
55#define RTC_ADDRESS_MINUTES_ALARM 3 // R/W Range 0..59
56#define RTC_ADDRESS_HOURS 4 // R/W Range 1..12 or 0..23 Bit 7 is AM/PM
57#define RTC_ADDRESS_HOURS_ALARM 5 // R/W Range 1..12 or 0..23 Bit 7 is AM/PM
58#define RTC_ADDRESS_DAY_OF_THE_WEEK 6 // R/W Range 1..7
59#define RTC_ADDRESS_DAY_OF_THE_MONTH 7 // R/W Range 1..31
60#define RTC_ADDRESS_MONTH 8 // R/W Range 1..12
61#define RTC_ADDRESS_YEAR 9 // R/W Range 0..99
62#define RTC_ADDRESS_REGISTER_A 10 // R/W[0..6] R0[7]
63#define RTC_ADDRESS_REGISTER_B 11 // R/W
64#define RTC_ADDRESS_REGISTER_C 12 // RO
65#define RTC_ADDRESS_REGISTER_D 13 // RO
66
67//
68// Register A update in progress bit.
69//
70#define RTC_UPDATE_IN_PROGRESS 0x80U
71
72#endif // OC_RTC_LIB_INTERNAL_H