]> git.proxmox.com Git - mirror_edk2.git/blame - EmbeddedPkg/Ebl/Ebl.h
ArmPlatformPkg: remove EblCmdLib implementation
[mirror_edk2.git] / EmbeddedPkg / Ebl / Ebl.h
CommitLineData
1e57a462 1/** @file\r
2 Include file for basic command line parser for EBL (Embedded Boot Loader)\r
3\r
4 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
50c6a4d2 6 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
1e57a462 7\r
8 This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#ifndef __EBL_H__\r
19#define __EBL_H__\r
20\r
21#include <PiDxe.h>\r
3402aac7
RC
22#include <Protocol/BlockIo.h>\r
23#include <Protocol/SimpleFileSystem.h>\r
24#include <Protocol/FirmwareVolume2.h>\r
25#include <Protocol/LoadFile.h>\r
26#include <Protocol/FirmwareVolumeBlock.h>\r
27#include <Protocol/PxeBaseCode.h>\r
28#include <Protocol/LoadedImage.h>\r
1e57a462 29#include <Protocol/EblAddCommand.h>\r
30#include <Protocol/PciIo.h>\r
31#include <Protocol/DevicePath.h>\r
32\r
33#include <Guid/FileInfo.h>\r
34#include <Guid/DxeServices.h>\r
35#include <Guid/MemoryTypeInformation.h>\r
36#include <Guid/MemoryAllocationHob.h>\r
37#include <Library/BaseLib.h>\r
38#include <Library/MemoryAllocationLib.h>\r
39#include <Library/DevicePathLib.h>\r
40#include <Library/PrintLib.h>\r
41#include <Library/BaseMemoryLib.h>\r
3402aac7 42#include <Library/UefiLib.h>\r
1e57a462 43#include <Library/UefiBootServicesTableLib.h>\r
44#include <Library/UefiRuntimeServicesTableLib.h>\r
45#include <Library/DebugLib.h>\r
46#include <Library/EfiFileLib.h>\r
47#include <Library/HobLib.h>\r
48#include <Library/DebugLib.h>\r
49#include <Library/IoLib.h>\r
50#include <Library/PcdLib.h>\r
51#include <Library/EblCmdLib.h>\r
52#include <Library/DevicePathLib.h>\r
53#include <Library/UefiLib.h>\r
54#include <Library/EblNetworkLib.h>\r
55#include <Library/TimerLib.h>\r
56\r
57#include <IndustryStandard/Pci.h>\r
58\r
59//\r
60// Prompt for the command line\r
61//\r
62#define CMD_SEPARATOR ';'\r
63#define EBL_MAX_COMMAND_COUNT 0x100\r
64#define MAX_CMD_HISTORY 16\r
65#define MAX_CMD_LINE 256\r
66#define MAX_ARGS 32\r
67\r
68#define EBL_CR 0x0a\r
69#define EBL_LF 0x0d\r
70\r
71#define EFI_SET_TIMER_TO_SECOND 10000000\r
72\r
73\r
74\r
75EBL_COMMAND_TABLE *\r
76EblGetCommand (\r
77 IN CHAR8 *CommandName\r
78 );\r
79\r
80\r
81EFI_STATUS\r
82EblPathToDevice (\r
83 IN CHAR8 *Path,\r
84 OUT EFI_HANDLE *DeviceHandle,\r
85 OUT EFI_DEVICE_PATH_PROTOCOL **PathDevicePath,\r
86 OUT VOID **Buffer,\r
87 OUT UINTN *BufferSize\r
88 );\r
89\r
90BOOLEAN\r
50c6a4d2 91EFIAPI\r
1e57a462 92EblAnyKeyToContinueQtoQuit (\r
93 IN UINTN *CurrentRow,\r
94 IN BOOLEAN PrefixNewline\r
95 );\r
96\r
97VOID\r
98EblUpdateDeviceLists (\r
99 VOID\r
100 );\r
101\r
102VOID\r
103EblInitializeCmdTable (\r
104 VOID\r
105 );\r
106\r
107VOID\r
108EblShutdownExternalCmdTable (\r
109 VOID\r
110 );\r
111\r
112VOID\r
113EblSetTextColor (\r
114 UINTN Attribute\r
115 );\r
116\r
117\r
118EFI_STATUS\r
50c6a4d2 119EFIAPI\r
1e57a462 120EblGetCharKey (\r
121 IN OUT EFI_INPUT_KEY *Key,\r
122 IN UINTN TimoutInSec,\r
123 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL\r
124 );\r
125\r
126// BugBug: Move me to a library\r
127INTN\r
128EFIAPI\r
129AsciiStrniCmp (\r
130 IN CONST CHAR8 *FirstString,\r
131 IN CONST CHAR8 *SecondString,\r
132 IN UINTN Length\r
133 );\r
134\r
135\r
136VOID\r
137EblInitializeDeviceCmd (\r
138 VOID\r
139 );\r
140\r
141VOID\r
142EblInitializemdHwDebugCmds (\r
143 VOID\r
144 );\r
145\r
146VOID\r
147EblInitializeDirCmd (\r
148 VOID\r
149 );\r
150\r
151VOID\r
152EblInitializeHobCmd (\r
153 VOID\r
154 );\r
155\r
156VOID\r
157EblInitializemdHwIoDebugCmds (\r
158 VOID\r
159 );\r
160\r
161VOID\r
162EblInitializeScriptCmd (\r
163 VOID\r
164 );\r
165\r
166VOID\r
167EblInitializeNetworkCmd (\r
168 VOID\r
169 );\r
170\r
171VOID\r
172EblInitializeVariableCmds (\r
173 VOID\r
174 );\r
175\r
176CHAR8 *\r
177ParseArguments (\r
178 IN CHAR8 *CmdLine,\r
179 OUT UINTN *Argc,\r
180 OUT CHAR8 **Argv\r
181 );\r
182\r
183EFI_STATUS\r
184ProcessCmdLine (\r
185 IN CHAR8 *CmdLine,\r
186 IN UINTN MaxCmdLineSize\r
187 );\r
188\r
189EFI_STATUS\r
190OutputData (\r
191 IN UINT8 *Address,\r
192 IN UINTN Length,\r
193 IN UINTN Width,\r
194 IN UINTN Offset\r
195 );\r
3402aac7 196\r
1e57a462 197UINTN\r
198WidthFromCommandName (\r
199 IN CHAR8 *Argv,\r
200 IN UINTN Default\r
201 );\r
202\r
203\r
204extern UINTN gScreenColumns;\r
205extern UINTN gScreenRows;\r
206extern BOOLEAN gPageBreak;\r
207extern CHAR8 *gMemMapType[];\r
208\r
209#endif\r
210\r