Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <[email protected]>
Cc: Eric Dong <[email protected]>
---
.../Application/UiApp/BootMaint/Bmstring.uni | Bin 41522 -> 41794 bytes
.../Application/UiApp/BootMaint/BootMaint.h | 8 +++++---
.../Application/UiApp/BootMaint/ConsoleOption.c | 9 +++++++--
MdeModulePkg/Application/UiApp/BootMaint/Data.c | 6 ++++--
.../Application/UiApp/BootMaint/UpdatePage.c | 2 +-
5 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
b/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
index
8d9544db450322835972597234a07d76207e1102..a208127ac6ea76ec5dde6824babf05583a1cfa8d
100644
GIT binary patch
delta 66
zcmdmVgz3;RrVSN6lLNYh7)>T8vMEoVz^1|<!Vtm`$q)}DT^WKHd?z0at>#4)VKkE8
JT+y>j6ad0a6I=iQ
delta 14
WcmX?fjA_#mrVSN6n>%`Ui2?vQ4+l;F
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
index 69cf760..e1ac307 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
+++ b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
EXPRESS OR IMPLIED.
#include "Ui.h"
#include "FormGuid.h"
#include "FrontPage.h"
+#include <Guid/TtyTerm.h>
//
// Constants which are variable names used to access variables
@@ -81,7 +82,8 @@ typedef enum _TYPE_OF_TERMINAL {
TerminalTypePcAnsi = 0,
TerminalTypeVt100,
TerminalTypeVt100Plus,
- TerminalTypeVtUtf8
+ TerminalTypeVtUtf8,
+ TerminalTypeTtyTerm
} TYPE_OF_TERMINAL;
typedef enum _FILE_EXPLORER_STATE {
@@ -1452,12 +1454,12 @@ extern BM_MENU_OPTION ConsoleErrMenu;
extern BM_MENU_OPTION DirectoryMenu;
extern BM_MENU_OPTION DriverMenu;
extern BM_MENU_OPTION TerminalMenu;
-extern UINT16 TerminalType[];
+extern UINT16 TerminalType[5];
extern COM_ATTR BaudRateList[19];
extern COM_ATTR DataBitsList[4];
extern COM_ATTR ParityList[5];
extern COM_ATTR StopBitsList[3];
-extern EFI_GUID TerminalTypeGuid[4];
+extern EFI_GUID TerminalTypeGuid[5];
extern STRING_DEPOSITORY *FileOptionStrDepository;
extern STRING_DEPOSITORY *ConsoleOptionStrDepository;
extern STRING_DEPOSITORY *BootOptionStrDepository;
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
index d86c733..f164db2 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
@@ -564,7 +564,7 @@ LocateSerialIo (
Vendor.Header.Type = MESSAGING_DEVICE_PATH;
Vendor.Header.SubType = MSG_VENDOR_DP;
- for (Index2 = 0; Index2 < 4; Index2++) {
+ for (Index2 = 0; Index2 < (sizeof (TerminalTypeGuid) / sizeof
(TerminalTypeGuid[0])); Index2++) {
CopyMem (&Vendor.Guid, &TerminalTypeGuid[Index2], sizeof (EFI_GUID));
SetDevicePathNodeLength (&Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
NewDevicePath = AppendDevicePathNode (
@@ -940,7 +940,12 @@ IsTerminalDevicePath (
*Termi = TerminalTypeVtUtf8;
IsTerminal = TRUE;
} else {
- IsTerminal = FALSE;
+ if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[4])) {
+ *Termi = TerminalTypeTtyTerm;
+ IsTerminal = TRUE;
+ } else {
+ IsTerminal = FALSE;
+ }
}
}
}
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Data.c
b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
index 7e86211..caf6c60 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/Data.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
@@ -35,6 +35,7 @@ UINT16 TerminalType[] = {
STRING_TOKEN(STR_COM_TYPE_1),
STRING_TOKEN(STR_COM_TYPE_2),
STRING_TOKEN(STR_COM_TYPE_3),
+ STRING_TOKEN(STR_COM_TYPE_4),
};
///
@@ -266,9 +267,10 @@ COM_ATTR StopBitsList[3] = {
///
/// Guid for messaging path, used in Serial port setting.
///
-EFI_GUID TerminalTypeGuid[4] = {
+EFI_GUID TerminalTypeGuid[] = {
DEVICE_PATH_MESSAGING_PC_ANSI,
DEVICE_PATH_MESSAGING_VT_100,
DEVICE_PATH_MESSAGING_VT_100_PLUS,
- DEVICE_PATH_MESSAGING_VT_UTF8
+ DEVICE_PATH_MESSAGING_VT_UTF8,
+ EFI_TTY_TERM_GUID
};
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
index d85f2ea..26de91b 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
@@ -1056,7 +1056,7 @@ UpdateTerminalPage (
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
ASSERT (OptionsOpCodeHandle != NULL);
- for (Index = 0; Index < 4; Index++) {
+ for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]);
Index++) {
CheckFlags = 0;
if (NewTerminalContext->TerminalType == Index) {
CheckFlags |= EFI_IFR_OPTION_DEFAULT;
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel