TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/ShellLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiHiiServicesLib.h>
#include <Guid/LinuxEfiInitrdMedia.h>
#include <Protocol/DevicePath.h>
#include <Protocol/HiiPackageList.h>
#include <Protocol/LoadFile2.h>
#include <Protocol/ShellDynamicCommand.h>
Go to the source code of this file.
Data Structures | |
struct | SINGLE_NODE_VENDOR_MEDIA_DEVPATH |
Provides 'initrd' dynamic UEFI shell command to load a Linux initrd via its GUIDed vendor media path
Copyright (c) 2020, Arm, Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_STATUS CacheInitrdFile | ( | IN SHELL_FILE_HANDLE | FileHandle | ) |
Definition at line 170 of file LinuxInitrdDynamicShellCommand.c.
STATIC VOID FreeInitrdFile | ( | VOID | ) |
Definition at line 158 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_HII_HANDLE InitializeHiiPackage | ( | EFI_HANDLE | ImageHandle | ) |
Retrieve HII package list from ImageHandle and publish to HII database.
ImageHandle | The image handle of the process. |
Definition at line 440 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_STATUS EFIAPI InitrdLoadFile2 | ( | IN EFI_LOAD_FILE2_PROTOCOL * | This, |
IN EFI_DEVICE_PATH_PROTOCOL * | FilePath, | ||
IN BOOLEAN | BootPolicy, | ||
IN OUT UINTN * | BufferSize, | ||
OUT VOID *Buffer | OPTIONAL | ||
) |
Definition at line 90 of file LinuxInitrdDynamicShellCommand.c.
STATIC BOOLEAN IsOtherInitrdDevicePathAlreadyInstalled | ( | VOID | ) |
Definition at line 58 of file LinuxInitrdDynamicShellCommand.c.
SHELL_STATUS EFIAPI LinuxInitrdCommandHandler | ( | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL * | This, |
IN EFI_SYSTEM_TABLE * | SystemTable, | ||
IN EFI_SHELL_PARAMETERS_PROTOCOL * | ShellParameters, | ||
IN EFI_SHELL_PROTOCOL * | Shell | ||
) |
This is the shell command handler function pointer callback type. This function handles the command when it is invoked in the shell.
[in] | This | The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL. |
[in] | SystemTable | The pointer to the system table. |
[in] | ShellParameters | The parameters associated with the command. |
[in] | Shell | The instance of the shell protocol used in the context of processing this command. |
Definition at line 385 of file LinuxInitrdDynamicShellCommand.c.
EFI_STATUS EFIAPI LinuxInitrdDynamicShellCommandEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry point of Linux Initrd dynamic UEFI Shell command.
Produce the DynamicCommand protocol to handle "initrd" command.
ImageHandle | The image handle of the process. |
SystemTable | The EFI System Table pointer. |
EFI_SUCCESS | Initrd command is executed successfully. |
EFI_ABORTED | HII package was failed to initialize. |
others | Other errors when executing Initrd command. |
Definition at line 495 of file LinuxInitrdDynamicShellCommand.c.
EFI_STATUS EFIAPI LinuxInitrdDynamicShellCommandUnload | ( | IN EFI_HANDLE | ImageHandle | ) |
Unload the dynamic UEFI Shell command.
ImageHandle | The image handle of the process. |
EFI_SUCCESS | The image is unloaded. |
Others | Failed to unload the image. |
Definition at line 527 of file LinuxInitrdDynamicShellCommand.c.
STATIC CHAR16 *EFIAPI LinuxInitrdGetHelp | ( | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL * | This, |
IN CONST CHAR8 * | Language | ||
) |
This is the command help handler function pointer callback type. This function is responsible for displaying help information for the associated command.
[in] | This | The instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL. |
[in] | Language | The pointer to the language string to use. |
Definition at line 413 of file LinuxInitrdDynamicShellCommand.c.
STATIC SHELL_STATUS EFIAPI RunInitrd | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Function for 'initrd' command.
[in] | ImageHandle | Handle to the Image (NULL if Internal). |
[in] | SystemTable | Pointer to the System Table (NULL if Internal). |
Definition at line 244 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_STATUS UninstallLoadFile2Protocol | ( | VOID | ) |
Definition at line 131 of file LinuxInitrdDynamicShellCommand.c.
STATIC CONST SINGLE_NODE_VENDOR_MEDIA_DEVPATH mInitrdDevicePath |
Definition at line 44 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_PHYSICAL_ADDRESS mInitrdFileAddress |
Definition at line 35 of file LinuxInitrdDynamicShellCommand.c.
Definition at line 36 of file LinuxInitrdDynamicShellCommand.c.
STATIC CONST EFI_LOAD_FILE2_PROTOCOL mInitrdLoadFile2 |
Definition at line 125 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_HANDLE mInitrdLoadFile2Handle |
Definition at line 37 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL mLinuxInitrdDynamicCommand |
Definition at line 425 of file LinuxInitrdDynamicShellCommand.c.
STATIC EFI_HII_HANDLE mLinuxInitrdShellCommandHiiHandle |
Definition at line 34 of file LinuxInitrdDynamicShellCommand.c.
STATIC CONST SHELL_PARAM_ITEM ParamList[] |
Definition at line 39 of file LinuxInitrdDynamicShellCommand.c.