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