Fix component name bugs when input Controller Name is invalid
[mirror_edk2.git] / EdkUnixPkg / Dxe / UnixThunk / Chipset / Reset / Reset.c
CommitLineData
c9093a06 1/*++\r
2\r
3Copyright (c) 2004 - 2005, 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\r
14 Reset.c\r
15\r
16Abstract:\r
17\r
377fc2ae 18 Reset Architectural Protocol as defined in Tiano under UNIX Emulation\r
c9093a06 19\r
20--*/\r
21\r
22EFI_STATUS\r
23EFIAPI\r
24InitializeUnixReset (\r
25 IN EFI_HANDLE ImageHandle,\r
26 IN EFI_SYSTEM_TABLE *SystemTable\r
27 );\r
28\r
29STATIC\r
30VOID
31EFIAPI\r
32UnixResetSystem (\r
33 IN EFI_RESET_TYPE ResetType,\r
34 IN EFI_STATUS ResetStatus,\r
35 IN UINTN DataSize,\r
36 IN CHAR16 *ResetData OPTIONAL\r
37 );\r
38\r
39EFI_STATUS\r
40EFIAPI\r
41InitializeUnixReset (\r
42 IN EFI_HANDLE ImageHandle,\r
43 IN EFI_SYSTEM_TABLE *SystemTable\r
44 )\r
45/*++\r
46\r
47Routine Description:\r
48\r
49\r
50Arguments:\r
51\r
52 ImageHandle of the loaded driver\r
53 Pointer to the System Table\r
54\r
55Returns:\r
56\r
57 Status\r
58--*/\r
59// TODO: SystemTable - add argument and description to function comment\r
60{\r
61 EFI_STATUS Status;\r
62 EFI_HANDLE Handle;\r
63\r
64 SystemTable->RuntimeServices->ResetSystem = UnixResetSystem;\r
65\r
66 Handle = NULL;\r
67 Status = gBS->InstallMultipleProtocolInterfaces (\r
68 &Handle,\r
69 &gEfiResetArchProtocolGuid,\r
70 NULL,\r
71 NULL\r
72 );\r
73 ASSERT_EFI_ERROR (Status);\r
74\r
75 return Status;\r
76}\r
77\r
78STATIC\r
79VOID
80EFIAPI\r
81UnixResetSystem (\r
82 IN EFI_RESET_TYPE ResetType,\r
83 IN EFI_STATUS ResetStatus,\r
84 IN UINTN DataSize,\r
85 IN CHAR16 *ResetData OPTIONAL\r
86 )\r
87/*++\r
88\r
89Routine Description:\r
90\r
91 TODO: Add function description\r
92\r
93Arguments:\r
94\r
95 ResetType - TODO: add argument description\r
96 ResetStatus - TODO: add argument description\r
97 DataSize - TODO: add argument description\r
98 ResetData - TODO: add argument description\r
99\r
100Returns:\r
101\r
102 EFI_SUCCESS - TODO: Add description for return value\r
103\r
104--*/\r
105{\r
106 //\r
107 // BUGBUG Need to kill all console windows later\r
108 //\r
109 //\r
110 // Discard ResetType, always return 0 as exit code\r
111 //\r
112 gUnix->Exit (0);\r
113\r
114 //\r
115 // Should never go here\r
116 //\r
117 while (1)
118 ;
119}\r