From nobody Tue Nov 26 20:22:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47145+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47145+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1568250238; cv=none; d=zoho.com; s=zohoarc; b=YiqyhLtcUKYIp21+b3REqX0yHY2/4tQO+0RJALYBQrlAawhM6gcyFMgOou+BcwfYWJooh+xz00vpTbCe4ZxYVflSkr71/3rP3zC2uHmGw3lQwEI9v8474D9H77ZBuV+D+ct/tO+cmwBAANuVerZG43x/HN/6hslzPuRJ9NktpmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568250238; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=TELFbptaAyqjtKKG6avp5CjSLTKuVRXvbGJugrt3SAc=; b=gltNOjF5Oy9zUHsDc0Cco0PvNAXuRFcKcEMH+fXpyajvpLU4ZExAqUvDYizhRZZPk7Cm1nMQM3edekp8XekatKV76mTNbuhjIYF6+engQgGtM/aMIL73aAE3bcSrmEMWOLq8HrsAiinXq0z1JKXisvMwMUPGy65foPHUYYyzCSk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47145+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1568250238221120.22415222140489; Wed, 11 Sep 2019 18:03:58 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Wed, 11 Sep 2019 18:03:56 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 18:03:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,495,1559545200"; d="scan'208";a="200632454" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 11 Sep 2019 18:03:54 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH 3/3] MdeModulePkg/BM_UI: Add the new terminal types to related menu Date: Thu, 12 Sep 2019 09:02:31 +0800 Message-Id: <20190912010231.19544-4-zhichao.gao@intel.com> In-Reply-To: <20190912010231.19544-1-zhichao.gao@intel.com> References: <20190912010231.19544-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568250237; bh=cOOlPdvEPe5lr4HR/Go49ZUlDXlXPOHOdwkfcSQBzh8=; h=Cc:Date:From:Reply-To:Subject:To; b=fudyVrsv5dyDHzXvztxxRfF5VPxc4irTT4sO+3orFmPn0MIKn7CQdGLUQHRmC1ab8yA S6M9/0hjke/Yod8bIhFshaUzncRJECAy3KlQdbu8kRNz3hb1cBEWfGRMo3F/wgIgKe+hG 5a6O/K1l53WT9Q6N32+PnAgTX1P135qGo58= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2186 Add the new introduced terminal types to related setup menu to change the terminal type from setup. Most platforms would have its own configure setup menu and they need to change it to support these. The new introduced terminal types are Linux, XtermR6, VT400 and SCO. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Zhichao Gao --- .../BootMaintenanceManager.h | 13 ++++--- .../BootMaintenanceManagerStrings.uni | 10 +++++- .../ConsoleOption.c | 35 ++++++------------- .../BootMaintenanceManagerUiLib/Data.c | 16 ++++++--- 4 files changed, 40 insertions(+), 34 deletions(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenan= ceManager.h b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintena= nceManager.h index ea3cdce794..822401e68c 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManag= er.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManag= er.h @@ -1,7 +1,7 @@ /** @file Header file for boot maintenance module. =20 -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -12,6 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "FormGuid.h" =20 #include +#include #include #include #include @@ -92,7 +93,11 @@ typedef enum _TYPE_OF_TERMINAL { TerminalTypeVt100, TerminalTypeVt100Plus, TerminalTypeVtUtf8, - TerminalTypeTtyTerm + TerminalTypeTtyTerm, + TerminalTypeLinux, + TerminalTypeXtermR6, + TerminalTypeVt400, + TerminalTypeSCO } TYPE_OF_TERMINAL; =20 // @@ -1301,12 +1306,12 @@ extern BM_MENU_OPTION ConsoleOutMenu; extern BM_MENU_OPTION ConsoleErrMenu; extern BM_MENU_OPTION DriverMenu; extern BM_MENU_OPTION TerminalMenu; -extern UINT16 TerminalType[5]; +extern UINT16 TerminalType[9]; extern COM_ATTR BaudRateList[19]; extern COM_ATTR DataBitsList[4]; extern COM_ATTR ParityList[5]; extern COM_ATTR StopBitsList[3]; -extern EFI_GUID TerminalTypeGuid[5]; +extern EFI_GUID TerminalTypeGuid[9]; extern EFI_DEVICE_PATH_PROTOCOL EndDevicePath[]; extern UINT16 mFlowControlType[2]; extern UINT32 mFlowControlValue[2]; diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenan= ceManagerStrings.uni b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Boo= tMaintenanceManagerStrings.uni index 2e67d27bd0..3d47473e6c 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManag= erStrings.uni +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManag= erStrings.uni @@ -1,7 +1,7 @@ ///** @file // String definitions for Boot Maintenance Utility. // -// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
// SPDX-License-Identifier: BSD-2-Clause-Patent // //**/ @@ -233,6 +233,14 @@ #language fr-FR "VT_UTF8" #string STR_COM_TYPE_4 #language en-US "TTY_TERM" #language fr-FR "TTY_TERM" +#string STR_COM_TYPE_5 #language en-US "LINUX" + #language fr-FR "LINUX" +#string STR_COM_TYPE_6 #language en-US "XTERM_R6" + #language fr-FR "XTERM_R6" +#string STR_COM_TYPE_7 #language en-US "VT_400" + #language fr-FR "VT_400" +#string STR_COM_TYPE_8 #language en-US "SCO" + #language fr-FR "SCO" #string STR_RESET #language en-US "Reset System" #language fr-FR "Reset System" #string STR_FORM_GOTO_MAIN #language en-US "Go Back To Main P= age" diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption= .c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c index 7a53b58771..b0641c5ee9 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c @@ -897,6 +897,7 @@ IsTerminalDevicePath ( VENDOR_DEVICE_PATH *Vendor; UART_DEVICE_PATH *Uart; ACPI_HID_DEVICE_PATH *Acpi; + UINTN Index; =20 IsTerminal =3D FALSE; =20 @@ -929,37 +930,21 @@ IsTerminalDevicePath ( } =20 // - // There are four kinds of Terminal types + // There are 9 kinds of Terminal types // check to see whether this devicepath // is one of that type // - if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[0])) { - *Termi =3D TerminalTypePcAnsi; - IsTerminal =3D TRUE; - } else { - if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[1])) { - *Termi =3D TerminalTypeVt100; - IsTerminal =3D TRUE; - } else { - if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[2])) { - *Termi =3D TerminalTypeVt100Plus; - IsTerminal =3D TRUE; - } else { - if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[3])) { - *Termi =3D TerminalTypeVtUtf8; - IsTerminal =3D TRUE; - } else { - if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[4])) { - *Termi =3D TerminalTypeTtyTerm; - IsTerminal =3D TRUE; - } else { - IsTerminal =3D FALSE; - } - } - } + for (Index =3D 0; Index < ARRAY_SIZE (TerminalTypeGuid); Index++) { + if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[Index])) { + *Termi =3D Index; + IsTerminal =3D TRUE; } } =20 + if (Index =3D=3D ARRAY_SIZE (TerminalTypeGuid)) { + IsTerminal =3D FALSE; + } + if (!IsTerminal) { return FALSE; } diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Data.c b/MdeM= odulePkg/Library/BootMaintenanceManagerUiLib/Data.c index b9d86b09d8..5cd363c982 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Data.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Data.c @@ -1,7 +1,7 @@ /** @file Define some data used for Boot Maint =20 -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -16,12 +16,16 @@ EFI_IFR_GUID_LABEL *mEndLabel =3D NULL; /// /// Terminal type string token storage /// -UINT16 TerminalType[] =3D { +UINT16 TerminalType[9] =3D { STRING_TOKEN(STR_COM_TYPE_0), STRING_TOKEN(STR_COM_TYPE_1), STRING_TOKEN(STR_COM_TYPE_2), STRING_TOKEN(STR_COM_TYPE_3), STRING_TOKEN(STR_COM_TYPE_4), + STRING_TOKEN(STR_COM_TYPE_5), + STRING_TOKEN(STR_COM_TYPE_6), + STRING_TOKEN(STR_COM_TYPE_7), + STRING_TOKEN(STR_COM_TYPE_8), }; =20 /// @@ -248,10 +252,14 @@ COM_ATTR StopBitsList[3] =3D { /// /// Guid for messaging path, used in Serial port setting. /// -EFI_GUID TerminalTypeGuid[] =3D { +EFI_GUID TerminalTypeGuid[9] =3D { DEVICE_PATH_MESSAGING_PC_ANSI, DEVICE_PATH_MESSAGING_VT_100, DEVICE_PATH_MESSAGING_VT_100_PLUS, DEVICE_PATH_MESSAGING_VT_UTF8, - EFI_TTY_TERM_GUID + EFI_TTY_TERM_GUID, + EDKII_LINUX_MODE_GUID, + EDKII_XTERM_R6_GUID, + EDKII_VT400_GUID, + EDKII_SCO_GUID }; --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47145): https://edk2.groups.io/g/devel/message/47145 Mute This Topic: https://groups.io/mt/34110606/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-