]>
Commit | Line | Data |
---|---|---|
6ae81428 | 1 | /**@file\r |
8681bee2 | 2 | \r |
8f2a5f80 HT |
3 | Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
8681bee2 | 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 | \r | |
14 | Reset.c\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Reset Architectural Protocol as defined in Tiano under NT Emulation\r | |
19 | \r | |
6ae81428 | 20 | **/\r |
8681bee2 | 21 | \r |
60c93673 | 22 | #include <Uefi.h>\r |
f2569572 A |
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 | 31 | EFI_STATUS\r |
32 | EFIAPI\r | |
33 | InitializeNtReset (\r | |
34 | IN EFI_HANDLE ImageHandle,\r | |
35 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
36 | );\r | |
37 | \r | |
0b94e319 | 38 | VOID\r |
8681bee2 | 39 | EFIAPI\r |
40 | WinNtResetSystem (\r | |
41 | IN EFI_RESET_TYPE ResetType,\r | |
42 | IN EFI_STATUS ResetStatus,\r | |
43 | IN UINTN DataSize,\r | |
a00ec39b | 44 | IN VOID *ResetData OPTIONAL\r |
8681bee2 | 45 | );\r |
46 | \r | |
47 | \r | |
48 | EFI_STATUS\r | |
49 | EFIAPI\r | |
50 | InitializeNtReset (\r | |
51 | IN EFI_HANDLE ImageHandle,\r | |
52 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
53 | )\r | |
54 | /*++\r | |
55 | \r | |
56 | Routine Description:\r | |
57 | \r | |
58 | \r | |
59 | Arguments:\r | |
60 | \r | |
61 | ImageHandle of the loaded driver\r | |
62 | Pointer to the System Table\r | |
63 | \r | |
64 | Returns:\r | |
65 | \r | |
66 | Status\r | |
67 | --*/\r | |
68 | // TODO: SystemTable - add argument and description to function comment\r | |
69 | {\r | |
70 | EFI_STATUS Status;\r | |
71 | EFI_HANDLE Handle;\r | |
72 | \r | |
73 | SystemTable->RuntimeServices->ResetSystem = WinNtResetSystem;\r | |
74 | \r | |
75 | Handle = NULL;\r | |
76 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
77 | &Handle,\r | |
78 | &gEfiResetArchProtocolGuid,\r | |
79 | NULL,\r | |
80 | NULL\r | |
81 | );\r | |
82 | ASSERT_EFI_ERROR (Status);\r | |
83 | \r | |
84 | return Status;\r | |
85 | }\r | |
86 | \r | |
0b94e319 | 87 | VOID\r |
8681bee2 | 88 | EFIAPI\r |
89 | WinNtResetSystem (\r | |
90 | IN EFI_RESET_TYPE ResetType,\r | |
91 | IN EFI_STATUS ResetStatus,\r | |
92 | IN UINTN DataSize,\r | |
a00ec39b | 93 | IN VOID *ResetData OPTIONAL\r |
8681bee2 | 94 | )\r |
95 | /*++\r | |
96 | \r | |
97 | Routine Description:\r | |
98 | \r | |
99 | TODO: Add function description\r | |
100 | \r | |
101 | Arguments:\r | |
102 | \r | |
103 | ResetType - TODO: add argument description\r | |
104 | ResetStatus - TODO: add argument description\r | |
105 | DataSize - TODO: add argument description\r | |
106 | ResetData - TODO: add argument description\r | |
107 | \r | |
108 | Returns:\r | |
109 | \r | |
110 | EFI_SUCCESS - TODO: Add description for return value\r | |
111 | \r | |
112 | --*/\r | |
113 | {\r | |
114 | //\r | |
115 | // BUGBUG Need to kill all console windows later\r | |
116 | //\r | |
117 | //\r | |
118 | // Discard ResetType, always return 0 as exit code\r | |
119 | //\r | |
120 | gWinNt->ExitProcess (0);\r | |
121 | \r | |
122 | //\r | |
123 | // Should never go here\r | |
124 | //\r | |
0b94e319 | 125 | ASSERT (FALSE);\r |
8681bee2 | 126 | }\r |