2 Include file for basic command line parser for EBL (Embedded Boot Loader)
4 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
5 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
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
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.
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>
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>
56 #include <IndustryStandard/Pci.h>
59 // Prompt for the command line
61 #define CMD_SEPARATOR ';'
62 #define EBL_MAX_COMMAND_COUNT 0x100
63 #define MAX_CMD_HISTORY 16
64 #define MAX_CMD_LINE 256
70 #define EFI_SET_TIMER_TO_SECOND 10000000
83 OUT EFI_HANDLE
*DeviceHandle
,
84 OUT EFI_DEVICE_PATH_PROTOCOL
**PathDevicePath
,
90 EblAnyKeyToContinueQtoQuit (
92 IN BOOLEAN PrefixNewline
96 EblUpdateDeviceLists (
101 EblInitializeCmdTable (
106 EblShutdownExternalCmdTable (
118 IN OUT EFI_INPUT_KEY
*Key
,
119 IN UINTN TimoutInSec
,
120 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL
123 // BugBug: Move me to a library
127 IN CONST CHAR8
*FirstString
,
128 IN CONST CHAR8
*SecondString
,
134 EblInitializeDeviceCmd (
139 EblInitializemdHwDebugCmds (
144 EblInitializeDirCmd (
149 EblInitializeHobCmd (
154 EblInitializemdHwIoDebugCmds (
159 EblInitializeScriptCmd (
164 EblInitializeNetworkCmd (
169 EblInitializeVariableCmds (
183 IN UINTN MaxCmdLineSize
195 WidthFromCommandName (
201 extern UINTN gScreenColumns
;
202 extern UINTN gScreenRows
;
203 extern BOOLEAN gPageBreak
;
204 extern CHAR8
*gMemMapType
[];