A few more header fixes
[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
4 Copyright (c) 2007, Intel Corporation<BR>
5 Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
6
7 All rights reserved. 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
55#include <IndustryStandard/Pci.h>
56
57//
58// Prompt for the command line
59//
60#define CMD_SEPERATOR ';'
61#define EBL_MAX_COMMAND_COUNT 0x100
62#define MAX_CMD_HISTORY 16
63#define MAX_CMD_LINE 256
64#define MAX_ARGS 32
65
66#define EBL_CR 0x0a
67#define EBL_LF 0x0d
68
69#define EFI_SET_TIMER_TO_SECOND 10000000
70
71
72
73EBL_COMMAND_TABLE *
74EblGetCommand (
75 IN CHAR8 *CommandName
76 );
77
78
79EFI_STATUS
80EblPathToDevice (
81 IN CHAR8 *Path,
82 OUT EFI_HANDLE *DeviceHandle,
83 OUT EFI_DEVICE_PATH_PROTOCOL **PathDevicePath,
84 OUT VOID **Buffer,
85 OUT UINTN *BufferSize
86 );
87
88BOOLEAN
89EblAnyKeyToContinueQtoQuit (
90 IN UINTN *CurrentRow,
91 IN BOOLEAN PrefixNewline
92 );
93
94VOID
95EblUpdateDeviceLists (
96 VOID
97 );
98
99VOID
100EblInitializeCmdTable (
101 VOID
102 );
103
104VOID
105EblShutdownExternalCmdTable (
106 VOID
107 );
108
109VOID
110EblSetTextColor (
111 UINTN Attribute
112 );
113
114
115EFI_STATUS
116EblGetCharKey (
117 IN OUT EFI_INPUT_KEY *Key,
118 IN UINTN TimoutInSec,
119 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL
120 );
121
122// BugBug: Move me to a library
123INTN
124EFIAPI
125AsciiStrniCmp (
126 IN CONST CHAR8 *FirstString,
127 IN CONST CHAR8 *SecondString,
128 IN UINTN Length
129 );
130
131
132VOID
133EblInitializeDeviceCmd (
134 VOID
135 );
136
137VOID
138EblInitializemdHwDebugCmds (
139 VOID
140 );
141
142VOID
143EblInitializeDirCmd (
144 VOID
145 );
146
147VOID
148EblInitializeHobCmd (
149 VOID
150 );
151
152VOID
153EblInitializemdHwIoDebugCmds (
154 VOID
155 );
156
157VOID
158EblInitializeScriptCmd (
159 VOID
160 );
161
162VOID
163EblInitializeNetworkCmd (
164 VOID
165 );
166
167CHAR8 *
168ParseArguments (
169 IN CHAR8 *CmdLine,
170 OUT UINTN *Argc,
171 OUT CHAR8 **Argv
172 );
173
174EFI_STATUS
175ProcessCmdLine (
176 IN CHAR8 *CmdLine,
177 IN UINTN MaxCmdLineSize
178 );
179
180EFI_STATUS
181OutputData (
182 IN UINT8 *Address,
183 IN UINTN Length,
184 IN UINTN Width,
185 IN UINTN Offset
186 );
187
188extern UINTN gScreenColumns;
189extern UINTN gScreenRows;
190extern BOOLEAN gPageBreak;
191extern CHAR8 *gMemMapType[];
192
193#endif
194