]>
Commit | Line | Data |
---|---|---|
c69dd9df | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | Reset.c\r | |
14 | \r | |
15 | Abstract:\r | |
16 | \r | |
17 | Reset Architectural Protocol implementation\r | |
18 | \r | |
19 | --*/\r | |
20 | \r | |
21 | #include "Reset.h"\r | |
22 | \r | |
23 | VOID\r | |
24 | EFIAPI\r | |
25 | KbcResetSystem (\r | |
26 | IN EFI_RESET_TYPE ResetType,\r | |
27 | IN EFI_STATUS ResetStatus,\r | |
28 | IN UINTN DataSize,\r | |
3a0a1473 | 29 | IN VOID *ResetData OPTIONAL\r |
c69dd9df | 30 | )\r |
31 | /*++\r | |
32 | \r | |
33 | Routine Description:\r | |
34 | \r | |
35 | Reset the system.\r | |
36 | \r | |
37 | Arguments:\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 | |
45 | Returns:\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 |