]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h
ArmVirtPkg: HighMemDxe: add memory space for the high memory nodes
[mirror_edk2.git] / PcAtChipsetPkg / PcatRealTimeClockRuntimeDxe / PcRtc.h
index 90cfa396345f2d2c66d5a6041659ecb03feab43d..026c1086b2fe826522c7017a0973e0c180d3d373 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Header file for real time clock driver.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiRuntimeLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/PcdLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
 \r
 \r
 typedef struct {\r
@@ -60,7 +61,6 @@ typedef struct {
 #define RTC_ADDRESS_REGISTER_B        11  // R/W\r
 #define RTC_ADDRESS_REGISTER_C        12  // RO\r
 #define RTC_ADDRESS_REGISTER_D        13  // RO\r
-#define RTC_ADDRESS_CENTURY           50  // R/W  Range 19..20 Bit 8 is R/W\r
 //\r
 // Date and time initial values.\r
 // They are used if the RTC values are invalid during driver initialization\r
@@ -70,7 +70,6 @@ typedef struct {
 #define RTC_INIT_HOUR   0\r
 #define RTC_INIT_DAY    1\r
 #define RTC_INIT_MONTH  1\r
-#define RTC_INIT_YEAR   2001\r
 \r
 //\r
 // Register initial values\r
@@ -84,9 +83,9 @@ typedef struct {
 // Register A\r
 //\r
 typedef struct {\r
-  UINT8 RS : 4;   // Rate Selection Bits\r
-  UINT8 DV : 3;   // Divisor\r
-  UINT8 UIP : 1;  // Update in progress\r
+  UINT8 Rs : 4;   // Rate Selection Bits\r
+  UINT8 Dv : 3;   // Divisor\r
+  UINT8 Uip : 1;  // Update in progress\r
 } RTC_REGISTER_A_BITS;\r
 \r
 typedef union {\r
@@ -98,14 +97,14 @@ typedef union {
 // Register B\r
 //\r
 typedef struct {\r
-  UINT8 DSE : 1;  // 0 - Daylight saving disabled  1 - Daylight savings enabled\r
-  UINT8 MIL : 1;  // 0 - 12 hour mode              1 - 24 hour mode\r
-  UINT8 DM : 1;   // 0 - BCD Format                1 - Binary Format\r
-  UINT8 SQWE : 1; // 0 - Disable SQWE output       1 - Enable SQWE output\r
-  UINT8 UIE : 1;  // 0 - Update INT disabled       1 - Update INT enabled\r
-  UINT8 AIE : 1;  // 0 - Alarm INT disabled        1 - Alarm INT Enabled\r
-  UINT8 PIE : 1;  // 0 - Periodic INT disabled     1 - Periodic INT Enabled\r
-  UINT8 SET : 1;  // 0 - Normal operation.         1 - Updates inhibited\r
+  UINT8 Dse : 1;  // 0 - Daylight saving disabled  1 - Daylight savings enabled\r
+  UINT8 Mil : 1;  // 0 - 12 hour mode              1 - 24 hour mode\r
+  UINT8 Dm : 1;   // 0 - BCD Format                1 - Binary Format\r
+  UINT8 Sqwe : 1; // 0 - Disable SQWE output       1 - Enable SQWE output\r
+  UINT8 Uie : 1;  // 0 - Update INT disabled       1 - Update INT enabled\r
+  UINT8 Aie : 1;  // 0 - Alarm INT disabled        1 - Alarm INT Enabled\r
+  UINT8 Pie : 1;  // 0 - Periodic INT disabled     1 - Periodic INT Enabled\r
+  UINT8 Set : 1;  // 0 - Normal operation.         1 - Updates inhibited\r
 } RTC_REGISTER_B_BITS;\r
 \r
 typedef union {\r
@@ -118,10 +117,10 @@ typedef union {
 //\r
 typedef struct {\r
   UINT8 Reserved : 4; // Read as zero.  Can not be written.\r
-  UINT8 UF : 1;       // Update End Interrupt Flag\r
-  UINT8 AF : 1;       // Alarm Interrupt Flag\r
-  UINT8 PF : 1;       // Periodic Interrupt Flag\r
-  UINT8 IRQF : 1;     // Iterrupt Request Flag = PF & PIE | AF & AIE | UF & UIE\r
+  UINT8 Uf : 1;       // Update End Interrupt Flag\r
+  UINT8 Af : 1;       // Alarm Interrupt Flag\r
+  UINT8 Pf : 1;       // Periodic Interrupt Flag\r
+  UINT8 Irqf : 1;     // Iterrupt Request Flag = PF & PIE | AF & AIE | UF & UIE\r
 } RTC_REGISTER_C_BITS;\r
 \r
 typedef union {\r
@@ -134,7 +133,7 @@ typedef union {
 //\r
 typedef struct {\r
   UINT8 Reserved : 7; // Read as zero.  Can not be written.\r
-  UINT8 VRT : 1;      // Valid RAM and Time\r
+  UINT8 Vrt : 1;      // Valid RAM and Time\r
 } RTC_REGISTER_D_BITS;\r
 \r
 typedef union {\r
@@ -286,14 +285,11 @@ RtcTimeFieldsValid (
   @param   Time       On input, the time data read from UEFI to convert\r
                       On output, the time converted to RTC format\r
   @param   RegisterB  Value of Register B of RTC, indicating data mode\r
-  @param   Century    It is set according to EFI_TIME Time.\r
-\r
 **/\r
 VOID\r
 ConvertEfiTimeToRtcTime (\r
   IN OUT EFI_TIME        *Time,\r
-  IN     RTC_REGISTER_B  RegisterB,\r
-  OUT    UINT8           *Century\r
+  IN     RTC_REGISTER_B  RegisterB\r
   );\r
 \r
 \r
@@ -307,7 +303,6 @@ ConvertEfiTimeToRtcTime (
 \r
   @param   Time       On input, the time data read from RTC to convert\r
                       On output, the time converted to UEFI format\r
-  @param   Century    Value of century read from RTC.\r
   @param   RegisterB  Value of Register B of RTC, indicating data mode\r
                       and hour format.\r
 \r
@@ -318,7 +313,6 @@ ConvertEfiTimeToRtcTime (
 EFI_STATUS\r
 ConvertRtcTimeToEfiTime (\r
   IN OUT EFI_TIME        *Time,\r
-  IN     UINT8           Century,\r
   IN     RTC_REGISTER_B  RegisterB\r
   );\r
 \r