]>
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 | x64Reset.c\r | |
14 | \r | |
15 | Abstract:\r | |
16 | \r | |
17 | --*/\r | |
18 | \r | |
19 | #include "Reset.h"\r | |
20 | \r | |
21 | //\r | |
22 | // The handle onto which the Reset Architectural Protocol is installed\r | |
23 | //\r | |
24 | EFI_HANDLE mResetHandle = NULL;\r | |
25 | \r | |
26 | \r | |
27 | EFI_STATUS\r | |
28 | EFIAPI\r | |
29 | InitializeReset (\r | |
30 | IN EFI_HANDLE ImageHandle,\r | |
31 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
32 | )\r | |
33 | /*++\r | |
34 | \r | |
35 | Routine Description:\r | |
36 | \r | |
37 | Initialize the state information for the Reset Architectural Protocol\r | |
38 | \r | |
39 | Arguments:\r | |
40 | \r | |
41 | ImageHandle of the loaded driver\r | |
42 | Pointer to the System Table\r | |
43 | \r | |
44 | Returns:\r | |
45 | \r | |
46 | Status\r | |
47 | \r | |
48 | EFI_SUCCESS - thread can be successfully created\r | |
49 | EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure\r | |
50 | EFI_DEVICE_ERROR - cannot create the timer service\r | |
51 | \r | |
52 | --*/\r | |
53 | // TODO: SystemTable - add argument and description to function comment\r | |
54 | {\r | |
55 | EFI_STATUS Status;\r | |
56 | \r | |
57 | //\r | |
58 | // Make sure the Reset Architectural Protocol is not already installed in the system\r | |
59 | //\r | |
60 | ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiResetArchProtocolGuid);\r | |
61 | \r | |
62 | //\r | |
63 | // Hook the runtime service table\r | |
64 | //\r | |
65 | SystemTable->RuntimeServices->ResetSystem = KbcResetSystem;\r | |
66 | \r | |
67 | //\r | |
68 | // Now install the Reset RT AP on a new handle\r | |
69 | //\r | |
70 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
71 | &mResetHandle,\r | |
72 | &gEfiResetArchProtocolGuid,\r | |
73 | NULL,\r | |
74 | NULL\r | |
75 | );\r | |
76 | ASSERT_EFI_ERROR (Status);\r | |
77 | \r | |
78 | return Status;\r | |
79 | }\r |