]>
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 | IpfReset.c\r | |
14 | \r | |
15 | Abstract:\r | |
16 | \r | |
17 | --*/\r | |
18 | \r | |
19 | #include "Cf9Reset.h"\r | |
20 | \r | |
21 | SAL_RETURN_REGS\r | |
22 | ResetEsalServicesClassCommonEntry (\r | |
23 | IN UINT64 FunctionId,\r | |
24 | IN UINT64 Arg2,\r | |
25 | IN UINT64 Arg3,\r | |
26 | IN UINT64 Arg4,\r | |
27 | IN UINT64 Arg5,\r | |
28 | IN UINT64 Arg6,\r | |
29 | IN UINT64 Arg7,\r | |
30 | IN UINT64 Arg8,\r | |
31 | IN SAL_EXTENDED_SAL_PROC ExtendedSalProc,\r | |
32 | IN BOOLEAN VirtualMode,\r | |
33 | IN VOID *Global\r | |
34 | )\r | |
35 | /*++\r | |
36 | \r | |
37 | Routine Description:\r | |
38 | \r | |
39 | Main entry for Extended SAL Reset Services\r | |
40 | \r | |
41 | Arguments:\r | |
42 | \r | |
43 | FunctionId Function Id which needed to be called.\r | |
44 | Arg2 EFI_RESET_TYPE, whether WARM of COLD reset\r | |
45 | Arg3 Last EFI_STATUS \r | |
46 | Arg4 Data Size of UNICODE STRING passed in ARG5\r | |
47 | Arg5 Unicode String which CHAR16*\r | |
48 | \r | |
49 | Returns:\r | |
50 | \r | |
51 | SAL_RETURN_REGS\r | |
52 | \r | |
53 | --*/\r | |
54 | // TODO: Arg6 - add argument and description to function comment\r | |
55 | // TODO: Arg7 - add argument and description to function comment\r | |
56 | // TODO: Arg8 - add argument and description to function comment\r | |
57 | // TODO: ExtendedSalProc - add argument and description to function comment\r | |
58 | // TODO: VirtualMode - add argument and description to function comment\r | |
59 | // TODO: Global - add argument and description to function comment\r | |
60 | {\r | |
61 | SAL_RETURN_REGS ReturnVal;\r | |
62 | \r | |
63 | switch (FunctionId) {\r | |
64 | case ResetSystem:\r | |
65 | KbcResetSystem (Arg2, Arg3, (UINTN) Arg4, (VOID *) Arg5);\r | |
66 | ReturnVal.Status = EFI_SUCCESS;\r | |
67 | break;\r | |
68 | \r | |
69 | default:\r | |
70 | ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;\r | |
71 | break;\r | |
72 | }\r | |
73 | \r | |
74 | return ReturnVal;\r | |
75 | }\r | |
76 | \r | |
77 | EFI_STATUS\r | |
78 | EFIAPI\r | |
79 | InitializeReset (\r | |
80 | IN EFI_HANDLE ImageHandle,\r | |
81 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
82 | )\r | |
83 | /*++\r | |
84 | \r | |
85 | Routine Description:\r | |
86 | \r | |
87 | Initialize the state information for the Reset Architectural Protocol\r | |
88 | \r | |
89 | Arguments:\r | |
90 | \r | |
91 | ImageHandle of the loaded driver\r | |
92 | Pointer to the System Table\r | |
93 | \r | |
94 | Returns:\r | |
95 | \r | |
96 | Status\r | |
97 | \r | |
98 | EFI_SUCCESS - thread can be successfully created\r | |
99 | EFI_OUT_OF_RESOURCES - cannot allocate protocol data structure\r | |
100 | EFI_DEVICE_ERROR - cannot create the timer service\r | |
101 | \r | |
102 | --*/\r | |
103 | // TODO: SystemTable - add argument and description to function comment\r | |
104 | {\r | |
105 | EfiInitializeRuntimeDriverLib (ImageHandle, SystemTable, NULL);\r | |
106 | \r | |
107 | RegisterEsalClass (\r | |
108 | &gEfiExtendedSalResetServicesProtocolGuid,\r | |
109 | NULL,\r | |
110 | ResetEsalServicesClassCommonEntry,\r | |
111 | ResetSystem,\r | |
112 | NULL\r | |
113 | );\r | |
114 | \r | |
115 | return EFI_SUCCESS;\r | |
116 | }\r | |
117 | \r |