]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.h
ArmVirtualizationPkg: add simple ACPI Platform Driver to the QEMU platform
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmShellCmdRunAxf / ArmShellCmdRunAxf.h
CommitLineData
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
18#include <ShellBase.h>\r
19\r
20#include <Protocol/EfiShell.h>\r
21#include <Protocol/EfiShellDynamicCommand.h>\r
22\r
23#include <Library/HiiLib.h>\r
24#include <Library/ShellLib.h>\r
25#include <Library/UefiBootServicesTableLib.h>\r
26\r
27extern EFI_GUID gRunAxfHiiGuid;\r
28extern EFI_HANDLE gRunAxfHiiHandle;\r
29extern EFI_HANDLE gRunAxfImageHandle;\r
30\r
31// List of data segments to load to memory from AXF/ELF file.\r
32typedef struct {\r
33 LIST_ENTRY Link; // This attribute must be the first entry of this\r
34 // structure (to avoid pointer computation)\r
35 UINTN MemOffset; // Where the data should go, Dest\r
36 UINTN FileOffset; // Where the data is from, Src\r
37 BOOLEAN Zeroes; // A section of Zeroes. Like .bss in ELF\r
38 UINTN Length; // Number of bytes.\r
39} RUNAXF_LOAD_LIST;\r
40\r
41\r
42/**\r
43 This is the shell command handler function pointer callback type. This\r
44 function handles the command when it is invoked in the shell.\r
45\r
46 @param[in] This The instance of the\r
47 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
48 @param[in] SystemTable The pointer to the system table.\r
49 @param[in] ShellParameters The parameters associated with the command.\r
50 @param[in] Shell The instance of the shell protocol used in the\r
51 context of processing this command.\r
52\r
53 @return EFI_SUCCESS The operation was successful.\r
54 @return other The operation failed.\r
55**/\r
56SHELL_STATUS\r
57EFIAPI\r
58ShellDynCmdRunAxfHandler (\r
59 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
60 IN EFI_SYSTEM_TABLE *SystemTable,\r
61 IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters,\r
62 IN EFI_SHELL_PROTOCOL *Shell\r
63 );\r
64\r
65\r
66/**\r
67 This is the command help handler function pointer callback type. This\r
68 function is responsible for displaying help information for the associated\r
69 command.\r
70\r
71 @param[in] This The instance of the\r
72 EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.\r
73 @param[in] Language The pointer to the language string to use.\r
74\r
75 @return string Pool allocated help string, must be freed by\r
76 caller.\r
77**/\r
78CHAR16*\r
79EFIAPI\r
80ShellDynCmdRunAxfGetHelp (\r
81 IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This,\r
82 IN CONST CHAR8 *Language\r
83 );\r
84\r
85#endif //__ARM_SHELL_CMD_RUNAXF__\r