提交 58180851 编写于 作者: V vit9696

Build: Add Shell with partial patch set

上级 2827a90d
......@@ -989,7 +989,7 @@ Several cases, where patching actually does make sense, include:
with a dummy name by patching \texttt{\_Q11} with \texttt{XQ11}.
\end{itemize}
Tianocore \href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
Tianocore \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
source file may help understanding ACPI opcodes.
\subsection{Quirks Properties}\label{acpipropsquirks}
......@@ -2310,7 +2310,7 @@ behaviour that does not go to any other sections
Unless \texttt{Target} enables console (onscreen) printing,
onscreen debug output will not be visible. The following levels
are supported (discover more in
\href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/Library/DebugLib.h}{DebugLib.h}):
\href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/Library/DebugLib.h}{DebugLib.h}):
\begin{itemize}
\tightlist
......@@ -3131,7 +3131,7 @@ are written to three select destinations:
Most of the fields specify the overrides in SMBIOS, and their field
names conform to EDK2
\href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/SmBios.h}{SmBios.h}
\href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/SmBios.h}{SmBios.h}
header file. However, several important fields reside in Data Hub and
NVRAM. Some of the values can be found in more than one field and/or
destination, so there are two ways to control their update process:
......
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Fri Mar 6 09:43:05 2020
%DIF ADD ../Configuration.tex Sun Mar 8 23:40:39 2020
%DIF ADD ../Configuration.tex Tue Mar 10 00:51:02 2020
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
......@@ -1049,8 +1049,10 @@ Several cases, where patching actually does make sense, include:
with a dummy name by patching \texttt{\_Q11} with \texttt{XQ11}.
\end{itemize}
Tianocore \href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
source file may help understanding ACPI opcodes.
Tianocore \DIFdelbegin %DIFDELCMD < \href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/AcpiAml.h}{AcpiAml.h}
\DIFaddend source file may help understanding ACPI opcodes.
\subsection{Quirks Properties}\label{acpipropsquirks}
......@@ -2372,7 +2374,8 @@ behaviour that does not go to any other sections
Unless \texttt{Target} enables console (onscreen) printing,
onscreen debug output will not be visible. The following levels
are supported (discover more in
\href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/Library/DebugLib.h}{DebugLib.h}):
\DIFdelbegin %DIFDELCMD < \href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/Library/DebugLib.h}{DebugLib.h}%%%
\DIFdelend \DIFaddbegin \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/Library/DebugLib.h}{DebugLib.h}\DIFaddend ):
\begin{itemize}
\tightlist
......@@ -3199,8 +3202,10 @@ are written to three select destinations:
Most of the fields specify the overrides in SMBIOS, and their field
names conform to EDK2
\href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/SmBios.h}{SmBios.h}
header file. However, several important fields reside in Data Hub and
\DIFdelbegin %DIFDELCMD < \href{https://github.com/tianocore/edk2/blob/UDK2018/MdePkg/Include/IndustryStandard/SmBios.h}{SmBios.h}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \href{https://github.com/acidanthera/audk/blob/master/MdePkg/Include/IndustryStandard/SmBios.h}{SmBios.h}
\DIFaddend header file. However, several important fields reside in Data Hub and
NVRAM. Some of the values can be found in more than one field and/or
destination, so there are two ways to control their update process:
manual, where one specifies all the values (the default), and semi-automatic,
......
......@@ -27,14 +27,17 @@
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
BaseRngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
DebugLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
......@@ -100,15 +103,23 @@
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
!include NetworkPkg/NetworkLibs.dsc.inc
[Components]
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf{
<LibraryClasses>
......@@ -206,6 +217,28 @@
OpenCorePkg/Tests/PropertyTest/PropertyTestApp.inf
OpenCorePkg/Tests/SmbiosTest/SmbiosTest.inf
OpenCorePkg/Tests/SmbiosTest/SmbiosTestApp.inf
# UEFI Shell with all commands integrated
ShellPkg/Application/Shell/Shell.inf {
<Defines>
FILE_GUID = EA4BB293-2D7F-4456-A681-1F22F42CD0BC
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
# For some reason ShellPkg overrides this, so do we.
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|16000
<LibraryClasses>
# Switch to console mode at startup.
NULL|OpenCorePkg/Library/OcConsoleControlEntryModeLib/OcConsoleControlEntryModeLib.inf
# Add the original commands.
NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
}
[LibraryClasses]
NULL|OpenCorePkg/Library/OcCompilerIntrinsicsLib/OcCompilerIntrinsicsLib.inf
......
From 3ef5f6fb8cf4649d857f6065a06f0bb2fb8b9d3d Mon Sep 17 00:00:00 2001
From: Vitaly Cheptsov <vit9696@protonmail.com>
Date: Mon, 10 Feb 2020 13:10:40 +0300
Subject: [PATCH 1/1] ShellPkg: Add support for input with separately reported
modifiers
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2510
Some firmwares:
- Report Shift modifier even when they report upper-case unicode letter.
- Report Ctrl modifier with "shifted" UniChar (i.e. X - 'A' + 1).
This change provides support for these firmwares preserving the compatibility
with the previous input handling.
Signed-off-by: Michael Belyaev <usrsse2@icloud.com>
Reviewed-by: Vitaly Cheptsov <vit9696@protonmail.com>
---
ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c | 37 ++++++++++++++------
ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c | 28 ++++++++++-----
ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c | 6 ++++
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | 11 +++---
4 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
index df530f1119..9615a4dfbd 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
@@ -1381,8 +1381,8 @@ MainCommandDisplayHelp (
continue;
}
- if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) ||
- (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {
+ if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0)
+ || (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {
//
// For consoles that don't support/report shift state,
// CTRL+W is translated to L'W' - L'A' + 1.
@@ -1390,14 +1390,17 @@ MainCommandDisplayHelp (
if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
break;
}
- } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&
- ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
- ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
+ } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0)
+ && ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0)
+ && ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
//
// For consoles that supports/reports shift state,
// make sure that only CONTROL shift key is pressed.
+ // For some consoles that report shift state,
+ // CTRL+W is still translated to L'W' - L'A' + 1.
//
- if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 'W')) {
+ if ((KeyData.Key.UnicodeChar == L'w') || (KeyData.Key.UnicodeChar == L'W')
+ || (KeyData.Key.UnicodeChar == L'w' - L'a' + 1) || (KeyData.Key.UnicodeChar == L'W' - L'A' + 1)) {
break;
}
}
@@ -1834,7 +1837,8 @@ MainEditorKeyInput (
EFI_KEY_DATA KeyData;
EFI_STATUS Status;
EFI_SIMPLE_POINTER_STATE MouseState;
- BOOLEAN NoShiftState;
+ BOOLEAN NoModifierState;
+ BOOLEAN ShiftOnlyState;
do {
@@ -1886,17 +1890,28 @@ MainEditorKeyInput (
//
StatusBarSetRefresh();
//
- // NoShiftState: TRUE when no shift key is pressed.
+ // NoModifierState: TRUE when no modifier key is pressed.
//
- NoShiftState = ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) || (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID);
+ NoModifierState = ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0)
+ || (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID);
+ //
+ // ShiftOnlyState: TRUE when no modifier key except Shift is pressed.
+ //
+ ShiftOnlyState = ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0)
+ || ((KeyData.KeyState.KeyShiftState
+ & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_SHIFT_PRESSED | EFI_RIGHT_SHIFT_PRESSED)) == 0);
//
// dispatch to different components' key handling function
//
if (EFI_NOT_FOUND != MenuBarDispatchControlHotKey(&KeyData)) {
Status = EFI_SUCCESS;
- } else if (NoShiftState && ((KeyData.Key.ScanCode == SCAN_NULL) || ((KeyData.Key.ScanCode >= SCAN_UP) && (KeyData.Key.ScanCode <= SCAN_PAGE_DOWN)))) {
+ } else if ((ShiftOnlyState && (KeyData.Key.ScanCode == SCAN_NULL))
+ || (NoModifierState && (KeyData.Key.ScanCode >= SCAN_UP) && (KeyData.Key.ScanCode <= SCAN_PAGE_DOWN))) {
+ //
+ // alphanumeric keys with or without shift, or arrow keys without shift
+ //
Status = FileBufferHandleInput (&KeyData.Key);
- } else if (NoShiftState && (KeyData.Key.ScanCode >= SCAN_F1) && (KeyData.Key.ScanCode <= SCAN_F12)) {
+ } else if (NoModifierState && (KeyData.Key.ScanCode >= SCAN_F1) && (KeyData.Key.ScanCode <= SCAN_F12)) {
Status = MenuBarDispatchFunctionKey (&KeyData.Key);
} else {
StatusBarSetStatusString (L"Unknown Command");
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
index 35b0b701e8..d053059220 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
@@ -130,6 +130,8 @@ InputBarRefresh (
UINTN EventIndex;
UINTN CursorRow;
UINTN CursorCol;
+ BOOLEAN ShiftPressed;
+ BOOLEAN ModifiersPressed;
//
// variable initialization
@@ -180,17 +182,23 @@ InputBarRefresh (
if (EFI_ERROR (Status)) {
continue;
}
- if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&
- (KeyData.KeyState.KeyShiftState != EFI_SHIFT_STATE_VALID)) {
- //
- // Shift key pressed.
- //
+ ModifiersPressed = ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0)
+ && (KeyData.KeyState.KeyShiftState != EFI_SHIFT_STATE_VALID);
+
+ //
+ // TRUE if Shift is pressed and no other modifiers are pressed
+ //
+ ShiftPressed = ModifiersPressed &&
+ ((KeyData.KeyState.KeyShiftState &
+ ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_SHIFT_PRESSED | EFI_RIGHT_SHIFT_PRESSED)) == 0);
+
+ if (ModifiersPressed && !ShiftPressed) {
continue;
}
//
// pressed ESC
//
- if (KeyData.Key.ScanCode == SCAN_ESC) {
+ if (!ModifiersPressed && KeyData.Key.ScanCode == SCAN_ESC) {
Size = 0;
Status = EFI_NOT_READY;
break;
@@ -198,9 +206,10 @@ InputBarRefresh (
//
// return pressed
//
- if (KeyData.Key.UnicodeChar == CHAR_LINEFEED || KeyData.Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
+ if (!ModifiersPressed
+ && (KeyData.Key.UnicodeChar == CHAR_LINEFEED || KeyData.Key.UnicodeChar == CHAR_CARRIAGE_RETURN)) {
break;
- } else if (KeyData.Key.UnicodeChar == CHAR_BACKSPACE) {
+ } else if (!ModifiersPressed && KeyData.Key.UnicodeChar == CHAR_BACKSPACE) {
//
// backspace
//
@@ -213,7 +222,8 @@ InputBarRefresh (
}
}
- } else if (KeyData.Key.UnicodeChar <= 127 && KeyData.Key.UnicodeChar >= 32) {
+ } else if ((!ModifiersPressed || ShiftPressed)
+ && KeyData.Key.UnicodeChar <= 127 && KeyData.Key.UnicodeChar >= 32) {
//
// VALID ASCII char pressed
//
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c
index ca8bc506d9..eabbf3c571 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c
@@ -190,11 +190,17 @@ MenuBarDispatchControlHotKey (
//
// For consoles that supports/reports shift state,
// make sure only CONTROL is pressed.
+ // For some consoles that report shift state,
+ // Ctrl+A is still translated to 1 (UnicodeChar).
//
if ((KeyData->Key.UnicodeChar >= L'A') && (KeyData->Key.UnicodeChar <= L'Z')) {
ControlIndex = KeyData->Key.UnicodeChar - L'A' + 1;
} else if ((KeyData->Key.UnicodeChar >= L'a') && (KeyData->Key.UnicodeChar <= L'z')) {
ControlIndex = KeyData->Key.UnicodeChar - L'a' + 1;
+ } else if ((KeyData->Key.UnicodeChar >= L'A' - L'A' + 1) && (KeyData->Key.UnicodeChar <= L'Z' - L'A' + 1)) {
+ ControlIndex = KeyData->Key.UnicodeChar;
+ } else if ((KeyData->Key.UnicodeChar >= L'a' - L'a' + 1) && (KeyData->Key.UnicodeChar <= L'z' - L'z' + 1)) {
+ ControlIndex = KeyData->Key.UnicodeChar;
}
}
if ((SCAN_CONTROL_Z < ControlIndex)
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
index a00df49d38..394e531c16 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
@@ -137,14 +137,17 @@ HMainCommandDisplayHelp (
if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
break;
}
- } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) &&
- ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
- ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
+ } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0)
+ && ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0)
+ && ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
//
// For consoles that supports/reports shift state,
// make sure that only CONTROL shift key is pressed.
+ // For some consoles that report shift state,
+ // CTRL+W is still translated to L'W' - L'A' + 1.
//
- if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 'W')) {
+ if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 'W')
+ || (KeyData.Key.UnicodeChar == L'w' - L'a' + 1) || (KeyData.Key.UnicodeChar == L'W' - L'A' + 1)) {
break;
}
}
--
2.21.1 (Apple Git-122.3)
From 85298e8b1d07a229fdc23ce9999e915e44552bad Mon Sep 17 00:00:00 2001
From: Vitaly Cheptsov <vit9696@protonmail.com>
Date: Mon, 13 Jan 2020 00:35:04 +0300
Subject: [PATCH 1/1] ShellPkg: Do not connect handles without device paths
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2460
Doing this reduces the amount of needless work during device
connection and resolves issues with firmwares that freeze
when connecting handles without device paths.
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
---
ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/LoadPciRom.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/LoadPciRom.c
index 5b6cba17f3..cb889cf5e0 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/LoadPciRom.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/LoadPciRom.c
@@ -387,8 +387,8 @@ LoadPciRomConnectAllDriversToAllControllers (
UINTN Index;
Status = gBS->LocateHandleBuffer (
- AllHandles,
- NULL,
+ ByProtocol,
+ &gEfiDevicePathProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c
index b6e7c952fa..083aac0dba 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c
@@ -32,8 +32,8 @@ ConnectAllEfi (
UINTN Index;
Status = gBS->LocateHandleBuffer (
- AllHandles,
- NULL,
+ ByProtocol,
+ &gEfiDevicePathProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
--
2.21.0 (Apple Git-122.2)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册