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