3 * Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
5 * This program and the accompanying materials are licensed and made available
6 * under the terms and conditions of the BSD License which accompanies this
7 * 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.
15 #ifndef __ARM_SHELL_CMD_RUNAXF__
16 #define __ARM_SHELL_CMD_RUNAXF__
18 #include <Protocol/Shell.h>
19 #include <Protocol/ShellDynamicCommand.h>
21 #include <Library/HiiLib.h>
22 #include <Library/ShellLib.h>
23 #include <Library/UefiBootServicesTableLib.h>
25 extern EFI_GUID gRunAxfHiiGuid
;
26 extern EFI_HANDLE gRunAxfHiiHandle
;
27 extern EFI_HANDLE gRunAxfImageHandle
;
29 // List of data segments to load to memory from AXF/ELF file.
31 LIST_ENTRY Link
; // This attribute must be the first entry of this
32 // structure (to avoid pointer computation)
33 UINTN MemOffset
; // Where the data should go, Dest
34 UINTN FileOffset
; // Where the data is from, Src
35 BOOLEAN Zeroes
; // A section of Zeroes. Like .bss in ELF
36 UINTN Length
; // Number of bytes.
41 This is the shell command handler function pointer callback type. This
42 function handles the command when it is invoked in the shell.
44 @param[in] This The instance of the
45 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
46 @param[in] SystemTable The pointer to the system table.
47 @param[in] ShellParameters The parameters associated with the command.
48 @param[in] Shell The instance of the shell protocol used in the
49 context of processing this command.
51 @return EFI_SUCCESS The operation was successful.
52 @return other The operation failed.
56 ShellDynCmdRunAxfHandler (
57 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
58 IN EFI_SYSTEM_TABLE
*SystemTable
,
59 IN EFI_SHELL_PARAMETERS_PROTOCOL
*ShellParameters
,
60 IN EFI_SHELL_PROTOCOL
*Shell
65 This is the command help handler function pointer callback type. This
66 function is responsible for displaying help information for the associated
69 @param[in] This The instance of the
70 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
71 @param[in] Language The pointer to the language string to use.
73 @return string Pool allocated help string, must be freed by
78 ShellDynCmdRunAxfGetHelp (
79 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
80 IN CONST CHAR8
*Language
83 #endif //__ARM_SHELL_CMD_RUNAXF__