]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up PcRtc:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Feb 2009 00:58:26 +0000 (00:58 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Feb 2009 00:58:26 +0000 (00:58 +0000)
1. Remove the architecture subdirectory (IPF architecture is not supported any more
2. Merge IA32 source with x64 source to ResetEntry.c in the upper level directory)
3. Pass CYGWIN GCC tool chain.
4. Remove the used DXS file

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7412 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/PcRtc/Ia32/RealTimeClock.c [deleted file]
DuetPkg/PcRtc/Ia32RealTimeClock.dxs [deleted file]
DuetPkg/PcRtc/Ipf/IpfPcRtc.c [deleted file]
DuetPkg/PcRtc/IpfRealTimeClock.dxs [deleted file]
DuetPkg/PcRtc/RealTimeClock.c
DuetPkg/PcRtc/RealTimeClock.inf
DuetPkg/PcRtc/RealTimeClockEntry.c [new file with mode: 0644]
DuetPkg/PcRtc/X64/RealTimeClock.c [deleted file]
DuetPkg/PcRtc/X64RealTimeClock.dxs [deleted file]

diff --git a/DuetPkg/PcRtc/Ia32/RealTimeClock.c b/DuetPkg/PcRtc/Ia32/RealTimeClock.c
deleted file mode 100644 (file)
index 0a43ab6..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  Ia32PcRtc.c\r
-\r
-Abstract:\r
-\r
---*/\r
-#include "RealTimeClock.h"\r
-\r
-PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiGetTime (\r
-  OUT EFI_TIME                *Time,\r
-  OUT  EFI_TIME_CAPABILITIES  *Capabilities\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Time          - TODO: add argument description\r
-  Capabilities  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcGetTime (Time, Capabilities, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetTime (\r
-  IN EFI_TIME                *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Time  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcSetTime (Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiGetWakeupTime (\r
-  OUT BOOLEAN     *Enabled,\r
-  OUT BOOLEAN     *Pending,\r
-  OUT EFI_TIME    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Enabled - TODO: add argument description\r
-  Pending - TODO: add argument description\r
-  Time    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcGetWakeupTime (Enabled, Pending, Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetWakeupTime (\r
-  IN BOOLEAN      Enabled,\r
-  OUT EFI_TIME    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Enabled - TODO: add argument description\r
-  Time    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcSetWakeupTime (Enabled, Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeRealTimeClock (\r
-  IN EFI_HANDLE                            ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                      *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Arguments:\r
-\r
-  \r
-\r
-Returns: \r
---*/\r
-// TODO:    ImageHandle - add argument and description to function comment\r
-// TODO:    SystemTable - add argument and description to function comment\r
-{\r
-  EFI_STATUS  Status;\r
-  EFI_HANDLE  NewHandle;\r
-\r
-\r
-  EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_HIGH_LEVEL);\r
-\r
-  Status = PcRtcInit (&mModuleGlobal);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  SystemTable->RuntimeServices->GetTime       = PcRtcEfiGetTime;\r
-  SystemTable->RuntimeServices->SetTime       = PcRtcEfiSetTime;\r
-  SystemTable->RuntimeServices->GetWakeupTime = PcRtcEfiGetWakeupTime;\r
-  SystemTable->RuntimeServices->SetWakeupTime = PcRtcEfiSetWakeupTime;\r
-\r
-  NewHandle = NULL;\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &NewHandle,\r
-                  &gEfiRealTimeClockArchProtocolGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-\r
-  return Status;\r
-}\r
diff --git a/DuetPkg/PcRtc/Ia32RealTimeClock.dxs b/DuetPkg/PcRtc/Ia32RealTimeClock.dxs
deleted file mode 100644 (file)
index ff9f52f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  Ia32PcRtc.dxs\r
-\r
-Abstract:\r
-  Dependency expression source file.\r
-  \r
---*/  \r
-\r
-\r
-#include "EfiDepex.h"\r
-\r
-#include EFI_ARCH_PROTOCOL_DEFINITION (Cpu)\r
-#include EFI_ARCH_PROTOCOL_DEFINITION (Metronome)\r
-#include EFI_PROTOCOL_DEFINITION (CpuIo)\r
-\r
-DEPENDENCY_START\r
-  EFI_CPU_ARCH_PROTOCOL_GUID AND EFI_METRONOME_ARCH_PROTOCOL_GUID AND EFI_CPU_IO_PROTOCOL_GUID \r
-DEPENDENCY_END\r
diff --git a/DuetPkg/PcRtc/Ipf/IpfPcRtc.c b/DuetPkg/PcRtc/Ipf/IpfPcRtc.c
deleted file mode 100644 (file)
index 7b40643..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  IpfPcRtc.c\r
-\r
-Abstract:\r
-  Register the extended SAL infrastructure.\r
-\r
-  Make the EFI RT APIs call extended SAL calls via the RT lib wrappers.\r
-  We can not do this on IA-32 as RT lib wrappers call via rRT.\r
-\r
---*/\r
-\r
-#include "RealTimeClock.h"\r
-\r
-//\r
-// Don't use directly after virtual address have been registered.\r
-//\r
-PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
-\r
-SAL_RETURN_REGS\r
-PcRtcEsalServicesClassCommonEntry (\r
-  IN  UINT64                                      FunctionId,\r
-  IN  UINT64                                      Arg2,\r
-  IN  UINT64                                      Arg3,\r
-  IN  UINT64                                      Arg4,\r
-  IN  UINT64                                      Arg5,\r
-  IN  UINT64                                      Arg6,\r
-  IN  UINT64                                      Arg7,\r
-  IN  UINT64                                      Arg8,\r
-  IN  SAL_EXTENDED_SAL_PROC                       ExtendedSalProc,\r
-  IN  BOOLEAN                                     VirtualMode,\r
-  IN  PC_RTC_MODULE_GLOBALS                       *Global\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Main entry for Extended SAL Reset Services\r
-\r
-Arguments:\r
-\r
-  FunctionId    Function Id which needed to be called.\r
-  Arg2          EFI_RESET_TYPE, whether WARM of COLD reset\r
-  Arg3          Last EFI_STATUS \r
-  Arg4          Data Size of UNICODE STRING passed in ARG5\r
-  Arg5          Unicode String which CHAR16*\r
-\r
-Returns:\r
-\r
-  SAL_RETURN_REGS\r
-\r
---*/\r
-// TODO:    Arg6 - add argument and description to function comment\r
-// TODO:    Arg7 - add argument and description to function comment\r
-// TODO:    Arg8 - add argument and description to function comment\r
-// TODO:    ExtendedSalProc - add argument and description to function comment\r
-// TODO:    VirtualMode - add argument and description to function comment\r
-// TODO:    Global - add argument and description to function comment\r
-{\r
-  EFI_STATUS      EfiStatus;\r
-  SAL_RETURN_REGS ReturnVal;\r
-\r
-  switch (FunctionId) {\r
-  case GetTime:\r
-    EfiStatus = PcRtcGetTime ((EFI_TIME *) Arg2, (EFI_TIME_CAPABILITIES *) Arg3, Global);\r
-    break;\r
-\r
-  case SetTime:\r
-    EfiStatus = PcRtcSetTime ((EFI_TIME *) Arg2, Global);\r
-    break;\r
-\r
-  case GetWakeupTime:\r
-    EfiStatus = PcRtcGetWakeupTime ((BOOLEAN *) Arg2, (BOOLEAN *) Arg3, (EFI_TIME *) Arg4, Global);\r
-    break;\r
-\r
-  case SetWakeupTime:\r
-    EfiStatus = PcRtcSetWakeupTime ((BOOLEAN) Arg2, (EFI_TIME *) Arg3, Global);\r
-    break;\r
-\r
-  case InitializeThreshold:\r
-    EfiStatus = EFI_SAL_NOT_IMPLEMENTED;\r
-    break;\r
-\r
-  case BumpThresholdCount:\r
-    EfiStatus = EFI_SAL_NOT_IMPLEMENTED;\r
-    break;\r
-\r
-  case GetThresholdCount:\r
-    EfiStatus = EFI_SAL_NOT_IMPLEMENTED;\r
-    break;\r
-\r
-  case GetRtcFreq:\r
-    EfiStatus = EFI_SAL_NOT_IMPLEMENTED;\r
-    break;\r
-\r
-  default:\r
-    EfiStatus = EFI_SAL_INVALID_ARGUMENT;\r
-    break;;\r
-  }\r
-\r
-  ReturnVal.Status = EfiStatus;\r
-  return ReturnVal;\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializePcRtc (\r
-  IN EFI_HANDLE                            ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                      *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Arguments:\r
-\r
-  \r
-\r
-Returns: \r
---*/\r
-// TODO:    ImageHandle - add argument and description to function comment\r
-// TODO:    SystemTable - add argument and description to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
-{\r
-  EFI_TIME              Time;\r
-  EFI_TIME_CAPABILITIES Capabilities;\r
-  EFI_STATUS            EfiStatus;\r
-\r
-  EfiInitializeRuntimeDriverLib (ImageHandle, SystemTable, NULL);\r
-\r
-  EfiInitializeLock (&mModuleGlobal.RtcLock, EFI_TPL_HIGH_LEVEL);\r
-\r
-  EfiStatus = PcRtcInit (&mModuleGlobal);\r
-  if (EFI_ERROR (EfiStatus)) {\r
-    return EfiStatus;\r
-  }\r
-\r
-  RegisterEsalClass (\r
-    &gEfiExtendedSalRtcServicesProtocolGuid,\r
-    &mModuleGlobal,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    GetTime,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    SetTime,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    GetWakeupTime,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    SetWakeupTime,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    GetRtcFreq,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    InitializeThreshold,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    BumpThresholdCount,\r
-    PcRtcEsalServicesClassCommonEntry,\r
-    GetThresholdCount,\r
-    NULL\r
-    );\r
-  //\r
-  //  the following code is to initialize the RTC fields in case the values read\r
-  //  back from CMOS are invalid at the first time.\r
-  //\r
-  EfiStatus = PcRtcGetTime (&Time, &Capabilities, &mModuleGlobal);\r
-  if (EFI_ERROR (EfiStatus)) {\r
-    Time.Second = RTC_INIT_SECOND;\r
-    Time.Minute = RTC_INIT_MINUTE;\r
-    Time.Hour   = RTC_INIT_HOUR;\r
-    Time.Day    = RTC_INIT_DAY;\r
-    Time.Month  = RTC_INIT_MONTH;\r
-    Time.Year   = RTC_INIT_YEAR;\r
-    PcRtcSetTime (&Time, &mModuleGlobal);\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/DuetPkg/PcRtc/IpfRealTimeClock.dxs b/DuetPkg/PcRtc/IpfRealTimeClock.dxs
deleted file mode 100644 (file)
index 4d05b4f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  IpfPcRtc.dxs\r
-\r
-Abstract:\r
-  Dependency expression source file.\r
-  \r
---*/  \r
-\r
-\r
-#include "EfiDepex.h"\r
-\r
-#include EFI_PROTOCOL_DEFINITION (ExtendedSalGuid)\r
-#include EFI_ARCH_PROTOCOL_DEFINITION (Metronome)\r
-\r
-DEPENDENCY_START\r
-  EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID AND EFI_METRONOME_ARCH_PROTOCOL_GUID\r
-DEPENDENCY_END\r
index d3c5f31c4d7b219d8e01452c13f523aa541ef66c..6666d48a377abb2f7cbd11232790267e1c9ceb16 100644 (file)
@@ -41,6 +41,8 @@ CompareHMS (
   IN EFI_TIME   *From,\r
   IN EFI_TIME   *To\r
   );\r
+\r
+INTN  mDayOfMonth[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r
     \r
 UINT8\r
 RtcRead (\r
@@ -873,10 +875,9 @@ Returns:
 --*/\r
 {\r
 \r
-  INTN  DayOfMonth[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\r
 \r
   if (Time->Day < 1 ||\r
-      Time->Day > DayOfMonth[Time->Month - 1] ||\r
+      Time->Day > mDayOfMonth[Time->Month - 1] ||\r
       (Time->Month == 2 && (!IsLeapYear (Time) && Time->Day > 28))\r
       ) {\r
     return FALSE;\r
@@ -1002,7 +1003,6 @@ Returns:
 \r
 --*/\r
 {\r
-  UINT8   DayOfMonth[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r
   BOOLEAN Adjacent = FALSE;\r
 \r
   if (From->Year == To->Year) {\r
@@ -1023,7 +1023,7 @@ Returns:
             Adjacent = TRUE;\r
           }  \r
         }\r
-      } else if (From->Day == DayOfMonth[From->Month - 1]) {\r
+      } else if (From->Day == mDayOfMonth[From->Month - 1]) {\r
         if ((CompareHMS(From, To) >= 0)) {\r
            Adjacent = TRUE;\r
         }\r
index d02ae7642c592c32ea6580bc2b8b7ca8d8710352..e854f1c8cf4d756f74234c846768c6342961ea9e 100644 (file)
 [Sources.common]\r
   RealTimeClock.c\r
   RealTimeClock.h\r
+  RealTimeClockEntry.c\r
 \r
-[Sources.ia32]\r
-  Ia32/RealTimeClock.c\r
-\r
-[Sources.x64]\r
-  X64/RealTimeClock.c\r
-\r
-[Sources.ipf]\r
-  Ipf/RealTimeClock.c\r
 \r
 [Protocols]\r
   gEfiCpuArchProtocolGuid\r
diff --git a/DuetPkg/PcRtc/RealTimeClockEntry.c b/DuetPkg/PcRtc/RealTimeClockEntry.c
new file mode 100644 (file)
index 0000000..7c53548
--- /dev/null
@@ -0,0 +1,166 @@
+/*++\r
+\r
+Copyright (c) 2009, Intel Corporation                                                         \r
+All rights reserved. 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
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+\r
+--*/\r
+\r
+#include "RealTimeClock.h"\r
+\r
+PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiGetTime (\r
+  OUT EFI_TIME                *Time,\r
+  OUT  EFI_TIME_CAPABILITIES  *Capabilities\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  Time          - TODO: add argument description\r
+  Capabilities  - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\r
+{\r
+  return PcRtcGetTime (Time, Capabilities, &mModuleGlobal);\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiSetTime (\r
+  IN EFI_TIME                *Time\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  Time  - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\r
+{\r
+  return PcRtcSetTime (Time, &mModuleGlobal);\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiGetWakeupTime (\r
+  OUT BOOLEAN     *Enabled,\r
+  OUT BOOLEAN     *Pending,\r
+  OUT EFI_TIME    *Time\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  Enabled - TODO: add argument description\r
+  Pending - TODO: add argument description\r
+  Time    - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\r
+{\r
+  return PcRtcGetWakeupTime (Enabled, Pending, Time, &mModuleGlobal);\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiSetWakeupTime (\r
+  IN BOOLEAN      Enabled,\r
+  OUT EFI_TIME    *Time\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  Enabled - TODO: add argument description\r
+  Time    - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\r
+{\r
+  return PcRtcSetWakeupTime (Enabled, Time, &mModuleGlobal);\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeRealTimeClock (\r
+  IN EFI_HANDLE                            ImageHandle,\r
+  IN EFI_SYSTEM_TABLE                      *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Arguments:\r
+\r
+  \r
+\r
+Returns: \r
+--*/\r
+// TODO:    ImageHandle - add argument and description to function comment\r
+// TODO:    SystemTable - add argument and description to function comment\r
+{\r
+  EFI_STATUS  Status;\r
+  EFI_HANDLE  NewHandle;\r
+\r
+  EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_HIGH_LEVEL);\r
+\r
+  Status = PcRtcInit (&mModuleGlobal);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  SystemTable->RuntimeServices->GetTime       = PcRtcEfiGetTime;\r
+  SystemTable->RuntimeServices->SetTime       = PcRtcEfiSetTime;\r
+  SystemTable->RuntimeServices->GetWakeupTime = PcRtcEfiGetWakeupTime;\r
+  SystemTable->RuntimeServices->SetWakeupTime = PcRtcEfiSetWakeupTime;\r
+\r
+  NewHandle = NULL;\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &NewHandle,\r
+                  &gEfiRealTimeClockArchProtocolGuid,\r
+                  NULL,\r
+                  NULL\r
+                  );\r
+\r
+  return Status;\r
+}\r
diff --git a/DuetPkg/PcRtc/X64/RealTimeClock.c b/DuetPkg/PcRtc/X64/RealTimeClock.c
deleted file mode 100644 (file)
index 63abe0b..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  x64PcRtc.c\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-#include "RealTimeClock.h"\r
-\r
-PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiGetTime (\r
-  OUT EFI_TIME                *Time,\r
-  OUT  EFI_TIME_CAPABILITIES  *Capabilities\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Time          - TODO: add argument description\r
-  Capabilities  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcGetTime (Time, Capabilities, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetTime (\r
-  IN EFI_TIME                *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Time  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcSetTime (Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiGetWakeupTime (\r
-  OUT BOOLEAN     *Enabled,\r
-  OUT BOOLEAN     *Pending,\r
-  OUT EFI_TIME    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Enabled - TODO: add argument description\r
-  Pending - TODO: add argument description\r
-  Time    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcGetWakeupTime (Enabled, Pending, Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetWakeupTime (\r
-  IN BOOLEAN      Enabled,\r
-  OUT EFI_TIME    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Enabled - TODO: add argument description\r
-  Time    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-{\r
-  return PcRtcSetWakeupTime (Enabled, Time, &mModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeRealTimeClock (\r
-  IN EFI_HANDLE                            ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                      *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Arguments:\r
-\r
-  \r
-\r
-Returns: \r
---*/\r
-// TODO:    ImageHandle - add argument and description to function comment\r
-// TODO:    SystemTable - add argument and description to function comment\r
-{\r
-  EFI_STATUS  Status;\r
-  EFI_HANDLE  NewHandle;\r
-\r
-  EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_HIGH_LEVEL);\r
-\r
-  Status = PcRtcInit (&mModuleGlobal);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  SystemTable->RuntimeServices->GetTime       = PcRtcEfiGetTime;\r
-  SystemTable->RuntimeServices->SetTime       = PcRtcEfiSetTime;\r
-  SystemTable->RuntimeServices->GetWakeupTime = PcRtcEfiGetWakeupTime;\r
-  SystemTable->RuntimeServices->SetWakeupTime = PcRtcEfiSetWakeupTime;\r
-\r
-  NewHandle = NULL;\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &NewHandle,\r
-                  &gEfiRealTimeClockArchProtocolGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-\r
-  return Status;\r
-}\r
diff --git a/DuetPkg/PcRtc/X64RealTimeClock.dxs b/DuetPkg/PcRtc/X64RealTimeClock.dxs
deleted file mode 100644 (file)
index 3497da0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2005, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  x64PcRtc.dxs\r
-\r
-Abstract:\r
-  Dependency expression source file.\r
-  \r
---*/  \r
-\r
-\r
-#include "EfiDepex.h"\r
-\r
-#include EFI_ARCH_PROTOCOL_DEFINITION (Cpu)\r
-#include EFI_ARCH_PROTOCOL_DEFINITION (Metronome)\r
-#include EFI_PROTOCOL_DEFINITION (CpuIo)\r
-\r
-DEPENDENCY_START\r
-  EFI_CPU_ARCH_PROTOCOL_GUID AND EFI_METRONOME_ARCH_PROTOCOL_GUID AND EFI_CPU_IO_PROTOCOL_GUID \r
-DEPENDENCY_END\r