TianoCore EDK2 master
Loading...
Searching...
No Matches
Dmem.c
Go to the documentation of this file.
1
14#include <Guid/Acpi.h>
15#include <Guid/Mps.h>
16#include <Guid/SmBios.h>
23
33CHAR16
35 IN CONST CHAR16 Char
36 )
37{
38 if (((Char < 0x20) && (Char > 0)) || (Char > 126)) {
39 return (L'?');
40 }
41
42 return (Char);
43}
44
53 IN CONST VOID *Address,
54 IN CONST UINTN Size
55 )
56{
58 EFI_STATUS Status;
59 VOID *Buffer;
60 SHELL_STATUS ShellStatus;
61
62 ShellStatus = SHELL_SUCCESS;
63
64 Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&PciRbIo);
65 if (EFI_ERROR (Status)) {
66 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"dmem");
67 return (SHELL_NOT_FOUND);
68 }
69
70 Buffer = AllocateZeroPool (Size);
71 if (Buffer == NULL) {
73 }
74
75 Status = PciRbIo->Mem.Read (PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);
76 if (EFI_ERROR (Status)) {
77 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_ER), gShellDebug1HiiHandle, L"dmem");
78 ShellStatus = SHELL_NOT_FOUND;
79 } else {
80 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_MMIO_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size);
81 DumpHex (2, (UINTN)Address, Size, Buffer);
82 }
83
84 FreePool (Buffer);
85 return (ShellStatus);
86}
87
95 IN UINT64 Address
96 )
97{
98 EFI_RT_PROPERTIES_TABLE *RtPropertiesTable;
99 UINT32 RtServices;
100 SHELL_STATUS ShellStatus;
101 EFI_STATUS Status;
102
103 ShellStatus = SHELL_SUCCESS;
104
105 if (Address != 0) {
106 EfiGetSystemConfigurationTable (&gEfiRtPropertiesTableGuid, (VOID **)&RtPropertiesTable);
107
108 RtServices = (UINT32)RtPropertiesTable->RuntimeServicesSupported;
109 Status = ShellPrintHiiEx (
110 -1,
111 -1,
112 NULL,
113 STRING_TOKEN (STR_DMEM_RT_PROPERTIES),
114 gShellDebug1HiiHandle,
115 EFI_RT_PROPERTIES_TABLE_VERSION,
116 (RtServices & EFI_RT_SUPPORTED_GET_TIME) ? 1 : 0,
117 (RtServices & EFI_RT_SUPPORTED_SET_TIME) ? 1 : 0,
118 (RtServices & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) ? 1 : 0,
119 (RtServices & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) ? 1 : 0,
120 (RtServices & EFI_RT_SUPPORTED_GET_VARIABLE) ? 1 : 0,
121 (RtServices & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) ? 1 : 0,
122 (RtServices & EFI_RT_SUPPORTED_SET_VARIABLE) ? 1 : 0,
123 (RtServices & EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP) ? 1 : 0,
124 (RtServices & EFI_RT_SUPPORTED_CONVERT_POINTER) ? 1 : 0,
125 (RtServices & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) ? 1 : 0,
126 (RtServices & EFI_RT_SUPPORTED_RESET_SYSTEM) ? 1 : 0,
127 (RtServices & EFI_RT_SUPPORTED_UPDATE_CAPSULE) ? 1 : 0,
128 (RtServices & EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES) ? 1 : 0,
129 (RtServices & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) ? 1 : 0
130 );
131
132 if (EFI_ERROR (Status)) {
133 ShellStatus = SHELL_ABORTED;
134 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), gShellDebug1HiiHandle, L"RtPropertiesTable");
135 }
136 } else {
137 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_NOT_FOUND), gShellDebug1HiiHandle, L"RtPropertiesTable");
138 }
139
140 return (ShellStatus);
141}
142
151 IN CHAR16 *FileName,
152 OUT CHAR16 **BaseName
153 )
154{
156 CHAR16 *StrTail;
157
158 StrLen = StrSize (FileName);
159
160 for (StrTail = FileName + StrLen - 1; StrTail != FileName && *StrTail != L'\\'; StrTail--) {
161 }
162
163 if (StrTail == FileName) {
164 return EFI_NOT_FOUND;
165 }
166
167 *BaseName = StrTail+1;
168
169 return EFI_SUCCESS;
170}
171
177 )
178{
179 EFI_STATUS Status;
180 EFI_IMAGE_EXECUTION_INFO_TABLE *ExecInfoTablePtr;
182 CHAR8 *ptr;
183 CHAR16 *ImagePath;
184 CHAR16 *ImageName;
185 UINTN Image;
186 UINTN *NumberOfImages;
187 CHAR16 *ActionType;
188
189 EfiGetSystemConfigurationTable (&gEfiImageSecurityDatabaseGuid, (VOID **)&ExecInfoTablePtr);
190
191 NumberOfImages = &ExecInfoTablePtr->NumberOfImages;
192
193 ptr = (CHAR8 *)ExecInfoTablePtr + 1;
194
195 for (Image = 0; Image < *NumberOfImages; Image++, ptr += InfoPtr->InfoSize) {
196 InfoPtr = (EFI_IMAGE_EXECUTION_INFO *)ptr;
197 ImagePath = (CHAR16 *)(InfoPtr + 1);
198
199 GetBaseName (ImagePath, &ImageName);
200
201 switch (InfoPtr->Action) {
202 case EFI_IMAGE_EXECUTION_AUTHENTICATION:
203 ActionType = L"AUTHENTICATION";
204 break;
205 case EFI_IMAGE_EXECUTION_AUTH_UNTESTED:
206 ActionType = L"AUTH_UNTESTED";
207 break;
208 case EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED:
209 ActionType = L"AUTH_SIG_FAILED";
210 break;
211 case EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED:
212 ActionType = L"AUTH_SIG_PASSED";
213 break;
214 case EFI_IMAGE_EXECUTION_AUTH_SIG_NOT_FOUND:
215 ActionType = L"AUTH_SIG_NOT_FOUND";
216 break;
217 case EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND:
218 ActionType = L"AUTH_SIG_FOUND";
219 break;
220 case EFI_IMAGE_EXECUTION_POLICY_FAILED:
221 ActionType = L"POLICY_FAILED";
222 break;
223 case EFI_IMAGE_EXECUTION_INITIALIZED:
224 ActionType = L"INITIALIZED";
225 break;
226 default:
227 ActionType = L"invalid action";
228 }
229
230 Status = ShellPrintHiiEx (
231 -1,
232 -1,
233 NULL,
234 STRING_TOKEN (STR_DMEM_IMG_EXE_ENTRY),
235 gShellDebug1HiiHandle,
236 ImageName,
237 ActionType
238 );
239 }
240
241 return Status;
242}
243
251 IN UINT64 Address
252 )
253{
254 SHELL_STATUS ShellStatus;
255 EFI_STATUS Status;
256
257 ShellStatus = SHELL_SUCCESS;
258
259 if (Address != 0) {
260 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_IMG_EXE_TABLE), gShellDebug1HiiHandle);
261 Status = GetImageExecutionInfo ();
262 if (EFI_ERROR (Status)) {
263 ShellStatus = SHELL_ABORTED;
264 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), gShellDebug1HiiHandle, L"ImageExecutionTable");
265 }
266 } else {
267 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_NOT_FOUND), gShellDebug1HiiHandle, L"ImageExecutionTable");
268 }
269
270 return (ShellStatus);
271}
272
280 IN UINT64 Address
281 )
282{
283 SHELL_STATUS ShellStatus;
284 EFI_STATUS Status;
285 EFI_GUID *EntryGuid;
286 CHAR16 *GuidName;
287 UINTN Profile;
288 EFI_CONFORMANCE_PROFILES_TABLE *ConfProfTable;
289
290 ShellStatus = SHELL_SUCCESS;
291
292 if (Address != 0) {
293 EfiGetSystemConfigurationTable (&gEfiConfProfilesTableGuid, (VOID **)&ConfProfTable);
294
295 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_CONF_PRO_TABLE), gShellDebug1HiiHandle);
296
297 EntryGuid = (EFI_GUID *)(ConfProfTable + 1);
298
299 for (Profile = 0; Profile < ConfProfTable->NumberOfProfiles; Profile++, EntryGuid++) {
300 GuidName = L"Unknown_Profile";
301
302 if (CompareGuid (EntryGuid, &gEfiConfProfilesUefiSpecGuid)) {
303 GuidName = L"EFI_CONFORMANCE_PROFILE_UEFI_SPEC_GUID";
304 }
305
306 if (CompareGuid (EntryGuid, &gEfiConfProfilesEbbrSpec21Guid)) {
307 GuidName = L"EBBR_2.1";
308 }
309
310 if (CompareGuid (EntryGuid, &gEfiConfProfilesEbbrSpec22Guid)) {
311 GuidName = L"EBBR_2.2";
312 }
313
314 Status = ShellPrintHiiEx (
315 -1,
316 -1,
317 NULL,
318 STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
319 gShellDebug1HiiHandle,
320 GuidName,
321 EntryGuid
322 );
323 }
324
325 if (EFI_ERROR (Status)) {
326 ShellStatus = SHELL_ABORTED;
327 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), gShellDebug1HiiHandle, L"ComformanceProfilesTable");
328 }
329 } else {
330 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_CONF_PRO_TABLE), gShellDebug1HiiHandle);
332 -1,
333 -1,
334 NULL,
335 STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
336 gShellDebug1HiiHandle,
337 L"EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID",
338 &gEfiConfProfilesUefiSpecGuid
339 );
340 }
341
342 return (ShellStatus);
343}
344
345STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
346 { L"-mmio", TypeFlag },
347 { L"-verbose", TypeFlag },
348 { NULL, TypeMax }
349};
350
358EFIAPI
360 IN EFI_HANDLE ImageHandle,
361 IN EFI_SYSTEM_TABLE *SystemTable
362 )
363{
364 EFI_STATUS Status;
365 LIST_ENTRY *Package;
366 CHAR16 *ProblemParam;
367 SHELL_STATUS ShellStatus;
368 VOID *Address;
369 UINT64 Size;
370 CONST CHAR16 *Temp1;
371 UINT64 AcpiTableAddress;
372 UINT64 Acpi20TableAddress;
373 UINT64 SalTableAddress;
374 UINT64 SmbiosTableAddress;
375 UINT64 MpsTableAddress;
376 UINT64 DtbTableAddress;
377 UINT64 MemoryAttributesTableAddress;
378 UINT64 RtPropertiesTableAddress;
379 UINT64 SystemResourceTableAddress;
380 UINT64 DebugImageInfoTableAddress;
381 UINT64 ImageExecutionTableAddress;
382 UINT64 JsonConfigDataTableAddress;
383 UINT64 JsonCapsuleDataTableAddress;
384 UINT64 JsonCapsuleResultTableAddress;
385 UINT64 MemoryRangeCapsuleAddress;
386 UINT64 HiiDatabaseExportBufferAddress;
387 UINT64 ConformanceProfileTableAddress;
388 UINTN TableWalker;
389
390 ShellStatus = SHELL_SUCCESS;
391 Status = EFI_SUCCESS;
392 Address = NULL;
393 Size = 0;
394
395 //
396 // initialize the shell lib (we must be in non-auto-init...)
397 //
398 Status = ShellInitialize ();
399 ASSERT_EFI_ERROR (Status);
400
401 Status = CommandInit ();
402 ASSERT_EFI_ERROR (Status);
403
404 //
405 // parse the command line
406 //
407 Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
408 if (EFI_ERROR (Status)) {
409 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam != NULL)) {
410 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmem", ProblemParam);
411 FreePool (ProblemParam);
412 ShellStatus = SHELL_INVALID_PARAMETER;
413 } else {
414 ASSERT (FALSE);
415 }
416 } else {
417 if (ShellCommandLineGetCount (Package) > 3) {
418 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmem");
419 ShellStatus = SHELL_INVALID_PARAMETER;
420 } else {
421 Temp1 = ShellCommandLineGetRawValue (Package, 1);
422 if (Temp1 == NULL) {
423 Address = gST;
424 Size = sizeof (*gST);
425 } else {
426 if (!ShellIsHexOrDecimalNumber (Temp1, TRUE, FALSE) || EFI_ERROR (ShellConvertStringToUint64 (Temp1, (UINT64 *)&Address, TRUE, FALSE))) {
427 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
428 ShellStatus = SHELL_INVALID_PARAMETER;
429 }
430
431 Temp1 = ShellCommandLineGetRawValue (Package, 2);
432 if (Temp1 == NULL) {
433 Size = 512;
434 } else {
435 if (!ShellIsHexOrDecimalNumber (Temp1, FALSE, FALSE) || EFI_ERROR (ShellConvertStringToUint64 (Temp1, &Size, TRUE, FALSE))) {
436 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
437 ShellStatus = SHELL_INVALID_PARAMETER;
438 }
439 }
440 }
441 }
442
443 if (ShellStatus == SHELL_SUCCESS) {
444 if (!ShellCommandLineGetFlag (Package, L"-mmio")) {
445 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size);
446 DumpHex (2, (UINTN)Address, (UINTN)Size, Address);
447 if (Address == (VOID *)gST) {
448 Acpi20TableAddress = 0;
449 AcpiTableAddress = 0;
450 SalTableAddress = 0;
451 SmbiosTableAddress = 0;
452 MpsTableAddress = 0;
453 DtbTableAddress = 0;
454 MemoryAttributesTableAddress = 0;
455 RtPropertiesTableAddress = 0;
456 SystemResourceTableAddress = 0;
457 DebugImageInfoTableAddress = 0;
458 ImageExecutionTableAddress = 0;
459 JsonConfigDataTableAddress = 0;
460 JsonCapsuleDataTableAddress = 0;
461 JsonCapsuleResultTableAddress = 0;
462 MemoryRangeCapsuleAddress = 0;
463 HiiDatabaseExportBufferAddress = 0;
464 ConformanceProfileTableAddress = 0;
465 for (TableWalker = 0; TableWalker < gST->NumberOfTableEntries; TableWalker++) {
466 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi20TableGuid)) {
467 Acpi20TableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
468 continue;
469 }
470
471 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiAcpi10TableGuid)) {
472 AcpiTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
473 continue;
474 }
475
476 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSmbiosTableGuid)) {
477 SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
478 continue;
479 }
480
481 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSmbios3TableGuid)) {
482 SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
483 continue;
484 }
485
486 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) {
487 MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
488 continue;
489 }
490
491 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMemoryAttributesTableGuid)) {
492 MemoryAttributesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
493 continue;
494 }
495
496 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiRtPropertiesTableGuid)) {
497 RtPropertiesTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
498 continue;
499 }
500
501 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSystemResourceTableGuid)) {
502 SystemResourceTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
503 continue;
504 }
505
506 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiDebugImageInfoTableGuid)) {
507 DebugImageInfoTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
508 continue;
509 }
510
511 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiImageSecurityDatabaseGuid)) {
512 ImageExecutionTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
513 continue;
514 }
515
516 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonConfigDataTableGuid)) {
517 JsonConfigDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
518 continue;
519 }
520
521 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleDataTableGuid)) {
522 JsonCapsuleDataTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
523 continue;
524 }
525
526 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiJsonCapsuleResultTableGuid)) {
527 JsonCapsuleResultTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
528 continue;
529 }
530
531 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiHiiDatabaseProtocolGuid)) {
532 HiiDatabaseExportBufferAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
533 continue;
534 }
535
536 if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiConfProfilesTableGuid)) {
537 ConformanceProfileTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
538 continue;
539 }
540 }
541
543 -1,
544 -1,
545 NULL,
546 STRING_TOKEN (STR_DMEM_SYSTEM_TABLE),
547 gShellDebug1HiiHandle,
548 (UINT64)(UINTN)Address,
551 (UINT64)(UINTN)gST->ConIn,
552 (UINT64)(UINTN)gST->ConOut,
553 (UINT64)(UINTN)gST->StdErr,
554 (UINT64)(UINTN)gST->RuntimeServices,
555 (UINT64)(UINTN)gST->BootServices,
556 SalTableAddress,
557 AcpiTableAddress,
558 Acpi20TableAddress,
559 MpsTableAddress,
560 SmbiosTableAddress,
561 DtbTableAddress,
562 MemoryAttributesTableAddress,
563 RtPropertiesTableAddress,
564 SystemResourceTableAddress,
565 DebugImageInfoTableAddress,
566 ImageExecutionTableAddress,
567 JsonConfigDataTableAddress,
568 JsonCapsuleDataTableAddress,
569 JsonCapsuleResultTableAddress,
570 MemoryRangeCapsuleAddress,
571 HiiDatabaseExportBufferAddress,
572 ConformanceProfileTableAddress
573 );
574 }
575
576 if (ShellCommandLineGetFlag (Package, L"-verbose")) {
577 if (ShellStatus == SHELL_SUCCESS) {
578 ShellStatus = DisplayRtProperties (RtPropertiesTableAddress);
579 }
580
581 if (ShellStatus == SHELL_SUCCESS) {
582 ShellStatus = DisplayImageExecutionEntries (ImageExecutionTableAddress);
583 }
584
585 if (ShellStatus == SHELL_SUCCESS) {
586 ShellStatus = DisplayConformanceProfiles (ConformanceProfileTableAddress);
587 }
588 }
589 } else {
590 ShellStatus = DisplayMmioMemory (Address, (UINTN)Size);
591 }
592 }
593
595 }
596
597 return (ShellStatus);
598}
UINT64 UINTN
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
Definition: String.c:72
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
Definition: String.c:30
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
SHELL_STATUS DisplayConformanceProfiles(IN UINT64 Address)
Definition: Dmem.c:279
EFI_STATUS GetImageExecutionInfo()
Definition: Dmem.c:176
SHELL_STATUS DisplayRtProperties(IN UINT64 Address)
Definition: Dmem.c:94
SHELL_STATUS DisplayMmioMemory(IN CONST VOID *Address, IN CONST UINTN Size)
Definition: Dmem.c:52
EFI_STATUS GetBaseName(IN CHAR16 *FileName, OUT CHAR16 **BaseName)
Definition: Dmem.c:150
SHELL_STATUS DisplayImageExecutionEntries(IN UINT64 Address)
Definition: Dmem.c:250
CHAR16 MakePrintable(IN CONST CHAR16 Char)
Definition: Dmem.c:34
SHELL_STATUS EFIAPI ShellCommandRunDmem(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Dmem.c:359
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
SHELL_STATUS
Definition: Shell.h:21
@ SHELL_OUT_OF_RESOURCES
Definition: Shell.h:73
@ SHELL_ABORTED
Definition: Shell.h:128
@ SHELL_SUCCESS
Definition: Shell.h:25
@ SHELL_NOT_FOUND
Definition: Shell.h:101
@ SHELL_INVALID_PARAMETER
Definition: Shell.h:35
EFI_STATUS EFIAPI CommandInit(VOID)
VOID EFIAPI DumpHex(IN UINTN Indent, IN UINTN Offset, IN UINTN DataSize, IN VOID *UserData)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
Definition: ShellLib.h:755
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
BOOLEAN EFIAPI ShellIsHexOrDecimalNumber(IN CONST CHAR16 *String, IN CONST BOOLEAN ForceHex, IN CONST BOOLEAN StopAtSpace)
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
Definition: UefiShellLib.c:532
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
UINTN EFIAPI ShellCommandLineGetCount(IN CONST LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellConvertStringToUint64(IN CONST CHAR16 *String, OUT UINT64 *Value, IN CONST BOOLEAN ForceHex, IN CONST BOOLEAN StopAtSpace)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_SYSTEM_TABLE * gST
EFI_BOOT_SERVICES * gBS
#define STRING_TOKEN(t)
EFI_STATUS EFIAPI EfiGetSystemConfigurationTable(IN EFI_GUID *TableGuid, OUT VOID **Table)
Definition: UefiLib.c:82
EFI_IMAGE_EXECUTION_ACTION Action
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * StdErr
Definition: UefiSpec.h:2075
EFI_BOOT_SERVICES * BootServices
Definition: UefiSpec.h:2083
EFI_CONFIGURATION_TABLE * ConfigurationTable
Definition: UefiSpec.h:2092
EFI_RUNTIME_SERVICES * RuntimeServices
Definition: UefiSpec.h:2079
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn
Definition: UefiSpec.h:2053
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut
Definition: UefiSpec.h:2064
EFI_TABLE_HEADER Hdr
Definition: UefiSpec.h:2032
UINTN NumberOfTableEntries
Definition: UefiSpec.h:2087
Definition: Base.h:213