]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update KbcResetDxe to be more generic by layering it on top of the ResetSystemLib...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Aug 2010 05:16:57 +0000 (05:16 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Aug 2010 05:16:57 +0000 (05:16 +0000)
Reduce number of source files from 3 to 1.

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

PcAtChipsetPkg/KbcResetDxe/Reset.c [deleted file]
PcAtChipsetPkg/KbcResetDxe/Reset.h [deleted file]
PcAtChipsetPkg/KbcResetDxe/Reset.inf
PcAtChipsetPkg/KbcResetDxe/ResetEntry.c

diff --git a/PcAtChipsetPkg/KbcResetDxe/Reset.c b/PcAtChipsetPkg/KbcResetDxe/Reset.c
deleted file mode 100644 (file)
index ba74aac..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/** @file\r
-  Reset Architectural Protocol implementation\r
-\r
-Copyright (c) 2006 - 2010, 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
-                                                                                          \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 "Reset.h"\r
-\r
-/**\r
-  Reset the system.\r
-\r
-  @param ResetType       warm or cold\r
-  @param ResetStatus     possible cause of reset\r
-  @param DataSize        Size of ResetData in bytes\r
-  @param ResetData       Optional Unicode string\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-KbcResetSystem (\r
-  IN EFI_RESET_TYPE   ResetType,\r
-  IN EFI_STATUS       ResetStatus,\r
-  IN UINTN            DataSize,\r
-  IN VOID             *ResetData OPTIONAL\r
-  )\r
-{\r
-  UINT8   Data;\r
-\r
-  switch (ResetType) {\r
-  case EfiResetWarm:\r
-  case EfiResetCold:\r
-  case EfiResetShutdown:\r
-    Data = 0xfe;\r
-    IoWrite8 (0x64, Data);\r
-    break;\r
-\r
-  default:\r
-    return ;\r
-  }\r
-\r
-  //\r
-  // Given we should have reset getting here would be bad\r
-  //\r
-  ASSERT (FALSE);\r
-}\r
-\r
diff --git a/PcAtChipsetPkg/KbcResetDxe/Reset.h b/PcAtChipsetPkg/KbcResetDxe/Reset.h
deleted file mode 100644 (file)
index 7ee0aa7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/** @file\r
-\r
-  Definitions for reset\r
-\r
-Copyright (c) 2006 - 2010, 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
-                                                                                          \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
-#ifndef _KBC_RESET_H\r
-#define _KBC_RESET_H\r
-\r
-#include <PiDxe.h>\r
-\r
-#include <Library/IoLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#include <Protocol/Reset.h>\r
-\r
-/**\r
-  Initialize the state information for the Reset Architectural Protocol\r
-\r
-  @param ImageHandle     Handle of the loaded driver \r
-  @param SystemTable     Pointer to the System Table\r
-\r
-  @retval EFI_SUCCESS           Thread can be successfully created\r
-  @retval EFI_OUT_OF_RESOURCES  Cannot allocate protocol data structure\r
-  @retval EFI_DEVICE_ERROR      Cannot create the timer service\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeReset (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-;\r
-\r
-/**\r
-  Reset the system.\r
-\r
-  @param ResetType       warm or cold\r
-  @param ResetStatus     possible cause of reset\r
-  @param DataSize        Size of ResetData in bytes\r
-  @param ResetData       Optional Unicode string\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-KbcResetSystem (\r
-  IN EFI_RESET_TYPE   ResetType,\r
-  IN EFI_STATUS       ResetStatus,\r
-  IN UINTN            DataSize,\r
-  IN VOID             *ResetData OPTIONAL\r
-  )\r
-;\r
-\r
-#endif\r
index 9e7825581d17e31ee315cded2a5e4506e3021a94..15620ae03a74f0178b47e2c4a1a4803997c01cee 100644 (file)
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
 \r
 [LibraryClasses]\r
+  UefiDriverEntryPoint\r
   DebugLib\r
   UefiBootServicesTableLib\r
-  UefiDriverEntryPoint\r
-  IoLib\r
+  ResetSystemLib\r
 \r
 [Sources]\r
-  Reset.c\r
-  Reset.h\r
   ResetEntry.c\r
 \r
 [Protocols]\r
@@ -42,5 +41,3 @@
 \r
 [Depex]\r
   TRUE\r
-\r
-\r
index d43a516c87cb125904941e04c3aac93dbfdf8cbd..0457fe63b541b05dff37c2f24259be78e9da2af2 100644 (file)
@@ -11,13 +11,56 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 **/\r
 \r
-#include "Reset.h"\r
+#include <PiDxe.h>\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/ResetSystemLib.h>\r
+\r
+#include <Protocol/Reset.h>\r
 \r
 //\r
 // The handle onto which the Reset Architectural Protocol is installed\r
 //\r
 EFI_HANDLE  mResetHandle = NULL;\r
 \r
+/**\r
+  Reset the system.\r
+\r
+  @param ResetType       warm or cold\r
+  @param ResetStatus     possible cause of reset\r
+  @param DataSize        Size of ResetData in bytes\r
+  @param ResetData       Optional Unicode string\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+KbcResetSystem (\r
+  IN EFI_RESET_TYPE   ResetType,\r
+  IN EFI_STATUS       ResetStatus,\r
+  IN UINTN            DataSize,\r
+  IN VOID             *ResetData OPTIONAL\r
+  )\r
+{\r
+  switch (ResetType) {\r
+  case EfiResetWarm:\r
+    ResetWarm ();\r
+    break;\r
+  case EfiResetCold:\r
+    ResetCold ();\r
+    break;\r
+  case EfiResetShutdown:\r
+    ResetShutdown ();\r
+    break;\r
+  default:\r
+    return;\r
+  }\r
+\r
+  //\r
+  // Given we should have reset getting here would be bad\r
+  //\r
+  ASSERT (FALSE);\r
+}\r
 \r
 /**\r
   Initialize the state information for the Reset Architectural Protocol\r
@@ -54,8 +97,7 @@ InitializeReset (
   //\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &mResetHandle,\r
-                  &gEfiResetArchProtocolGuid,\r
-                  NULL,\r
+                  &gEfiResetArchProtocolGuid, NULL,\r
                   NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r