]> git.proxmox.com Git - mirror_edk2.git/blame - EmbeddedPkg/Ebl/Ebl.h
Fix gcc warning.
[mirror_edk2.git] / EmbeddedPkg / Ebl / Ebl.h
CommitLineData
2ef2b01e
A
1/** @file
2 Include flie for basic command line parser for EBL (Embedded Boot Loader)
3
60274cca
HT
4 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
2ef2b01e 6
60274cca 7 This program and the accompanying materials
2ef2b01e
A
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>
f6381f4c 54#include <Library/TimerLib.h>
2ef2b01e
A
55
56#include <IndustryStandard/Pci.h>
57
58//
59// Prompt for the command line
60//
61#define CMD_SEPERATOR ';'
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
74EBL_COMMAND_TABLE *
75EblGetCommand (
76 IN CHAR8 *CommandName
77 );
78
79
80EFI_STATUS
81EblPathToDevice (
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
89BOOLEAN
90EblAnyKeyToContinueQtoQuit (
91 IN UINTN *CurrentRow,
92 IN BOOLEAN PrefixNewline
93 );
94
95VOID
96EblUpdateDeviceLists (
97 VOID
98 );
99
100VOID
101EblInitializeCmdTable (
102 VOID
103 );
104
105VOID
106EblShutdownExternalCmdTable (
107 VOID
108 );
109
110VOID
111EblSetTextColor (
112 UINTN Attribute
113 );
114
115
116EFI_STATUS
117EblGetCharKey (
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
124INTN
125EFIAPI
126AsciiStrniCmp (
127 IN CONST CHAR8 *FirstString,
128 IN CONST CHAR8 *SecondString,
129 IN UINTN Length
130 );
131
132
133VOID
134EblInitializeDeviceCmd (
135 VOID
136 );
137
138VOID
139EblInitializemdHwDebugCmds (
140 VOID
141 );
142
143VOID
144EblInitializeDirCmd (
145 VOID
146 );
147
148VOID
149EblInitializeHobCmd (
150 VOID
151 );
152
153VOID
154EblInitializemdHwIoDebugCmds (
155 VOID
156 );
157
158VOID
159EblInitializeScriptCmd (
160 VOID
161 );
162
163VOID
164EblInitializeNetworkCmd (
165 VOID
166 );
167
168CHAR8 *
169ParseArguments (
170 IN CHAR8 *CmdLine,
171 OUT UINTN *Argc,
172 OUT CHAR8 **Argv
173 );
174
175EFI_STATUS
176ProcessCmdLine (
177 IN CHAR8 *CmdLine,
178 IN UINTN MaxCmdLineSize
179 );
180
181EFI_STATUS
182OutputData (
183 IN UINT8 *Address,
184 IN UINTN Length,
185 IN UINTN Width,
186 IN UINTN Offset
187 );
a6d7123e 188
189UINTN
190WidthFromCommandName (
191 IN CHAR8 *Argv,
192 IN UINTN Default
193 );
194
2ef2b01e
A
195
196extern UINTN gScreenColumns;
197extern UINTN gScreenRows;
198extern BOOLEAN gPageBreak;
199extern CHAR8 *gMemMapType[];
200
201#endif
202