Changeset 99404 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h
- Timestamp:
- Apr 14, 2023 3:17:44 PM (23 months ago)
- svn:sync-xref-src-repo-rev:
- 156854
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h
r85718 r99404 9 9 **/ 10 10 11 12 11 #ifndef _RTC_H_ 13 12 #define _RTC_H_ 14 15 13 16 14 #include <Uefi.h> … … 34 32 35 33 typedef struct { 36 EFI_LOCK RtcLock;37 INT16 SavedTimeZone;38 UINT8 Daylight;39 UINT8 CenturyRtcAddress;34 EFI_LOCK RtcLock; 35 INT16 SavedTimeZone; 36 UINT8 Daylight; 37 UINT8 CenturyRtcAddress; 40 38 } PC_RTC_MODULE_GLOBALS; 41 39 … … 63 61 // They are used if the RTC values are invalid during driver initialization 64 62 // 65 #define RTC_INIT_SECOND 066 #define RTC_INIT_MINUTE 067 #define RTC_INIT_HOUR 068 #define RTC_INIT_DAY 169 #define RTC_INIT_MONTH 163 #define RTC_INIT_SECOND 0 64 #define RTC_INIT_MINUTE 0 65 #define RTC_INIT_HOUR 0 66 #define RTC_INIT_DAY 1 67 #define RTC_INIT_MONTH 1 70 68 71 69 #pragma pack(1) … … 74 72 // 75 73 typedef struct { 76 UINT8 Rs : 4;// Rate Selection Bits77 UINT8 Dv : 3;// Divisor78 UINT8 Uip : 1;// Update in progress74 UINT8 Rs : 4; // Rate Selection Bits 75 UINT8 Dv : 3; // Divisor 76 UINT8 Uip : 1; // Update in progress 79 77 } RTC_REGISTER_A_BITS; 80 78 81 79 typedef union { 82 RTC_REGISTER_A_BITS Bits;83 UINT8 Data;80 RTC_REGISTER_A_BITS Bits; 81 UINT8 Data; 84 82 } RTC_REGISTER_A; 85 83 … … 88 86 // 89 87 typedef struct { 90 UINT8 Dse : 1;// 0 - Daylight saving disabled 1 - Daylight savings enabled91 UINT8 Mil : 1;// 0 - 12 hour mode 1 - 24 hour mode92 UINT8 Dm : 1;// 0 - BCD Format 1 - Binary Format93 UINT8 Sqwe : 1; // 0 - Disable SQWE output 1 - Enable SQWE output94 UINT8 Uie : 1;// 0 - Update INT disabled 1 - Update INT enabled95 UINT8 Aie : 1;// 0 - Alarm INT disabled 1 - Alarm INT Enabled96 UINT8 Pie : 1;// 0 - Periodic INT disabled 1 - Periodic INT Enabled97 UINT8 Set : 1;// 0 - Normal operation. 1 - Updates inhibited88 UINT8 Dse : 1; // 0 - Daylight saving disabled 1 - Daylight savings enabled 89 UINT8 Mil : 1; // 0 - 12 hour mode 1 - 24 hour mode 90 UINT8 Dm : 1; // 0 - BCD Format 1 - Binary Format 91 UINT8 Sqwe : 1; // 0 - Disable SQWE output 1 - Enable SQWE output 92 UINT8 Uie : 1; // 0 - Update INT disabled 1 - Update INT enabled 93 UINT8 Aie : 1; // 0 - Alarm INT disabled 1 - Alarm INT Enabled 94 UINT8 Pie : 1; // 0 - Periodic INT disabled 1 - Periodic INT Enabled 95 UINT8 Set : 1; // 0 - Normal operation. 1 - Updates inhibited 98 96 } RTC_REGISTER_B_BITS; 99 97 100 98 typedef union { 101 RTC_REGISTER_B_BITS Bits;102 UINT8 Data;99 RTC_REGISTER_B_BITS Bits; 100 UINT8 Data; 103 101 } RTC_REGISTER_B; 104 102 … … 107 105 // 108 106 typedef struct { 109 UINT8 Reserved : 4; // Read as zero. Can not be written.110 UINT8 Uf : 1;// Update End Interrupt Flag111 UINT8 Af : 1;// Alarm Interrupt Flag112 UINT8 Pf : 1;// Periodic Interrupt Flag113 UINT8 Irqf : 1;// Interrupt Request Flag = PF & PIE | AF & AIE | UF & UIE107 UINT8 Reserved : 4; // Read as zero. Can not be written. 108 UINT8 Uf : 1; // Update End Interrupt Flag 109 UINT8 Af : 1; // Alarm Interrupt Flag 110 UINT8 Pf : 1; // Periodic Interrupt Flag 111 UINT8 Irqf : 1; // Interrupt Request Flag = PF & PIE | AF & AIE | UF & UIE 114 112 } RTC_REGISTER_C_BITS; 115 113 116 114 typedef union { 117 RTC_REGISTER_C_BITS Bits;118 UINT8 Data;115 RTC_REGISTER_C_BITS Bits; 116 UINT8 Data; 119 117 } RTC_REGISTER_C; 120 118 … … 123 121 // 124 122 typedef struct { 125 UINT8 Reserved : 7; // Read as zero. Can not be written.126 UINT8 Vrt : 1;// Valid RAM and Time123 UINT8 Reserved : 7; // Read as zero. Can not be written. 124 UINT8 Vrt : 1; // Valid RAM and Time 127 125 } RTC_REGISTER_D_BITS; 128 126 129 127 typedef union { 130 RTC_REGISTER_D_BITS Bits;131 UINT8 Data;128 RTC_REGISTER_D_BITS Bits; 129 UINT8 Data; 132 130 } RTC_REGISTER_D; 133 131 … … 181 179 EFI_STATUS 182 180 PcRtcGetTime ( 183 OUT EFI_TIME *Time,184 OUT EFI_TIME_CAPABILITIES *Capabilities, OPTIONAL185 IN PC_RTC_MODULE_GLOBALS *Global181 OUT EFI_TIME *Time, 182 OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL, 183 IN PC_RTC_MODULE_GLOBALS *Global 186 184 ); 187 185 … … 204 202 PcRtcSetWakeupTime ( 205 203 IN BOOLEAN Enable, 206 IN EFI_TIME *Time , OPTIONAL204 IN EFI_TIME *Time OPTIONAL, 207 205 IN PC_RTC_MODULE_GLOBALS *Global 208 206 ); … … 226 224 EFI_STATUS 227 225 PcRtcGetWakeupTime ( 228 OUT BOOLEAN *Enabled,229 OUT BOOLEAN *Pending,230 OUT EFI_TIME *Time,231 IN PC_RTC_MODULE_GLOBALS *Global226 OUT BOOLEAN *Enabled, 227 OUT BOOLEAN *Pending, 228 OUT EFI_TIME *Time, 229 IN PC_RTC_MODULE_GLOBALS *Global 232 230 ); 233 231 … … 248 246 EFIAPI 249 247 InitializePcRtc ( 250 IN EFI_HANDLE 251 IN EFI_SYSTEM_TABLE 248 IN EFI_HANDLE ImageHandle, 249 IN EFI_SYSTEM_TABLE *SystemTable 252 250 ); 253 251 … … 263 261 EFI_STATUS 264 262 RtcTimeFieldsValid ( 265 IN EFI_TIME *Time263 IN EFI_TIME *Time 266 264 ); 267 265 … … 283 281 ); 284 282 285 286 283 /** 287 284 Converts time read from RTC to EFI_TIME format defined by UEFI spec. … … 317 314 EFI_STATUS 318 315 RtcWaitToUpdate ( 319 UINTN Timeout316 UINTN Timeout 320 317 ); 321 318 … … 343 340 BOOLEAN 344 341 IsLeapYear ( 345 IN EFI_TIME 342 IN EFI_TIME *Time 346 343 ); 347 344 … … 369 366 EFIAPI 370 367 PcRtcAcpiTableChangeCallback ( 371 IN EFI_EVENT Event, 372 IN VOID *Context 373 ); 368 IN EFI_EVENT Event, 369 IN VOID *Context 370 ); 371 374 372 #endif
Note:
See TracChangeset
for help on using the changeset viewer.