3 Copyright (c) 2015, ARM Ltd. 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 <Library/UefiLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Library/UefiRuntimeServicesTableLib.h>
20 #include <Library/PcdLib.h>
21 #include <Library/DevicePathLib.h>
22 #include <Library/MemoryAllocationLib.h>
23 #include <Library/HiiLib.h>
24 #include <Library/BdsLib.h>
25 #include <Library/ShellLib.h>
27 #include <Protocol/DevicePathToText.h>
28 #include <Protocol/DevicePathFromText.h>
29 #include <Protocol/DevicePath.h>
30 #include <Protocol/EfiShell.h>
31 #include <Protocol/EfiShellDynamicCommand.h>
41 STATIC SHELL_STATUS EFIAPI
ShellDynCmdSetFdtHandler (
42 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
43 IN EFI_SYSTEM_TABLE
*SystemTable
,
44 IN EFI_SHELL_PARAMETERS_PROTOCOL
*ShellParameters
,
45 IN EFI_SHELL_PROTOCOL
*Shell
48 STATIC CHAR16
* EFIAPI
ShellDynCmdSetFdtGetHelp (
49 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
50 IN CONST CHAR8
*Language
53 STATIC VOID
DisplayFdtDevicePaths (
57 STATIC SHELL_STATUS
UpdateFdtTextDevicePath (
58 IN EFI_SHELL_PROTOCOL
*Shell
,
59 IN CONST CHAR16
*FilePath
62 STATIC SHELL_STATUS
EfiCodeToShellCode (
70 STATIC CONST EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL mShellDynCmdProtocolSetFdt
= {
71 L
"setfdt", // Name of the command
72 ShellDynCmdSetFdtHandler
, // Handler
73 ShellDynCmdSetFdtGetHelp
// GetHelp
76 STATIC CONST EFI_GUID mFdtPlatformDxeHiiGuid
= {
77 0x8afa7610, 0x62b1, 0x46aa,
78 {0xb5, 0x34, 0xc3, 0xde, 0xff, 0x39, 0x77, 0x8c}
80 STATIC CONST SHELL_PARAM_ITEM ParamList
[] = {
85 STATIC EFI_HANDLE mFdtPlatformDxeHiiHandle
;
88 Install the FDT specified by its device path in text form.
90 @param[in] TextDevicePath Device path of the FDT to install in text form
92 @retval EFI_SUCCESS The FDT was installed.
93 @retval EFI_NOT_FOUND Failed to locate a protocol or a file.
94 @retval EFI_INVALID_PARAMETER Invalid device path.
95 @retval EFI_UNSUPPORTED Device path not supported.
96 @retval EFI_OUT_OF_RESOURCES An allocation failed.
101 IN CONST CHAR16
* TextDevicePath
105 EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL
*EfiDevicePathFromTextProtocol
;
106 EFI_DEVICE_PATH
*DevicePath
;
107 EFI_PHYSICAL_ADDRESS FdtBlobBase
;
110 EFI_PHYSICAL_ADDRESS FdtConfigurationTableBase
;
112 Status
= gBS
->LocateProtocol (
113 &gEfiDevicePathFromTextProtocolGuid
,
115 (VOID
**)&EfiDevicePathFromTextProtocol
117 if (EFI_ERROR (Status
)) {
118 DEBUG ((EFI_D_ERROR
, "InstallFdt() - Failed to locate EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL protocol\n"));
122 DevicePath
= (EFI_DEVICE_PATH
*)EfiDevicePathFromTextProtocol
->ConvertTextToDevicePath (TextDevicePath
);
123 if (DevicePath
== NULL
) {
124 return EFI_INVALID_PARAMETER
;
128 // Load the FDT given its device path.
129 // This operation may fail if the device path is not supported.
133 Status
= BdsLoadImage (DevicePath
, AllocateAnyPages
, &FdtBlobBase
, &FdtBlobSize
);
134 if (EFI_ERROR (Status
)) {
138 // Check the FDT header is valid. We only make this check in DEBUG mode in
139 // case the FDT header change on production device and this ASSERT() becomes
141 ASSERT (fdt_check_header ((VOID
*)(UINTN
)FdtBlobBase
) == 0);
144 // Ensure the Size of the Device Tree is smaller than the size of the read file
146 ASSERT ((UINTN
)fdt_totalsize ((VOID
*)(UINTN
)FdtBlobBase
) <= FdtBlobSize
);
149 // Store the FDT as Runtime Service Data to prevent the Kernel from
150 // overwritting its data.
152 NumPages
= EFI_SIZE_TO_PAGES (FdtBlobSize
);
153 Status
= gBS
->AllocatePages (
154 AllocateAnyPages
, EfiRuntimeServicesData
,
155 NumPages
, &FdtConfigurationTableBase
157 if (EFI_ERROR (Status
)) {
161 (VOID
*)(UINTN
)FdtConfigurationTableBase
,
162 (VOID
*)(UINTN
)FdtBlobBase
,
167 // Install the FDT into the Configuration Table
169 Status
= gBS
->InstallConfigurationTable (
171 (VOID
*)(UINTN
)FdtConfigurationTableBase
173 if (EFI_ERROR (Status
)) {
174 gBS
->FreePages (FdtConfigurationTableBase
, NumPages
);
178 if (FdtBlobBase
!= 0) {
179 gBS
->FreePages (FdtBlobBase
, NumPages
);
181 FreePool (DevicePath
);
187 Main entry point of the FDT platform driver.
189 @param[in] ImageHandle The firmware allocated handle for the present driver
191 @param[in] *SystemTable A pointer to the EFI System table.
193 @retval EFI_SUCCESS The driver was initialized.
194 @retval EFI_OUT_OF_RESOURCES The "End of DXE" event could not be allocated or
195 there was not enough memory in pool to install
196 the Shell Dynamic Command protocol.
197 @retval EFI_LOAD_ERROR Unable to add the HII package.
201 FdtPlatformEntryPoint (
202 IN EFI_HANDLE ImageHandle
,
203 IN EFI_SYSTEM_TABLE
*SystemTable
209 // Install the Device Tree from its expected location
211 Status
= RunFdtInstallation (NULL
);
212 if (EFI_ERROR (Status
)) {
217 // If the development features are enabled, install the dynamic shell
218 // command "setfdt" to be able to define a device path for the FDT
219 // that has precedence over the device paths defined by
220 // "PcdFdtDevicePaths".
223 if (FeaturePcdGet (PcdOverridePlatformFdt
)) {
225 // Register the strings for the user interface in the HII Database.
226 // This shows the way to the multi-language support, even if
227 // only the English language is actually supported. The strings to register
228 // are stored in the "FdtPlatformDxeStrings[]" array. This array is
229 // built by the building process from the "*.uni" file associated to
230 // the present driver (cf. FdtPlatfromDxe.inf). Examine your Build
231 // folder under your package's DEBUG folder and you will find the array
232 // defined in a xxxStrDefs.h file.
234 mFdtPlatformDxeHiiHandle
= HiiAddPackages (
235 &mFdtPlatformDxeHiiGuid
,
237 FdtPlatformDxeStrings
,
241 if (mFdtPlatformDxeHiiHandle
!= NULL
) {
242 Status
= gBS
->InstallMultipleProtocolInterfaces (
244 &gEfiShellDynamicCommandProtocolGuid
,
245 &mShellDynCmdProtocolSetFdt
,
248 if (EFI_ERROR (Status
)) {
249 HiiRemovePackages (mFdtPlatformDxeHiiHandle
);
252 Status
= EFI_LOAD_ERROR
;
254 if (EFI_ERROR (Status
)) {
257 "Unable to install \"setfdt\" EFI Shell command - %r \n",
267 Run the FDT installation process.
269 Loop in priority order over the device paths from which the FDT has
270 been asked to be retrieved for. For each device path, try to install
271 the FDT. Stop as soon as an installation succeeds.
273 @retval EFI_SUCCESS The FDT was installed.
274 @retval EFI_NOT_FOUND Failed to locate a protocol or a file.
275 @retval EFI_INVALID_PARAMETER Invalid device path.
276 @retval EFI_UNSUPPORTED Device path not supported.
277 @retval EFI_OUT_OF_RESOURCES An allocation failed.
289 CHAR16
*TextDevicePathStart
;
290 CHAR16
*TextDevicePathSeparator
;
291 UINTN TextDevicePathLen
;
292 CHAR16
*TextDevicePath
;
295 // For development purpose, if enabled through the "PcdOverridePlatformFdt"
296 // feature PCD, try first to install the FDT specified by the device path in
297 // text form stored in the "Fdt" UEFI variable.
299 if (FeaturePcdGet (PcdOverridePlatformFdt
)) {
302 Status
= gRT
->GetVariable (
311 // Keep going only if the "Fdt" variable is defined.
314 if (Status
== EFI_BUFFER_TOO_SMALL
) {
315 Data
= AllocatePool (DataSize
);
317 Status
= EFI_OUT_OF_RESOURCES
;
319 Status
= gRT
->GetVariable (
326 if (!EFI_ERROR (Status
)) {
327 Status
= InstallFdt ((CHAR16
*)Data
);
328 if (!EFI_ERROR (Status
)) {
331 "Installation of the FDT using the device path <%s> completed.\n",
339 if (EFI_ERROR (Status
)) {
342 "Installation of the FDT specified by the \"Fdt\" UEFI variable failed - %r\n",
352 // Loop over the device path list provided by "PcdFdtDevicePaths". The device
353 // paths are in text form and separated by a semi-colon.
356 Status
= EFI_SUCCESS
;
357 for (TextDevicePathStart
= (CHAR16
*)PcdGetPtr (PcdFdtDevicePaths
);
358 *TextDevicePathStart
!= L
'\0' ; ) {
359 TextDevicePathSeparator
= StrStr (TextDevicePathStart
, L
";");
362 // Last device path of the list
364 if (TextDevicePathSeparator
== NULL
) {
365 TextDevicePath
= TextDevicePathStart
;
367 TextDevicePathLen
= (UINTN
)(TextDevicePathSeparator
- TextDevicePathStart
);
368 TextDevicePath
= AllocateCopyPool (
369 (TextDevicePathLen
+ 1) * sizeof (CHAR16
),
372 if (TextDevicePath
== NULL
) {
373 Status
= EFI_OUT_OF_RESOURCES
;
374 DEBUG ((EFI_D_ERROR
, "Memory allocation error during FDT installation process.\n"));
377 TextDevicePath
[TextDevicePathLen
] = L
'\0';
380 Status
= InstallFdt (TextDevicePath
);
381 if (EFI_ERROR (Status
)) {
382 DEBUG ((EFI_D_WARN
, "Installation of the FDT using the device path <%s> failed - %r.\n",
383 TextDevicePath
, Status
386 DEBUG ((EFI_D_WARN
, "Installation of the FDT using the device path <%s> completed.\n",
391 if (TextDevicePathSeparator
== NULL
) {
394 FreePool (TextDevicePath
);
395 if (!EFI_ERROR (Status
)) {
398 TextDevicePathStart
= TextDevicePathSeparator
+ 1;
402 if (EFI_ERROR (Status
)) {
403 DEBUG ((EFI_D_ERROR
, "Failed to install the FDT - %r.\n", Status
));
410 This is the shell command "setfdt" handler function. This function handles
411 the command when it is invoked in the shell.
413 @param[in] This The instance of the
414 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
415 @param[in] SystemTable The pointer to the UEFI system table.
416 @param[in] ShellParameters The parameters associated with the command.
417 @param[in] Shell The instance of the shell protocol used in the
418 context of processing this command.
420 @return SHELL_SUCCESS The operation was successful.
421 @return SHELL_ABORTED Operation aborted due to internal error.
422 @return SHELL_INVALID_PARAMETER The parameters of the command are not valid.
423 @return SHELL_INVALID_PARAMETER The EFI Shell file path is not valid.
424 @return SHELL_NOT_FOUND Failed to locate a protocol or a file.
425 @return SHELL_UNSUPPORTED Device path not supported.
426 @return SHELL_OUT_OF_RESOURCES A memory allocation failed.
427 @return SHELL_DEVICE_ERROR The "Fdt" variable could not be saved due to a hardware failure.
428 @return SHELL_ACCESS_DENIED The "Fdt" variable is read-only.
429 @return SHELL_ACCESS_DENIED The "Fdt" variable cannot be deleted.
430 @return SHELL_ACCESS_DENIED The "Fdt" variable could not be written due to security violation.
436 ShellDynCmdSetFdtHandler (
437 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
438 IN EFI_SYSTEM_TABLE
*SystemTable
,
439 IN EFI_SHELL_PARAMETERS_PROTOCOL
*ShellParameters
,
440 IN EFI_SHELL_PROTOCOL
*Shell
443 SHELL_STATUS ShellStatus
;
445 LIST_ENTRY
*ParamPackage
;
447 CONST CHAR16
*ValueStr
;
449 ShellStatus
= SHELL_SUCCESS
;
454 // Install the Shell and Shell Parameters Protocols on the driver
455 // image. This is necessary for the initialisation of the Shell
456 // Library to succeed in the next step.
458 Status
= gBS
->InstallMultipleProtocolInterfaces (
460 &gEfiShellProtocolGuid
, Shell
,
461 &gEfiShellParametersProtocolGuid
, ShellParameters
,
464 if (EFI_ERROR (Status
)) {
465 return SHELL_ABORTED
;
469 // Initialise the Shell Library as we are going to use it.
470 // Assert that the return code is EFI_SUCCESS as it should.
471 // To anticipate any change is the codes returned by
472 // ShellInitialize(), leave in case of error.
474 Status
= ShellInitialize ();
475 if (EFI_ERROR (Status
)) {
476 ASSERT_EFI_ERROR (Status
);
477 return SHELL_ABORTED
;
480 Status
= ShellCommandLineParse (ParamList
, &ParamPackage
, NULL
, TRUE
);
481 if (!EFI_ERROR (Status
)) {
482 switch (ShellCommandLineGetCount (ParamPackage
)) {
485 // Case "setfdt" or "setfdt -i"
487 if (!ShellCommandLineGetFlag (ParamPackage
, L
"-i")) {
488 DisplayFdtDevicePaths ();
494 // Case "setfdt file_path" or
495 // "setfdt -i file_path" or
496 // "setfdt file_path -i"
502 Status
= EFI_INVALID_PARAMETER
;
505 if (EFI_ERROR (Status
)) {
506 ShellStatus
= EfiCodeToShellCode (Status
);
509 STRING_TOKEN (STR_SETFDT_ERROR
),
510 mFdtPlatformDxeHiiHandle
,
517 // Update the preferred device path for the FDT if asked for.
520 ValueStr
= ShellCommandLineGetRawValue (ParamPackage
, 1);
523 STRING_TOKEN (STR_SETFDT_UPDATING
),
524 mFdtPlatformDxeHiiHandle
526 ShellStatus
= UpdateFdtTextDevicePath (Shell
, ValueStr
);
527 if (ShellStatus
!= SHELL_SUCCESS
) {
533 // Run the FDT installation process if asked for.
535 if (ShellCommandLineGetFlag (ParamPackage
, L
"-i")) {
538 STRING_TOKEN (STR_SETFDT_INSTALLING
),
539 mFdtPlatformDxeHiiHandle
541 Status
= RunFdtInstallation ();
542 ShellStatus
= EfiCodeToShellCode (Status
);
543 if (!EFI_ERROR (Status
)) {
546 STRING_TOKEN (STR_SETFDT_INSTALL_SUCCEEDED
),
547 mFdtPlatformDxeHiiHandle
550 if (Status
== EFI_INVALID_PARAMETER
) {
553 STRING_TOKEN (STR_SETFDT_INVALID_DEVICE_PATH
),
554 mFdtPlatformDxeHiiHandle
559 STRING_TOKEN (STR_SETFDT_ERROR
),
560 mFdtPlatformDxeHiiHandle
,
564 DisplayFdtDevicePaths ();
569 gBS
->UninstallMultipleProtocolInterfaces (
571 &gEfiShellProtocolGuid
, Shell
,
572 &gEfiShellParametersProtocolGuid
, ShellParameters
,
575 ShellCommandLineFreeVarList (ParamPackage
);
581 This is the shell command "setfdt" help handler function. This
582 function returns the formatted help for the "setfdt" command.
583 The format matchs that in Appendix B of the revision 2.1 of the
584 UEFI Shell Specification.
586 @param[in] This The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
587 @param[in] Language The pointer to the language string to use.
589 @return CHAR16* Pool allocated help string, must be freed by caller.
594 ShellDynCmdSetFdtGetHelp (
595 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
596 IN CONST CHAR8
*Language
600 // This allocates memory. The caller has to free the allocated memory.
602 return HiiGetString (
603 mFdtPlatformDxeHiiHandle
,
604 STRING_TOKEN (STR_GET_HELP_SETFDT
),
610 Display FDT device paths.
612 Display in text form the device paths used to install the FDT from the
613 highest to the lowest priority.
618 DisplayFdtDevicePaths (
624 CHAR16
*TextDevicePath
;
625 CHAR16
*TextDevicePaths
;
626 CHAR16
*TextDevicePathSeparator
;
630 STRING_TOKEN (STR_SETFDT_DEVICE_PATH_LIST
),
631 mFdtPlatformDxeHiiHandle
634 if (FeaturePcdGet (PcdOverridePlatformFdt
)) {
636 Status
= gRT
->GetVariable (
645 // Keep going only if the "Fdt" variable is defined.
648 if (Status
== EFI_BUFFER_TOO_SMALL
) {
649 TextDevicePath
= AllocatePool (DataSize
);
650 if (TextDevicePath
== NULL
) {
654 Status
= gRT
->GetVariable (
661 if (!EFI_ERROR (Status
)) {
664 STRING_TOKEN (STR_SETFDT_DEVICE_PATH
),
665 mFdtPlatformDxeHiiHandle
,
670 FreePool (TextDevicePath
);
675 // Loop over the device path list provided by "PcdFdtDevicePaths". The device
676 // paths are in text form and separated by a semi-colon.
679 TextDevicePaths
= AllocateCopyPool (
680 StrSize ((CHAR16
*)PcdGetPtr (PcdFdtDevicePaths
)),
681 (CHAR16
*)PcdGetPtr (PcdFdtDevicePaths
)
683 if (TextDevicePaths
== NULL
) {
687 for (TextDevicePath
= TextDevicePaths
;
688 *TextDevicePath
!= L
'\0' ; ) {
689 TextDevicePathSeparator
= StrStr (TextDevicePath
, L
";");
691 if (TextDevicePathSeparator
!= NULL
) {
692 *TextDevicePathSeparator
= L
'\0';
697 STRING_TOKEN (STR_SETFDT_DEVICE_PATH
),
698 mFdtPlatformDxeHiiHandle
,
702 if (TextDevicePathSeparator
== NULL
) {
705 TextDevicePath
= TextDevicePathSeparator
+ 1;
708 FreePool (TextDevicePaths
);
713 Update the text device path stored in the "Fdt" UEFI variable given
714 an EFI Shell file path or a text device path.
716 This function is a subroutine of the ShellDynCmdSetFdtHandler() function
717 to make its code easier to read.
719 @param[in] Shell The instance of the shell protocol used in the
720 context of processing the "setfdt" command.
721 @param[in] FilePath EFI Shell path or the device path to the FDT file.
723 @return SHELL_SUCCESS The text device path was succesfully updated.
724 @return SHELL_INVALID_PARAMETER The Shell file path is not valid.
725 @return SHELL_OUT_OF_RESOURCES A memory allocation failed.
726 @return SHELL_DEVICE_ERROR The "Fdt" variable could not be saved due to a hardware failure.
727 @return SHELL_ACCESS_DENIED The "Fdt" variable is read-only.
728 @return SHELL_ACCESS_DENIED The "Fdt" variable cannot be deleted.
729 @return SHELL_ACCESS_DENIED The "Fdt" variable could not be written due to security violation.
730 @return SHELL_NOT_FOUND Device path to text protocol not found.
731 @return SHELL_ABORTED Operation aborted.
736 UpdateFdtTextDevicePath (
737 IN EFI_SHELL_PROTOCOL
*Shell
,
738 IN CONST CHAR16
*FilePath
742 EFI_DEVICE_PATH
*DevicePath
;
743 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
*EfiDevicePathToTextProtocol
;
744 CHAR16
*TextDevicePath
;
745 CHAR16
*FdtVariableValue
;
746 EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL
*EfiDevicePathFromTextProtocol
;
747 SHELL_STATUS ShellStatus
;
749 ASSERT (FilePath
!= NULL
);
751 TextDevicePath
= NULL
;
752 FdtVariableValue
= NULL
;
754 if (*FilePath
!= L
'\0') {
755 DevicePath
= Shell
->GetDevicePathFromFilePath (FilePath
);
756 if (DevicePath
!= NULL
) {
757 Status
= gBS
->LocateProtocol (
758 &gEfiDevicePathToTextProtocolGuid
,
760 (VOID
**)&EfiDevicePathToTextProtocol
762 if (EFI_ERROR (Status
)) {
766 TextDevicePath
= EfiDevicePathToTextProtocol
->ConvertDevicePathToText (
771 if (TextDevicePath
== NULL
) {
772 Status
= EFI_OUT_OF_RESOURCES
;
775 FdtVariableValue
= TextDevicePath
;
778 // Try to convert back the EFI Device Path String into a EFI device Path
779 // to ensure the format is valid
781 Status
= gBS
->LocateProtocol (
782 &gEfiDevicePathFromTextProtocolGuid
,
784 (VOID
**)&EfiDevicePathFromTextProtocol
786 if (EFI_ERROR (Status
)) {
790 DevicePath
= EfiDevicePathFromTextProtocol
->ConvertTextToDevicePath (
793 if (DevicePath
== NULL
) {
794 Status
= EFI_INVALID_PARAMETER
;
797 FdtVariableValue
= (CHAR16
*)FilePath
;
801 Status
= gRT
->SetVariable (
804 EFI_VARIABLE_RUNTIME_ACCESS
|
805 EFI_VARIABLE_NON_VOLATILE
|
806 EFI_VARIABLE_BOOTSERVICE_ACCESS
,
807 (FdtVariableValue
!= NULL
) ?
808 StrSize (FdtVariableValue
) : 0,
813 ShellStatus
= EfiCodeToShellCode (Status
);
814 if (!EFI_ERROR (Status
)) {
815 if (FdtVariableValue
!= NULL
) {
818 STRING_TOKEN (STR_SETFDT_UPDATE_SUCCEEDED
),
819 mFdtPlatformDxeHiiHandle
,
825 STRING_TOKEN (STR_SETFDT_UPDATE_DELETED
),
826 mFdtPlatformDxeHiiHandle
,
831 if (Status
== EFI_INVALID_PARAMETER
) {
834 STRING_TOKEN (STR_SETFDT_INVALID_PATH
),
835 mFdtPlatformDxeHiiHandle
,
841 STRING_TOKEN (STR_SETFDT_ERROR
),
842 mFdtPlatformDxeHiiHandle
,
848 if (DevicePath
!= NULL
) {
849 FreePool (DevicePath
);
851 if (TextDevicePath
!= NULL
) {
852 FreePool (TextDevicePath
);
859 Transcode one of the EFI return code used by the model into an EFI Shell return code.
861 @param[in] Status EFI return code.
863 @return Transcoded EFI Shell return code.
872 SHELL_STATUS ShellStatus
;
876 ShellStatus
= SHELL_SUCCESS
;
879 case EFI_INVALID_PARAMETER
:
880 ShellStatus
= SHELL_INVALID_PARAMETER
;
883 case EFI_UNSUPPORTED
:
884 ShellStatus
= SHELL_UNSUPPORTED
;
887 case EFI_DEVICE_ERROR
:
888 ShellStatus
= SHELL_DEVICE_ERROR
;
891 case EFI_WRITE_PROTECTED
:
892 case EFI_SECURITY_VIOLATION
:
893 ShellStatus
= SHELL_ACCESS_DENIED
;
896 case EFI_OUT_OF_RESOURCES
:
897 ShellStatus
= SHELL_OUT_OF_RESOURCES
;
901 ShellStatus
= SHELL_NOT_FOUND
;
905 ShellStatus
= SHELL_ABORTED
;