2 Main file for NULL named library for Profile1 shell command functions.
4 Copyright (c) 2010, 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
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.
16 #include <ShellBase.h>
18 #include <Guid/GlobalVariable.h>
19 #include <Guid/ConsoleInDevice.h>
20 #include <Guid/ConsoleOutDevice.h>
22 #include <Protocol/EfiShell.h>
23 #include <Protocol/EfiShellParameters.h>
24 #include <Protocol/DevicePath.h>
25 #include <Protocol/LoadedImage.h>
26 #include <Protocol/UnicodeCollation.h>
27 #include <Protocol/DevicePathToText.h>
28 #include <Protocol/DriverDiagnostics2.h>
29 #include <Protocol/DriverDiagnostics.h>
30 #include <Protocol/PlatformDriverOverride.h>
31 #include <Protocol/BusSpecificDriverOverride.h>
32 #include <Protocol/PlatformToDriverConfiguration.h>
33 #include <Protocol/DriverSupportedEfiVersion.h>
34 #include <Protocol/DriverFamilyOverride.h>
35 #include <Protocol/DriverHealth.h>
36 #include <Protocol/DevicePathFromText.h>
38 #include <Library/BaseLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/DebugLib.h>
41 #include <Library/MemoryAllocationLib.h>
42 #include <Library/PcdLib.h>
43 #include <Library/ShellCommandLib.h>
44 #include <Library/ShellLib.h>
45 #include <Library/SortLib.h>
46 #include <Library/UefiLib.h>
47 #include <Library/UefiRuntimeServicesTableLib.h>
48 #include <Library/UefiBootServicesTableLib.h>
49 #include <Library/HiiLib.h>
50 #include <Library/FileHandleLib.h>
51 #include <Library/DevicePathLib.h>
52 #include <Library/PrintLib.h>
53 #include <Library/HandleParsingLib.h>
56 extern EFI_HANDLE gShellDebug1HiiHandle
;
57 extern CONST EFI_GUID gShellDebug1HiiGuid
;
60 Function printing hex output to the console.
62 @param[in] Indent Number of spaces to indent.
63 @param[in] Offset Offset to start with.
64 @param[in] DataSize Length of data.
65 @param[in] UserData Pointer to some data.
76 Function returns a system configuration table that is stored in the
77 EFI System Table based on the provided GUID.
79 @param[in] TableGuid A pointer to the table's GUID type.
80 @param[out] Table On exit, a pointer to a system configuration table.
82 @retval EFI_SUCCESS A configuration table matching TableGuid was found.
83 @retval EFI_NOT_FOUND A configuration table matching TableGuid was not found.
87 GetSystemConfigurationTable (
88 IN EFI_GUID
*TableGuid
,
93 Convert a string representation of a GUID to the GUID value.
95 @param[in] StringGuid The pointer to the string containing a GUID printed.
96 @param[in,out] Guid The pointer to the buffer to get the GUID value.
100 ConvertStringToGuid (
101 IN CONST CHAR16
*StringGuid
,
102 IN OUT EFI_GUID
*Guid
106 Convert a Unicode character to numerical value.
108 This internal function only deal with Unicode character
109 which maps to a valid hexadecimal ASII character, i.e.
110 L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other
111 Unicode character, the value returned does not make sense.
113 @param Char The character to convert.
115 @return The numerical value converted.
125 Function for 'setsize' command.
127 @param[in] ImageHandle Handle to the Image (NULL if Internal).
128 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
132 ShellCommandRunSetSize (
133 IN EFI_HANDLE ImageHandle
,
134 IN EFI_SYSTEM_TABLE
*SystemTable
138 Function for 'comp' command.
140 @param[in] ImageHandle Handle to the Image (NULL if Internal).
141 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
145 ShellCommandRunComp (
146 IN EFI_HANDLE ImageHandle
,
147 IN EFI_SYSTEM_TABLE
*SystemTable
151 Function for 'mode' command.
153 @param[in] ImageHandle Handle to the Image (NULL if Internal).
154 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
158 ShellCommandRunMode (
159 IN EFI_HANDLE ImageHandle
,
160 IN EFI_SYSTEM_TABLE
*SystemTable
164 Function for 'memmap' command.
166 @param[in] ImageHandle Handle to the Image (NULL if Internal).
167 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
171 ShellCommandRunMemMap (
172 IN EFI_HANDLE ImageHandle
,
173 IN EFI_SYSTEM_TABLE
*SystemTable
177 Function for 'compress' command.
179 @param[in] ImageHandle Handle to the Image (NULL if Internal).
180 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
184 ShellCommandRunEfiCompress (
185 IN EFI_HANDLE ImageHandle
,
186 IN EFI_SYSTEM_TABLE
*SystemTable
190 Function for 'decompress' command.
192 @param[in] ImageHandle Handle to the Image (NULL if Internal).
193 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
197 ShellCommandRunEfiDecompress (
198 IN EFI_HANDLE ImageHandle
,
199 IN EFI_SYSTEM_TABLE
*SystemTable
203 Function for 'dmem' command.
205 @param[in] ImageHandle Handle to the Image (NULL if Internal).
206 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
210 ShellCommandRunDmem (
211 IN EFI_HANDLE ImageHandle
,
212 IN EFI_SYSTEM_TABLE
*SystemTable
216 Function for 'loadpcirom' command.
218 @param[in] ImageHandle Handle to the Image (NULL if Internal).
219 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
223 ShellCommandRunLoadPciRom (
224 IN EFI_HANDLE ImageHandle
,
225 IN EFI_SYSTEM_TABLE
*SystemTable
229 Function for 'mm' command.
231 @param[in] ImageHandle Handle to the Image (NULL if Internal).
232 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
237 IN EFI_HANDLE ImageHandle
,
238 IN EFI_SYSTEM_TABLE
*SystemTable
242 Function for 'setvar' command.
244 @param[in] ImageHandle Handle to the Image (NULL if Internal).
245 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
249 ShellCommandRunSetVar (
250 IN EFI_HANDLE ImageHandle
,
251 IN EFI_SYSTEM_TABLE
*SystemTable
255 Function for 'sermode' command.
257 @param[in] ImageHandle Handle to the Image (NULL if Internal).
258 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
262 ShellCommandRunSerMode (
263 IN EFI_HANDLE ImageHandle
,
264 IN EFI_SYSTEM_TABLE
*SystemTable
268 Function for 'bcfg' command.
270 @param[in] ImageHandle Handle to the Image (NULL if Internal).
271 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
275 ShellCommandRunBcfg (
276 IN EFI_HANDLE ImageHandle
,
277 IN EFI_SYSTEM_TABLE
*SystemTable
281 Function for 'pci' command.
283 @param[in] ImageHandle Handle to the Image (NULL if Internal).
284 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
289 IN EFI_HANDLE ImageHandle
,
290 IN EFI_SYSTEM_TABLE
*SystemTable
294 Function for 'smbiosview' command.
296 @param[in] ImageHandle Handle to the Image (NULL if Internal).
297 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
301 ShellCommandRunSmbiosView (
302 IN EFI_HANDLE ImageHandle
,
303 IN EFI_SYSTEM_TABLE
*SystemTable
307 Function for 'dmpstore' command.
309 @param[in] ImageHandle Handle to the Image (NULL if Internal).
310 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
314 ShellCommandRunDmpStore (
315 IN EFI_HANDLE ImageHandle
,
316 IN EFI_SYSTEM_TABLE
*SystemTable
320 Function for 'dblk' command.
322 @param[in] ImageHandle Handle to the Image (NULL if Internal).
323 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
327 ShellCommandRunDblk (
328 IN EFI_HANDLE ImageHandle
,
329 IN EFI_SYSTEM_TABLE
*SystemTable