]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/ResetRuntimeDxe/Reset.c
clean up the un-suitable ';' location when declaring the functions.
[mirror_edk2.git] / UnixPkg / ResetRuntimeDxe / Reset.c
1 /*++
2
3 Copyright (c) 2004 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Reset.c
15
16 Abstract:
17
18 Reset Architectural Protocol as defined in Tiano under UNIX Emulation
19
20 --*/
21
22 #include "PiDxe.h"
23 #include "UnixDxe.h"
24 #include <Protocol/Reset.h>
25
26 #include <Library/BaseLib.h>
27 #include <Library/DebugLib.h>
28 #include <Library/UefiLib.h>
29 #include <Library/UefiDriverEntryPoint.h>
30 #include <Library/UnixLib.h>
31 #include <Library/MemoryAllocationLib.h>
32 #include <Library/UefiBootServicesTableLib.h>
33
34 EFI_STATUS
35 EFIAPI
36 InitializeUnixReset (
37 IN EFI_HANDLE ImageHandle,
38 IN EFI_SYSTEM_TABLE *SystemTable
39 );
40
41 STATIC
42 VOID
43 EFIAPI
44 UnixResetSystem (
45 IN EFI_RESET_TYPE ResetType,
46 IN EFI_STATUS ResetStatus,
47 IN UINTN DataSize,
48 IN CHAR16 *ResetData OPTIONAL
49 );
50
51 EFI_STATUS
52 EFIAPI
53 InitializeUnixReset (
54 IN EFI_HANDLE ImageHandle,
55 IN EFI_SYSTEM_TABLE *SystemTable
56 )
57 /*++
58
59 Routine Description:
60
61
62 Arguments:
63
64 ImageHandle of the loaded driver
65 Pointer to the System Table
66
67 Returns:
68
69 Status
70 --*/
71 // TODO: SystemTable - add argument and description to function comment
72 {
73 EFI_STATUS Status;
74 EFI_HANDLE Handle;
75
76 SystemTable->RuntimeServices->ResetSystem = UnixResetSystem;
77
78 Handle = NULL;
79 Status = gBS->InstallMultipleProtocolInterfaces (
80 &Handle,
81 &gEfiResetArchProtocolGuid,
82 NULL,
83 NULL
84 );
85 ASSERT_EFI_ERROR (Status);
86
87 return Status;
88 }
89
90 STATIC
91 VOID
92 EFIAPI
93 UnixResetSystem (
94 IN EFI_RESET_TYPE ResetType,
95 IN EFI_STATUS ResetStatus,
96 IN UINTN DataSize,
97 IN CHAR16 *ResetData OPTIONAL
98 )
99 /*++
100
101 Routine Description:
102
103 TODO: Add function description
104
105 Arguments:
106
107 ResetType - TODO: add argument description
108 ResetStatus - TODO: add argument description
109 DataSize - TODO: add argument description
110 ResetData - TODO: add argument description
111
112 Returns:
113
114 EFI_SUCCESS - TODO: Add description for return value
115
116 --*/
117 {
118 //
119 // BUGBUG Need to kill all console windows later
120 //
121 //
122 // Discard ResetType, always return 0 as exit code
123 //
124 gUnix->Exit (0);
125
126 //
127 // Should never go here
128 //
129 while (1)
130 ;
131 }