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 <ShellBase.h>
20 #include <Protocol/EfiShell.h>
21 #include <Protocol/EfiShellDynamicCommand.h>
23 #include <Library/HiiLib.h>
24 #include <Library/ShellLib.h>
25 #include <Library/UefiBootServicesTableLib.h>
27 extern EFI_GUID gRunAxfHiiGuid
;
28 extern EFI_HANDLE gRunAxfHiiHandle
;
29 extern EFI_HANDLE gRunAxfImageHandle
;
31 // List of data segments to load to memory from AXF/ELF file.
33 LIST_ENTRY Link
; // This attribute must be the first entry of this
34 // structure (to avoid pointer computation)
35 UINTN MemOffset
; // Where the data should go, Dest
36 UINTN FileOffset
; // Where the data is from, Src
37 BOOLEAN Zeroes
; // A section of Zeroes. Like .bss in ELF
38 UINTN Length
; // Number of bytes.
43 This is the shell command handler function pointer callback type. This
44 function handles the command when it is invoked in the shell.
46 @param[in] This The instance of the
47 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
48 @param[in] SystemTable The pointer to the system table.
49 @param[in] ShellParameters The parameters associated with the command.
50 @param[in] Shell The instance of the shell protocol used in the
51 context of processing this command.
53 @return EFI_SUCCESS The operation was successful.
54 @return other The operation failed.
58 ShellDynCmdRunAxfHandler (
59 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
60 IN EFI_SYSTEM_TABLE
*SystemTable
,
61 IN EFI_SHELL_PARAMETERS_PROTOCOL
*ShellParameters
,
62 IN EFI_SHELL_PROTOCOL
*Shell
67 This is the command help handler function pointer callback type. This
68 function is responsible for displaying help information for the associated
71 @param[in] This The instance of the
72 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
73 @param[in] Language The pointer to the language string to use.
75 @return string Pool allocated help string, must be freed by
80 ShellDynCmdRunAxfGetHelp (
81 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL
*This
,
82 IN CONST CHAR8
*Language
85 #endif //__ARM_SHELL_CMD_RUNAXF__