26 L
"EbcDebuggerConfig Version 1.0\n"
27 L
"Copyright (C) Intel Corp 2007-2016. All rights reserved.\n"
29 L
"Configure EbcDebugger in EFI Shell Environment.\n"
31 L
"usage: EdbCfg <Command>\n"
33 L
" BO[C|CX|R|E|T|K] <ON|OFF> - Enable/Disable BOC/BOCX/BOR/BOE/BOT/BOK.\n"
52 Print (L
"Not supported!\n");
76 if (
StriCmp (Command, L
"BOC") == 0) {
77 if (CommandArg ==
NULL) {
78 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOC) == EFI_DEBUG_FLAG_EBC_BOC) {
83 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
84 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOC;
85 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
86 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOC;
88 Print (L
"Invalid parameter\n");
90 }
else if (
StriCmp (Command, L
"BOCX") == 0) {
91 if (CommandArg ==
NULL) {
92 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOCX) == EFI_DEBUG_FLAG_EBC_BOCX) {
95 Print (L
"BOCX off\n");
97 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
98 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOCX;
99 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
100 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOCX;
102 Print (L
"Invalid parameter\n");
104 }
else if (
StriCmp (Command, L
"BOR") == 0) {
105 if (CommandArg ==
NULL) {
106 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOR) == EFI_DEBUG_FLAG_EBC_BOR) {
109 Print (L
"BOR off\n");
111 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
112 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOR;
113 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
114 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOR;
116 Print (L
"Invalid parameter\n");
118 }
else if (
StriCmp (Command, L
"BOE") == 0) {
119 if (CommandArg ==
NULL) {
120 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOE) == EFI_DEBUG_FLAG_EBC_BOE) {
123 Print (L
"BOE off\n");
125 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
126 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOE;
127 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
128 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOE;
130 Print (L
"Invalid parameter\n");
132 }
else if (
StriCmp (Command, L
"BOT") == 0) {
133 if (CommandArg ==
NULL) {
134 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOT) == EFI_DEBUG_FLAG_EBC_BOT) {
137 Print (L
"BOT off\n");
139 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
140 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOT;
141 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
142 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOT;
144 Print (L
"Invalid parameter\n");
146 }
else if (
StriCmp (Command, L
"BOK") == 0) {
147 if (CommandArg ==
NULL) {
148 if ((DebuggerPrivate->FeatureFlags & EFI_DEBUG_FLAG_EBC_BOK) == EFI_DEBUG_FLAG_EBC_BOK) {
151 Print (L
"BOK off\n");
153 }
else if (
StriCmp (CommandArg, L
"ON") == 0) {
154 DebuggerPrivate->FeatureFlags |= EFI_DEBUG_FLAG_EBC_BOK;
155 }
else if (
StriCmp (CommandArg, L
"OFF") == 0) {
156 DebuggerPrivate->FeatureFlags &= ~EFI_DEBUG_FLAG_EBC_B_BOK;
158 Print (L
"Invalid parameter\n");
188 Status =
gBS->HandleProtocol (
190 &gEfiShellParametersProtocolGuid,
191 (VOID **)&ShellParameters
193 if (EFI_ERROR (Status)) {
194 Print (L
"Please use UEFI Shell to run this application.\n");
195 return EFI_INVALID_PARAMETER;
198 Argc = ShellParameters->
Argc;
199 Argv = ShellParameters->
Argv;
203 return EFI_INVALID_PARAMETER;
207 if ((
StrCmp (Argv[1], L
"/?") == 0) ||
208 (
StrCmp (Argv[1], L
"-?") == 0) ||
209 (
StrCmp (Argv[1], L
"-h") == 0) ||
210 (
StrCmp (Argv[1], L
"-H") == 0))
217 Status =
gBS->LocateProtocol (
218 &gEfiDebuggerConfigurationProtocolGuid,
220 (VOID **)&DebuggerConfiguration
222 if (EFI_ERROR (Status)) {
223 Print (L
"Error: DebuggerConfiguration protocol not found.\n");
224 return EFI_NOT_FOUND;
227 if (
StriCmp (Argv[1], L
"SHOWINFO") == 0) {
232 if (((Argc == 2) || (Argc == 3)) &&
233 ((
StriCmp (Argv[1], L
"BOC") == 0) ||
234 (
StriCmp (Argv[1], L
"BOCX") == 0) ||
235 (
StriCmp (Argv[1], L
"BOR") == 0) ||
236 (
StriCmp (Argv[1], L
"BOE") == 0) ||
237 (
StriCmp (Argv[1], L
"BOT") == 0) ||
238 (
StriCmp (Argv[1], L
"BOK") == 0)))
249 Print (L
"Error: Invalid Command.\n");
250 return EFI_INVALID_PARAMETER;
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
VOID EdbShowInfo(EFI_DEBUGGER_CONFIGURATION_PROTOCOL *DebuggerConfiguration)
VOID EdbConfigBreak(EFI_DEBUGGER_CONFIGURATION_PROTOCOL *DebuggerConfiguration, CHAR16 *Command, CHAR16 *CommandArg)
EFI_STATUS EFIAPI InitializeEbcDebuggerConfig(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
INTN EFIAPI StriCmp(IN CHAR16 *String, IN CHAR16 *String2)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)