1 /** @file
2   Main file for NULL named library for Profile1 shell command functions.
3 
4   Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
5   This program and the accompanying materials
6   are licensed and made available under the terms and conditions of the BSD License
7   which accompanies this distribution.  The full text of the license may be found at
8   http://opensource.org/licenses/bsd-license.php
9 
10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 
13 **/
14 
15 #ifndef _UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_
16 #define _UEFI_SHELL_DRIVER1_COMMANDS_LIB_H_
17 
18 #include <Uefi.h>
19 
20 #include <Guid/GlobalVariable.h>
21 #include <Guid/ConsoleInDevice.h>
22 #include <Guid/ConsoleOutDevice.h>
23 #include <Guid/ShellLibHiiGuid.h>
24 
25 #include <IndustryStandard/Pci.h>
26 
27 #include <Protocol/Shell.h>
28 #include <Protocol/ShellParameters.h>
29 #include <Protocol/DevicePath.h>
30 #include <Protocol/LoadedImage.h>
31 #include <Protocol/UnicodeCollation.h>
32 #include <Protocol/DriverDiagnostics2.h>
33 #include <Protocol/DriverDiagnostics.h>
34 #include <Protocol/PlatformDriverOverride.h>
35 #include <Protocol/BusSpecificDriverOverride.h>
36 #include <Protocol/PlatformToDriverConfiguration.h>
37 #include <Protocol/DriverSupportedEfiVersion.h>
38 #include <Protocol/DriverFamilyOverride.h>
39 #include <Protocol/DriverHealth.h>
40 #include <Protocol/PciIo.h>
41 #include <Protocol/PciRootBridgeIo.h>
42 
43 #include <Library/BaseLib.h>
44 #include <Library/BaseMemoryLib.h>
45 #include <Library/DebugLib.h>
46 #include <Library/MemoryAllocationLib.h>
47 #include <Library/PcdLib.h>
48 #include <Library/ShellCommandLib.h>
49 #include <Library/ShellLib.h>
50 #include <Library/SortLib.h>
51 #include <Library/UefiLib.h>
52 #include <Library/UefiRuntimeServicesTableLib.h>
53 #include <Library/UefiBootServicesTableLib.h>
54 #include <Library/HiiLib.h>
55 #include <Library/FileHandleLib.h>
56 #include <Library/DevicePathLib.h>
57 #include <Library/PrintLib.h>
58 #include <Library/HandleParsingLib.h>
59 #include <Library/PeCoffGetEntryPointLib.h>
60 #include <Library/HandleParsingLib.h>
61 
62 
63 extern        EFI_HANDLE                        gShellDriver1HiiHandle;
64 extern        BOOLEAN                           gInReconnect;
65 
66 /**
67   Function for 'connect' command.
68 
69   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
70   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
71 **/
72 SHELL_STATUS
73 EFIAPI
74 ShellCommandRunConnect (
75   IN EFI_HANDLE        ImageHandle,
76   IN EFI_SYSTEM_TABLE  *SystemTable
77   );
78 
79 /**
80   Function for 'devices' command.
81 
82   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
83   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
84 **/
85 SHELL_STATUS
86 EFIAPI
87 ShellCommandRunDevices (
88   IN EFI_HANDLE        ImageHandle,
89   IN EFI_SYSTEM_TABLE  *SystemTable
90   );
91 
92 /**
93   Function for 'openinfo' command.
94 
95   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
96   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
97 **/
98 SHELL_STATUS
99 EFIAPI
100 ShellCommandRunOpenInfo (
101   IN EFI_HANDLE        ImageHandle,
102   IN EFI_SYSTEM_TABLE  *SystemTable
103   );
104 
105 /**
106   Function for 'devtree' command.
107 
108   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
109   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
110 **/
111 SHELL_STATUS
112 EFIAPI
113 ShellCommandRunDevTree (
114   IN EFI_HANDLE        ImageHandle,
115   IN EFI_SYSTEM_TABLE  *SystemTable
116   );
117 
118 /**
119   Function for 'dh' command.
120 
121   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
122   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
123 **/
124 SHELL_STATUS
125 EFIAPI
126 ShellCommandRunDh (
127   IN EFI_HANDLE        ImageHandle,
128   IN EFI_SYSTEM_TABLE  *SystemTable
129   );
130 
131 /**
132   Function for 'disconnect' command.
133 
134   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
135   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
136 **/
137 SHELL_STATUS
138 EFIAPI
139 ShellCommandRunDisconnect (
140   IN EFI_HANDLE        ImageHandle,
141   IN EFI_SYSTEM_TABLE  *SystemTable
142   );
143 
144 /**
145   Function for 'drivers' command.
146 
147   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
148   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
149 **/
150 SHELL_STATUS
151 EFIAPI
152 ShellCommandRunDrivers (
153   IN EFI_HANDLE        ImageHandle,
154   IN EFI_SYSTEM_TABLE  *SystemTable
155   );
156 
157 /**
158   Function for 'drvcfg' command.
159 
160   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
161   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
162 **/
163 SHELL_STATUS
164 EFIAPI
165 ShellCommandRunDrvCfg (
166   IN EFI_HANDLE        ImageHandle,
167   IN EFI_SYSTEM_TABLE  *SystemTable
168   );
169 
170 /**
171   Function for 'drvdiag' command.
172 
173   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
174   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
175 **/
176 SHELL_STATUS
177 EFIAPI
178 ShellCommandRunDrvDiag (
179   IN EFI_HANDLE        ImageHandle,
180   IN EFI_SYSTEM_TABLE  *SystemTable
181   );
182 
183 /**
184   Function for 'reconnect' command.
185 
186   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
187   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
188 **/
189 SHELL_STATUS
190 EFIAPI
191 ShellCommandRunReconnect (
192   IN EFI_HANDLE        ImageHandle,
193   IN EFI_SYSTEM_TABLE  *SystemTable
194   );
195 
196 /**
197   Function for 'unload' command.
198 
199   @param[in] ImageHandle  Handle to the Image (NULL if Internal).
200   @param[in] SystemTable  Pointer to the System Table (NULL if Internal).
201 **/
202 SHELL_STATUS
203 EFIAPI
204 ShellCommandRunUnload (
205   IN EFI_HANDLE        ImageHandle,
206   IN EFI_SYSTEM_TABLE  *SystemTable
207   );
208 
209 /**
210   Do a connect from an EFI variable via it's key name.
211 
212   @param[in] Key      The name of the EFI Variable.
213 
214   @retval EFI_SUCCESS   The operation was successful.
215 **/
216 EFI_STATUS
217 ShellConnectFromDevPaths (
218   IN CONST CHAR16 *Key
219   );
220 
221 
222 
223 #endif
224 
225