]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/KbcResetDxe/Reset.c
Porting Duet module from EDKI to EDKII
[mirror_edk2.git] / DuetPkg / KbcResetDxe / Reset.c
CommitLineData
c69dd9df 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 Reset.c\r
14\r
15Abstract:\r
16\r
17 Reset Architectural Protocol implementation\r
18\r
19--*/\r
20\r
21#include "Reset.h"\r
22\r
23VOID\r
24EFIAPI\r
25KbcResetSystem (\r
26 IN EFI_RESET_TYPE ResetType,\r
27 IN EFI_STATUS ResetStatus,\r
28 IN UINTN DataSize,\r
29 IN CHAR16 *ResetData OPTIONAL\r
30 )\r
31/*++\r
32\r
33Routine Description:\r
34\r
35 Reset the system.\r
36\r
37Arguments:\r
38 \r
39 ResetType - warm or cold\r
40 ResetStatus - possible cause of reset\r
41 DataSize - Size of ResetData in bytes\r
42 ResetData - Optional Unicode string\r
43 For details, see efiapi.h\r
44\r
45Returns:\r
46 Does not return if the reset takes place.\r
47 EFI_INVALID_PARAMETER If ResetType is invalid.\r
48\r
49--*/\r
50{\r
51 UINT8 Data;\r
52\r
53 switch (ResetType) {\r
54 case EfiResetWarm:\r
55 case EfiResetCold:\r
56 case EfiResetShutdown:\r
57 Data = 0xfe;\r
58 IoWrite8 (0x64, Data);\r
59 break;\r
60\r
61 default:\r
62 return ;\r
63 }\r
64\r
65 //\r
66 // Given we should have reset getting here would be bad\r
67 //\r
68 ASSERT (FALSE);\r
69}\r
70\r