From nobody Sat Nov 2 08:26:28 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492487434733144.09645044625552; Mon, 17 Apr 2017 20:50:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6BEDF21A18AAA; Mon, 17 Apr 2017 20:50:32 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0B4921A18AA9 for ; Mon, 17 Apr 2017 20:50:30 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 17 Apr 2017 20:50:30 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga001.jf.intel.com with ESMTP; 17 Apr 2017 20:50:29 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,217,1488873600"; d="scan'208";a="1120576534" From: Dandan Bi To: edk2-devel@lists.01.org Date: Tue, 18 Apr 2017 11:50:15 +0800 Message-Id: <1492487415-171376-1-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [patch] MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Dong MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When initializing ConsoleOutCheck/ConsoleInCheck/ConsoleErrCheck array in BMM_FAKE_NV_DATA structure, also need to consider whether the terminal device is ConOut/ConIn/ConErr or not. Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Eric Dong --- .../BootMaintenanceManagerUiLib/ConsoleOption.c | 26 ++++++++++++++++++= +++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption= .c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c index a145a77..b25c7a6 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c @@ -1029,20 +1029,28 @@ GetConsoleInCheck ( { UINT16 Index; BM_MENU_ENTRY *NewMenuEntry;=20 UINT8 *ConInCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; + BM_TERMINAL_CONTEXT *NewTerminalContext; =20 ASSERT (CallbackData !=3D NULL); =20 ConInCheck =3D &CallbackData->BmmFakeNvData.ConsoleInCheck[0]; for (Index =3D 0; ((Index < ConsoleInpMenu.MenuNumber) && \ (Index < MAX_MENU_NUMBER)) ; Index++) { =20 NewMenuEntry =3D BOpt_GetMenuEntry (&ConsoleInpMenu, Index); NewConsoleContext =3D (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableCon= text; =20 ConInCheck[Index] =3D NewConsoleContext->IsActive; } + + for (Index =3D 0; Index < TerminalMenu.MenuNumber; Index++) { + NewMenuEntry =3D BOpt_GetMenuEntry (&TerminalMenu, Inde= x); + NewTerminalContext =3D (BM_TERMINAL_CONTEXT *) NewMenuEntry->= VariableContext; + ASSERT (Index + ConsoleInpMenu.MenuNumber < MAX_MENU_NUMBER); + ConInCheck[Index + ConsoleInpMenu.MenuNumber] =3D NewTerminalContext->= IsConIn; + } } =20 /** =20 Initialize console output device check box to ConsoleOutCheck[MAX_MENU_N= UMBER] @@ -1058,19 +1066,27 @@ GetConsoleOutCheck ( { UINT16 Index; BM_MENU_ENTRY *NewMenuEntry;=20 UINT8 *ConOutCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; - =20 + BM_TERMINAL_CONTEXT *NewTerminalContext; + ASSERT (CallbackData !=3D NULL); ConOutCheck =3D &CallbackData->BmmFakeNvData.ConsoleOutCheck[0]; for (Index =3D 0; ((Index < ConsoleOutMenu.MenuNumber) && \ (Index < MAX_MENU_NUMBER)) ; Index++) { =20 NewMenuEntry =3D BOpt_GetMenuEntry (&ConsoleOutMenu, Index); NewConsoleContext =3D (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableCon= text; =20 ConOutCheck[Index] =3D NewConsoleContext->IsActive; } + + for (Index =3D 0; Index < TerminalMenu.MenuNumber; Index++) { + NewMenuEntry =3D BOpt_GetMenuEntry (&TerminalMenu, Inde= x); + NewTerminalContext =3D (BM_TERMINAL_CONTEXT *) NewMenuEntry->= VariableContext; + ASSERT (Index + ConsoleOutMenu.MenuNumber < MAX_MENU_NUMBER); + ConOutCheck[Index + ConsoleOutMenu.MenuNumber] =3D NewTerminalContext-= >IsConOut; + } } =20 /** =20 Initialize standard error output device check box to ConsoleErrCheck[MAX= _MENU_NUMBER] @@ -1086,19 +1102,27 @@ GetConsoleErrCheck ( { UINT16 Index; BM_MENU_ENTRY *NewMenuEntry;=20 UINT8 *ConErrCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; + BM_TERMINAL_CONTEXT *NewTerminalContext; =20 ASSERT (CallbackData !=3D NULL); ConErrCheck =3D &CallbackData->BmmFakeNvData.ConsoleErrCheck[0]; for (Index =3D 0; ((Index < ConsoleErrMenu.MenuNumber) && \ (Index < MAX_MENU_NUMBER)) ; Index++) { =20 NewMenuEntry =3D BOpt_GetMenuEntry (&ConsoleErrMenu, Index); NewConsoleContext =3D (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableCon= text; =20 ConErrCheck[Index] =3D NewConsoleContext->IsActive; } + + for (Index =3D 0; Index < TerminalMenu.MenuNumber; Index++) { + NewMenuEntry =3D BOpt_GetMenuEntry (&TerminalMenu, Inde= x); + NewTerminalContext =3D (BM_TERMINAL_CONTEXT *) NewMenuEntry->= VariableContext; + ASSERT (Index + ConsoleErrMenu.MenuNumber < MAX_MENU_NUMBER); + ConErrCheck[Index + ConsoleErrMenu.MenuNumber] =3D NewTerminalContext-= >IsStdErr; + } } =20 /** =20 Initialize terminal attributes (baudrate, data rate, stop bits, parity a= nd terminal type) --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel