From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 EBC9921A6F106 for ; Mon, 17 Apr 2017 21:51:22 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2017 21:51:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,218,1488873600"; d="scan'208";a="1157345934" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 17 Apr 2017 21:51:22 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 21:51:22 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 21:51:21 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Tue, 18 Apr 2017 12:51:20 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch] MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array Thread-Index: AQHSt/bueEoXkGg3Kke6QjYlhqU7DaHKjssg Date: Tue, 18 Apr 2017 04:51:19 +0000 Message-ID: References: <1492487415-171376-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1492487415-171376-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Tue, 18 Apr 2017 04:51:23 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Bi, Dandan=20 Sent: Tuesday, April 18, 2017 11:50 AM To: edk2-devel@lists.01.org Cc: Dong, Eric Subject: [patch] MdeModulePkg/BMMUiLib: Update codes of initializing Consol= eXXXCheck array When initializing ConsoleOutCheck/ConsoleInCheck/ConsoleErrCheck array in B= MM_FAKE_NV_DATA structure, also need to consider whether the terminal devic= e is ConOut/ConIn/ConErr or not. Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../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=20 + 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=20 + 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=20 + NewTerminalContext->IsStdErr; } } =20 /** =20 Initialize terminal attributes (baudrate, data rate, stop bits, parity a= nd terminal type) -- 1.9.5.msysgit.1