]> git.proxmox.com Git - mirror_edk2.git/blame - Nt32Pkg/ResetRuntimeDxe/reset.c
Modify all file header to follow doxygen format
[mirror_edk2.git] / Nt32Pkg / ResetRuntimeDxe / reset.c
CommitLineData
6ae81428 1/**@file\r
8681bee2 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\r
14 Reset.c\r
15\r
16Abstract:\r
17\r
18 Reset Architectural Protocol as defined in Tiano under NT Emulation\r
19\r
6ae81428 20**/\r
8681bee2 21\r
f2569572
A
22#include <PiDxe.h>\r
23#include <WinNtDxe.h>\r
24#include <Protocol/Reset.h>\r
25#include <Library/DebugLib.h>\r
26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/WinNtLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
8681bee2 29\r
30\r
8681bee2 31EFI_STATUS\r
32EFIAPI\r
33InitializeNtReset (\r
34 IN EFI_HANDLE ImageHandle,\r
35 IN EFI_SYSTEM_TABLE *SystemTable\r
36 );\r
37\r
38STATIC\r
39EFI_STATUS\r
40EFIAPI\r
41WinNtResetSystem (\r
42 IN EFI_RESET_TYPE ResetType,\r
43 IN EFI_STATUS ResetStatus,\r
44 IN UINTN DataSize,\r
45 IN CHAR16 *ResetData OPTIONAL\r
46 );\r
47\r
48\r
49EFI_STATUS\r
50EFIAPI\r
51InitializeNtReset (\r
52 IN EFI_HANDLE ImageHandle,\r
53 IN EFI_SYSTEM_TABLE *SystemTable\r
54 )\r
55/*++\r
56\r
57Routine Description:\r
58\r
59\r
60Arguments:\r
61\r
62 ImageHandle of the loaded driver\r
63 Pointer to the System Table\r
64\r
65Returns:\r
66\r
67 Status\r
68--*/\r
69// TODO: SystemTable - add argument and description to function comment\r
70{\r
71 EFI_STATUS Status;\r
72 EFI_HANDLE Handle;\r
73\r
74 SystemTable->RuntimeServices->ResetSystem = WinNtResetSystem;\r
75\r
76 Handle = NULL;\r
77 Status = gBS->InstallMultipleProtocolInterfaces (\r
78 &Handle,\r
79 &gEfiResetArchProtocolGuid,\r
80 NULL,\r
81 NULL\r
82 );\r
83 ASSERT_EFI_ERROR (Status);\r
84\r
85 return Status;\r
86}\r
87\r
88STATIC\r
89EFI_STATUS\r
90EFIAPI\r
91WinNtResetSystem (\r
92 IN EFI_RESET_TYPE ResetType,\r
93 IN EFI_STATUS ResetStatus,\r
94 IN UINTN DataSize,\r
95 IN CHAR16 *ResetData OPTIONAL\r
96 )\r
97/*++\r
98\r
99Routine Description:\r
100\r
101 TODO: Add function description\r
102\r
103Arguments:\r
104\r
105 ResetType - TODO: add argument description\r
106 ResetStatus - TODO: add argument description\r
107 DataSize - TODO: add argument description\r
108 ResetData - TODO: add argument description\r
109\r
110Returns:\r
111\r
112 EFI_SUCCESS - TODO: Add description for return value\r
113\r
114--*/\r
115{\r
116 //\r
117 // BUGBUG Need to kill all console windows later\r
118 //\r
119 //\r
120 // Discard ResetType, always return 0 as exit code\r
121 //\r
122 gWinNt->ExitProcess (0);\r
123\r
124 //\r
125 // Should never go here\r
126 //\r
127 return EFI_SUCCESS;\r
128}\r