| 1 | /** @file\r |
| 2 | Reset Architectural Protocol implementation\r |
| 3 | \r |
| 4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r |
| 5 | This program and the accompanying materials \r |
| 6 | are licensed and made available under the terms and conditions of the BSD License \r |
| 7 | which accompanies this distribution. The full text of the license may be found at \r |
| 8 | http://opensource.org/licenses/bsd-license.php \r |
| 9 | \r |
| 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
| 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
| 12 | \r |
| 13 | **/\r |
| 14 | \r |
| 15 | #include "Reset.h"\r |
| 16 | \r |
| 17 | /**\r |
| 18 | Reset the system.\r |
| 19 | \r |
| 20 | @param ResetType warm or cold\r |
| 21 | @param ResetStatus possible cause of reset\r |
| 22 | @param DataSize Size of ResetData in bytes\r |
| 23 | @param ResetData Optional Unicode string\r |
| 24 | \r |
| 25 | **/\r |
| 26 | VOID\r |
| 27 | EFIAPI\r |
| 28 | KbcResetSystem (\r |
| 29 | IN EFI_RESET_TYPE ResetType,\r |
| 30 | IN EFI_STATUS ResetStatus,\r |
| 31 | IN UINTN DataSize,\r |
| 32 | IN VOID *ResetData OPTIONAL\r |
| 33 | )\r |
| 34 | {\r |
| 35 | UINT8 Data;\r |
| 36 | \r |
| 37 | switch (ResetType) {\r |
| 38 | case EfiResetWarm:\r |
| 39 | case EfiResetCold:\r |
| 40 | case EfiResetShutdown:\r |
| 41 | Data = 0xfe;\r |
| 42 | IoWrite8 (0x64, Data);\r |
| 43 | break;\r |
| 44 | \r |
| 45 | default:\r |
| 46 | return ;\r |
| 47 | }\r |
| 48 | \r |
| 49 | //\r |
| 50 | // Given we should have reset getting here would be bad\r |
| 51 | //\r |
| 52 | ASSERT (FALSE);\r |
| 53 | }\r |
| 54 | \r |