]>
Commit | Line | Data |
---|---|---|
ced216f8 HL |
1 | /** @file\r |
2 | *\r | |
3 | * Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>\r | |
4 | *\r | |
5 | * This program and the accompanying materials are licensed and made available\r | |
6 | * under the terms and conditions of the BSD License which accompanies this\r | |
7 | * distribution. The full text of the license may be found at\r | |
8 | * http://opensource.org/licenses/bsd-license.php\r | |
9 | *\r | |
10 | * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | *\r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __ARM_SHELL_CMD_RUNAXF__\r | |
16 | #define __ARM_SHELL_CMD_RUNAXF__\r | |
17 | \r | |
dff49edc RN |
18 | #include <Protocol/Shell.h>\r |
19 | #include <Protocol/ShellDynamicCommand.h>\r | |
ced216f8 HL |
20 | \r |
21 | #include <Library/HiiLib.h>\r | |
22 | #include <Library/ShellLib.h>\r | |
23 | #include <Library/UefiBootServicesTableLib.h>\r | |
24 | \r | |
25 | extern EFI_GUID gRunAxfHiiGuid;\r | |
26 | extern EFI_HANDLE gRunAxfHiiHandle;\r | |
27 | extern EFI_HANDLE gRunAxfImageHandle;\r | |
28 | \r | |
29 | // List of data segments to load to memory from AXF/ELF file.\r | |
30 | typedef struct {\r | |
31 | LIST_ENTRY Link; // This attribute must be the first entry of this\r | |
32 | // structure (to avoid pointer computation)\r | |
33 | UINTN MemOffset; // Where the data should go, Dest\r | |
34 | UINTN FileOffset; // Where the data is from, Src\r | |
35 | BOOLEAN Zeroes; // A section of Zeroes. Like .bss in ELF\r | |
36 | UINTN Length; // Number of bytes.\r | |
37 | } RUNAXF_LOAD_LIST;\r | |
38 | \r | |
39 | \r | |
40 | /**\r | |
41 | This is the shell command handler function pointer callback type. This\r | |
42 | function handles the command when it is invoked in the shell.\r | |
43 | \r | |
44 | @param[in] This The instance of the\r | |
45 | EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r | |
46 | @param[in] SystemTable The pointer to the system table.\r | |
47 | @param[in] ShellParameters The parameters associated with the command.\r | |
48 | @param[in] Shell The instance of the shell protocol used in the\r | |
49 | context of processing this command.\r | |
50 | \r | |
51 | @return EFI_SUCCESS The operation was successful.\r | |
52 | @return other The operation failed.\r | |
53 | **/\r | |
54 | SHELL_STATUS\r | |
55 | EFIAPI\r | |
56 | ShellDynCmdRunAxfHandler (\r | |
57 | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r | |
58 | IN EFI_SYSTEM_TABLE *SystemTable,\r | |
59 | IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters,\r | |
60 | IN EFI_SHELL_PROTOCOL *Shell\r | |
61 | );\r | |
62 | \r | |
63 | \r | |
64 | /**\r | |
65 | This is the command help handler function pointer callback type. This\r | |
66 | function is responsible for displaying help information for the associated\r | |
67 | command.\r | |
68 | \r | |
69 | @param[in] This The instance of the\r | |
70 | EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r | |
71 | @param[in] Language The pointer to the language string to use.\r | |
72 | \r | |
73 | @return string Pool allocated help string, must be freed by\r | |
74 | caller.\r | |
75 | **/\r | |
76 | CHAR16*\r | |
77 | EFIAPI\r | |
78 | ShellDynCmdRunAxfGetHelp (\r | |
79 | IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r | |
80 | IN CONST CHAR8 *Language\r | |
81 | );\r | |
82 | \r | |
83 | #endif //__ARM_SHELL_CMD_RUNAXF__\r |