Revision: 18236
http://sourceforge.net/p/edk2/code/18236
Author: niruiyu
Date: 2015-08-19 10:01:31 +0000 (Wed, 19 Aug 2015)
Log Message:
-----------
MdeModulePkg: Update UiApp to handle terminal type TtyTerm
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <[email protected]>
Reviewed-by: Eric Dong <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Data.c
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
===================================================================
(Binary files differ)
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
2015-08-19 03:41:38 UTC (rev 18235)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
2015-08-19 10:01:31 UTC (rev 18236)
@@ -18,6 +18,7 @@
#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 @@
TerminalTypePcAnsi = 0,
TerminalTypeVt100,
TerminalTypeVt100Plus,
- TerminalTypeVtUtf8
+ TerminalTypeVtUtf8,
+ TerminalTypeTtyTerm
} TYPE_OF_TERMINAL;
typedef enum _FILE_EXPLORER_STATE {
@@ -1452,12 +1454,12 @@
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;
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
2015-08-19 03:41:38 UTC (rev 18235)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
2015-08-19 10:01:31 UTC (rev 18236)
@@ -564,7 +564,7 @@
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 @@
*Termi = TerminalTypeVtUtf8;
IsTerminal = TRUE;
} else {
- IsTerminal = FALSE;
+ if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[4])) {
+ *Termi = TerminalTypeTtyTerm;
+ IsTerminal = TRUE;
+ } else {
+ IsTerminal = FALSE;
+ }
}
}
}
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Data.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Data.c 2015-08-19
03:41:38 UTC (rev 18235)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Data.c 2015-08-19
10:01:31 UTC (rev 18236)
@@ -35,6 +35,7 @@
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 @@
///
/// 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
};
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
2015-08-19 03:41:38 UTC (rev 18235)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
2015-08-19 10:01:31 UTC (rev 18236)
@@ -1056,7 +1056,7 @@
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;
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits