+++ /dev/null
-/*++\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
+++ /dev/null
-/*++\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
+++ /dev/null
-#/*++\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
+++ /dev/null
-/*++\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
--- /dev/null
+/*++\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
--- /dev/null
+/*++\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
--- /dev/null
+#/*++\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
--- /dev/null
+/*++\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