]> git.proxmox.com Git - mirror_edk2.git/commitdiff
KbcResetDxe: DuetPkg => PcAtChipsetPkg
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 22:32:16 +0000 (22:32 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 22:32:16 +0000 (22:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7615 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/KbcResetDxe/Reset.c [deleted file]
DuetPkg/KbcResetDxe/Reset.h [deleted file]
DuetPkg/KbcResetDxe/Reset.inf [deleted file]
DuetPkg/KbcResetDxe/ResetEntry.c [deleted file]
PcAtChipsetPkg/KbcResetDxe/Reset.c [new file with mode: 0644]
PcAtChipsetPkg/KbcResetDxe/Reset.h [new file with mode: 0644]
PcAtChipsetPkg/KbcResetDxe/Reset.inf [new file with mode: 0644]
PcAtChipsetPkg/KbcResetDxe/ResetEntry.c [new file with mode: 0644]

diff --git a/DuetPkg/KbcResetDxe/Reset.c b/DuetPkg/KbcResetDxe/Reset.c
deleted file mode 100644 (file)
index 45f4bc7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, 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
-  Reset.c\r
-\r
-Abstract:\r
-\r
-  Reset Architectural Protocol implementation\r
-\r
---*/\r
-\r
-#include "Reset.h"\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
-Routine Description:\r
-\r
-  Reset the system.\r
-\r
-Arguments:\r
-  \r
-    ResetType - warm or cold\r
-    ResetStatus - possible cause of reset\r
-    DataSize - Size of ResetData in bytes\r
-    ResetData - Optional Unicode string\r
-    For details, see efiapi.h\r
-\r
-Returns:\r
-  Does not return if the reset takes place.\r
-  EFI_INVALID_PARAMETER   If ResetType is invalid.\r
-\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/DuetPkg/KbcResetDxe/Reset.h b/DuetPkg/KbcResetDxe/Reset.h
deleted file mode 100644 (file)
index 3b70580..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, 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
-  Reset.h\r
-\r
-Abstract:\r
-\r
-  some definitions for reset\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
-EFI_STATUS\r
-EFIAPI\r
-InitializeReset (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  ImageHandle - TODO: add argument description\r
-  SystemTable - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\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
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  ResetType   - TODO: add argument description\r
-  ResetStatus - TODO: add argument description\r
-  DataSize    - TODO: add argument description\r
-  ResetData   - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-;\r
-\r
-#endif\r
diff --git a/DuetPkg/KbcResetDxe/Reset.inf b/DuetPkg/KbcResetDxe/Reset.inf
deleted file mode 100644 (file)
index a1bcaeb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#/*++\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
-#  Module Name:\r
-#    Reset.inf\r
-#\r
-#  Abstract:\r
-#\r
-#--*/\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = KbcReset\r
-  FILE_GUID                      = 6F0198AA-1F1D-426D-AE3E-39AB633FCC28\r
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x00020000\r
-\r
-  ENTRY_POINT                    = InitializeReset\r
-\r
-[Packages]\r
-  DuetPkg/DuetPkg.dec\r
-  MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-[LibraryClasses]\r
-  DebugLib\r
-  UefiBootServicesTableLib\r
-  UefiDriverEntryPoint\r
-  IoLib\r
-\r
-[Sources.common]\r
-  Reset.c\r
-  Reset.h\r
-  ResetEntry.c\r
-\r
-[Protocols]\r
-  gEfiResetArchProtocolGuid\r
-\r
-[Depex]\r
-  gEfiCpuIoProtocolGuid\r
-\r
-\r
diff --git a/DuetPkg/KbcResetDxe/ResetEntry.c b/DuetPkg/KbcResetDxe/ResetEntry.c
deleted file mode 100644 (file)
index bcef440..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*++\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
-\r
-#include "Reset.h"\r
-\r
-//\r
-// The handle onto which the Reset Architectural Protocol is installed\r
-//\r
-EFI_HANDLE  mResetHandle = NULL;\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-InitializeReset (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the state information for the Reset Architectural Protocol\r
-\r
-Arguments:\r
-\r
-  ImageHandle of the loaded driver\r
-  Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  EFI_SUCCESS           - thread can be successfully created\r
-  EFI_OUT_OF_RESOURCES  - cannot allocate protocol data structure\r
-  EFI_DEVICE_ERROR      - cannot create the timer service\r
-\r
---*/\r
-// TODO:    SystemTable - add argument and description to function comment\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  //\r
-  // Make sure the Reset Architectural Protocol is not already installed in the system\r
-  //\r
-  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid);\r
-\r
-  //\r
-  // Hook the runtime service table\r
-  //\r
-  SystemTable->RuntimeServices->ResetSystem = KbcResetSystem;\r
-\r
-  //\r
-  // Now install the Reset RT AP on a new handle\r
-  //\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &mResetHandle,\r
-                  &gEfiResetArchProtocolGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return Status;\r
-}\r
diff --git a/PcAtChipsetPkg/KbcResetDxe/Reset.c b/PcAtChipsetPkg/KbcResetDxe/Reset.c
new file mode 100644 (file)
index 0000000..45f4bc7
--- /dev/null
@@ -0,0 +1,70 @@
+/*++\r
+\r
+Copyright (c) 2006, 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
+  Reset.c\r
+\r
+Abstract:\r
+\r
+  Reset Architectural Protocol implementation\r
+\r
+--*/\r
+\r
+#include "Reset.h"\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
+Routine Description:\r
+\r
+  Reset the system.\r
+\r
+Arguments:\r
+  \r
+    ResetType - warm or cold\r
+    ResetStatus - possible cause of reset\r
+    DataSize - Size of ResetData in bytes\r
+    ResetData - Optional Unicode string\r
+    For details, see efiapi.h\r
+\r
+Returns:\r
+  Does not return if the reset takes place.\r
+  EFI_INVALID_PARAMETER   If ResetType is invalid.\r
+\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
new file mode 100644 (file)
index 0000000..3b70580
--- /dev/null
@@ -0,0 +1,85 @@
+/*++\r
+\r
+Copyright (c) 2006, 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
+  Reset.h\r
+\r
+Abstract:\r
+\r
+  some definitions for reset\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
+EFI_STATUS\r
+EFIAPI\r
+InitializeReset (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  ImageHandle - TODO: add argument description\r
+  SystemTable - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\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
+Routine Description:\r
+\r
+  TODO: Add function description\r
+\r
+Arguments:\r
+\r
+  ResetType   - TODO: add argument description\r
+  ResetStatus - TODO: add argument description\r
+  DataSize    - TODO: add argument description\r
+  ResetData   - TODO: add argument description\r
+\r
+Returns:\r
+\r
+  TODO: add return values\r
+\r
+--*/\r
+;\r
+\r
+#endif\r
diff --git a/PcAtChipsetPkg/KbcResetDxe/Reset.inf b/PcAtChipsetPkg/KbcResetDxe/Reset.inf
new file mode 100644 (file)
index 0000000..a1bcaeb
--- /dev/null
@@ -0,0 +1,51 @@
+#/*++\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
+#  Module Name:\r
+#    Reset.inf\r
+#\r
+#  Abstract:\r
+#\r
+#--*/\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = KbcReset\r
+  FILE_GUID                      = 6F0198AA-1F1D-426D-AE3E-39AB633FCC28\r
+  MODULE_TYPE                    = DXE_RUNTIME_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+  ENTRY_POINT                    = InitializeReset\r
+\r
+[Packages]\r
+  DuetPkg/DuetPkg.dec\r
+  MdePkg/MdePkg.dec\r
+  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
+\r
+[LibraryClasses]\r
+  DebugLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+  IoLib\r
+\r
+[Sources.common]\r
+  Reset.c\r
+  Reset.h\r
+  ResetEntry.c\r
+\r
+[Protocols]\r
+  gEfiResetArchProtocolGuid\r
+\r
+[Depex]\r
+  gEfiCpuIoProtocolGuid\r
+\r
+\r
diff --git a/PcAtChipsetPkg/KbcResetDxe/ResetEntry.c b/PcAtChipsetPkg/KbcResetDxe/ResetEntry.c
new file mode 100644 (file)
index 0000000..bcef440
--- /dev/null
@@ -0,0 +1,76 @@
+/*++\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
+\r
+#include "Reset.h"\r
+\r
+//\r
+// The handle onto which the Reset Architectural Protocol is installed\r
+//\r
+EFI_HANDLE  mResetHandle = NULL;\r
+\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeReset (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Initialize the state information for the Reset Architectural Protocol\r
+\r
+Arguments:\r
+\r
+  ImageHandle of the loaded driver\r
+  Pointer to the System Table\r
+\r
+Returns:\r
+\r
+  Status\r
+\r
+  EFI_SUCCESS           - thread can be successfully created\r
+  EFI_OUT_OF_RESOURCES  - cannot allocate protocol data structure\r
+  EFI_DEVICE_ERROR      - cannot create the timer service\r
+\r
+--*/\r
+// TODO:    SystemTable - add argument and description to function comment\r
+{\r
+  EFI_STATUS  Status;\r
+\r
+  //\r
+  // Make sure the Reset Architectural Protocol is not already installed in the system\r
+  //\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid);\r
+\r
+  //\r
+  // Hook the runtime service table\r
+  //\r
+  SystemTable->RuntimeServices->ResetSystem = KbcResetSystem;\r
+\r
+  //\r
+  // Now install the Reset RT AP on a new handle\r
+  //\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &mResetHandle,\r
+                  &gEfiResetArchProtocolGuid,\r
+                  NULL,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return Status;\r
+}\r