]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Move Ia32PcRtc.c from IA-32 sub-directory and rename to PcRtcEntry.c since IPF is...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 5 Dec 2008 03:17:57 +0000 (03:17 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 5 Dec 2008 03:17:57 +0000 (03:17 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6853 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c [deleted file]
MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c [new file with mode: 0644]
MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf

diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c
deleted file mode 100644 (file)
index ce3fa90..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/** @file\r
-  Provides Set/Get time operations.\r
-\r
-Copyright (c) 2006 - 2008, 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
-#include "PcRtc.h"\r
-\r
-PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
-\r
-EFI_HANDLE             mHandle = NULL;\r
-\r
-\r
-/**\r
-  Returns the current time and date information, and the time-keeping capabilities\r
-  of the hardware platform.\r
-\r
-  @param  Time          A pointer to storage to receive a snapshot of the current time.\r
-  @param  Capabilities  An optional pointer to a buffer to receive the real time\r
-                        clock device's capabilities.\r
-\r
-  @retval EFI_SUCCESS            The operation completed successfully.\r
-  @retval EFI_INVALID_PARAMETER  Time is NULL.\r
-  @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiGetTime (\r
-  OUT EFI_TIME                *Time,\r
-  OUT EFI_TIME_CAPABILITIES   *Capabilities  OPTIONAL\r
-  )\r
-{\r
-  return PcRtcGetTime (Time, Capabilities, &mModuleGlobal);\r
-}\r
-\r
-/**\r
-  Sets the current local time and date information.\r
-\r
-  @param  Time                   A pointer to the current time.\r
-\r
-  @retval EFI_SUCCESS            The operation completed successfully.\r
-  @retval EFI_INVALID_PARAMETER  A time field is out of range.\r
-  @retval EFI_DEVICE_ERROR       The time could not be set due due to hardware error.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetTime (\r
-  IN EFI_TIME                *Time\r
-  )\r
-{\r
-  return PcRtcSetTime (Time, &mModuleGlobal);\r
-}\r
-\r
-/**\r
-  Returns the current wakeup alarm clock setting.\r
-\r
-  @param  Enabled  Indicates if the alarm is currently enabled or disabled.\r
-  @param  Pending  Indicates if the alarm signal is pending and requires acknowledgement.\r
-  @param  Time     The current alarm setting.\r
-\r
-  @retval EFI_SUCCESS           The alarm settings were returned.\r
-  @retval EFI_INVALID_PARAMETER Enabled is NULL.\r
-  @retval EFI_INVALID_PARAMETER Pending is NULL.\r
-  @retval EFI_INVALID_PARAMETER Time is NULL.\r
-  @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.\r
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.\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
-  return PcRtcGetWakeupTime (Enabled, Pending, Time, &mModuleGlobal);\r
-}\r
-\r
-\r
-/**\r
-  Sets the system wakeup alarm clock time.\r
-\r
-  @param  Enabled  Enable or disable the wakeup alarm.\r
-  @param  Time     If Enable is TRUE, the time to set the wakeup alarm for.\r
-                   If Enable is FALSE, then this parameter is optional, and may be NULL.\r
-\r
-  @retval EFI_SUCCESS            If Enable is TRUE, then the wakeup alarm was enabled.\r
-                                 If Enable is FALSE, then the wakeup alarm was disabled.\r
-  @retval EFI_INVALID_PARAMETER  A time field is out of range.\r
-  @retval EFI_DEVICE_ERROR       The wakeup time could not be set due to a hardware error.\r
-  @retval EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-PcRtcEfiSetWakeupTime (\r
-  IN BOOLEAN      Enabled,\r
-  IN EFI_TIME    *Time       OPTIONAL\r
-  )\r
-{\r
-  return PcRtcSetWakeupTime (Enabled, Time, &mModuleGlobal);\r
-}\r
-\r
-/**\r
-  The user Entry Point for PcRTC module.\r
-\r
-  This is the entrhy point for PcRTC module. It installs the UEFI runtime service\r
-  including GetTime(),SetTime(),GetWakeupTime(),and SetWakeupTime().\r
-\r
-  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param  SystemTable    A pointer to the EFI System Table.\r
-\r
-  @retval EFI_SUCCESS    The entry point is executed successfully.\r
-  @retval Others         Some error occurs when executing this entry point.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-InitializePcRtc (\r
-  IN EFI_HANDLE                            ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                      *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_HIGH_LEVEL);\r
-\r
-  Status = PcRtcInit (&mModuleGlobal);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  gRT->GetTime       = PcRtcEfiGetTime;\r
-  gRT->SetTime       = PcRtcEfiSetTime;\r
-  gRT->GetWakeupTime = PcRtcEfiGetWakeupTime;\r
-  gRT->SetWakeupTime = PcRtcEfiSetWakeupTime;\r
-\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &mHandle,\r
-                  &gEfiRealTimeClockArchProtocolGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return Status;\r
-}\r
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
new file mode 100644 (file)
index 0000000..ce3fa90
--- /dev/null
@@ -0,0 +1,158 @@
+/** @file\r
+  Provides Set/Get time operations.\r
+\r
+Copyright (c) 2006 - 2008, 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
+#include "PcRtc.h"\r
+\r
+PC_RTC_MODULE_GLOBALS  mModuleGlobal;\r
+\r
+EFI_HANDLE             mHandle = NULL;\r
+\r
+\r
+/**\r
+  Returns the current time and date information, and the time-keeping capabilities\r
+  of the hardware platform.\r
+\r
+  @param  Time          A pointer to storage to receive a snapshot of the current time.\r
+  @param  Capabilities  An optional pointer to a buffer to receive the real time\r
+                        clock device's capabilities.\r
+\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  Time is NULL.\r
+  @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiGetTime (\r
+  OUT EFI_TIME                *Time,\r
+  OUT EFI_TIME_CAPABILITIES   *Capabilities  OPTIONAL\r
+  )\r
+{\r
+  return PcRtcGetTime (Time, Capabilities, &mModuleGlobal);\r
+}\r
+\r
+/**\r
+  Sets the current local time and date information.\r
+\r
+  @param  Time                   A pointer to the current time.\r
+\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  A time field is out of range.\r
+  @retval EFI_DEVICE_ERROR       The time could not be set due due to hardware error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiSetTime (\r
+  IN EFI_TIME                *Time\r
+  )\r
+{\r
+  return PcRtcSetTime (Time, &mModuleGlobal);\r
+}\r
+\r
+/**\r
+  Returns the current wakeup alarm clock setting.\r
+\r
+  @param  Enabled  Indicates if the alarm is currently enabled or disabled.\r
+  @param  Pending  Indicates if the alarm signal is pending and requires acknowledgement.\r
+  @param  Time     The current alarm setting.\r
+\r
+  @retval EFI_SUCCESS           The alarm settings were returned.\r
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.\r
+  @retval EFI_INVALID_PARAMETER Pending is NULL.\r
+  @retval EFI_INVALID_PARAMETER Time is NULL.\r
+  @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.\r
+  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.\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
+  return PcRtcGetWakeupTime (Enabled, Pending, Time, &mModuleGlobal);\r
+}\r
+\r
+\r
+/**\r
+  Sets the system wakeup alarm clock time.\r
+\r
+  @param  Enabled  Enable or disable the wakeup alarm.\r
+  @param  Time     If Enable is TRUE, the time to set the wakeup alarm for.\r
+                   If Enable is FALSE, then this parameter is optional, and may be NULL.\r
+\r
+  @retval EFI_SUCCESS            If Enable is TRUE, then the wakeup alarm was enabled.\r
+                                 If Enable is FALSE, then the wakeup alarm was disabled.\r
+  @retval EFI_INVALID_PARAMETER  A time field is out of range.\r
+  @retval EFI_DEVICE_ERROR       The wakeup time could not be set due to a hardware error.\r
+  @retval EFI_UNSUPPORTED        A wakeup timer is not supported on this platform.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PcRtcEfiSetWakeupTime (\r
+  IN BOOLEAN      Enabled,\r
+  IN EFI_TIME    *Time       OPTIONAL\r
+  )\r
+{\r
+  return PcRtcSetWakeupTime (Enabled, Time, &mModuleGlobal);\r
+}\r
+\r
+/**\r
+  The user Entry Point for PcRTC module.\r
+\r
+  This is the entrhy point for PcRTC module. It installs the UEFI runtime service\r
+  including GetTime(),SetTime(),GetWakeupTime(),and SetWakeupTime().\r
+\r
+  @param  ImageHandle    The firmware allocated handle for the EFI image.\r
+  @param  SystemTable    A pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS    The entry point is executed successfully.\r
+  @retval Others         Some error occurs when executing this entry point.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializePcRtc (\r
+  IN EFI_HANDLE                            ImageHandle,\r
+  IN EFI_SYSTEM_TABLE                      *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_HIGH_LEVEL);\r
+\r
+  Status = PcRtcInit (&mModuleGlobal);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  gRT->GetTime       = PcRtcEfiGetTime;\r
+  gRT->SetTime       = PcRtcEfiSetTime;\r
+  gRT->GetWakeupTime = PcRtcEfiGetWakeupTime;\r
+  gRT->SetWakeupTime = PcRtcEfiSetWakeupTime;\r
+\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &mHandle,\r
+                  &gEfiRealTimeClockArchProtocolGuid,\r
+                  NULL,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return Status;\r
+}\r
index 93b92479882d398e64f6b83a41a79cb8329c234b..4f69a71916de60d7f566b92fa5417e7033aa6cef 100644 (file)
@@ -30,7 +30,7 @@
 #\r
 \r
 [Sources.common]\r
-  Ia32/Ia32PcRtc.c\r
+  PcRtcEntry.c\r
   PcRtc.c\r
   PcRtc.h\r
 \r