]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.h
ArmPlatformPkg/ArmShellCmdRunAxf: Reference MdePkg protocol definition
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmShellCmdRunAxf / ArmShellCmdRunAxf.h
1 /** @file
2 *
3 * Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
4 *
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
9 *
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.
12 *
13 **/
14
15 #ifndef __ARM_SHELL_CMD_RUNAXF__
16 #define __ARM_SHELL_CMD_RUNAXF__
17
18 #include <Protocol/Shell.h>
19 #include <Protocol/ShellDynamicCommand.h>
20
21 #include <Library/HiiLib.h>
22 #include <Library/ShellLib.h>
23 #include <Library/UefiBootServicesTableLib.h>
24
25 extern EFI_GUID gRunAxfHiiGuid;
26 extern EFI_HANDLE gRunAxfHiiHandle;
27 extern EFI_HANDLE gRunAxfImageHandle;
28
29 // List of data segments to load to memory from AXF/ELF file.
30 typedef struct {
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.
37 } RUNAXF_LOAD_LIST;
38
39
40 /**
41 This is the shell command handler function pointer callback type. This
42 function handles the command when it is invoked in the shell.
43
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.
50
51 @return EFI_SUCCESS The operation was successful.
52 @return other The operation failed.
53 **/
54 SHELL_STATUS
55 EFIAPI
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
61 );
62
63
64 /**
65 This is the command help handler function pointer callback type. This
66 function is responsible for displaying help information for the associated
67 command.
68
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.
72
73 @return string Pool allocated help string, must be freed by
74 caller.
75 **/
76 CHAR16*
77 EFIAPI
78 ShellDynCmdRunAxfGetHelp (
79 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,
80 IN CONST CHAR8 *Language
81 );
82
83 #endif //__ARM_SHELL_CMD_RUNAXF__