From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.410.1592525929169885354 for ; Thu, 18 Jun 2020 17:18:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=aOgk7Vqa; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: eric.dong@intel.com) IronPort-SDR: pbruDZWRLjnsYlthggb76X8kzRVFoe/AQwZfaWqDpKWOXjLuef4NoncRosT93WZ/kZ3cZqLJVQ IuHyGyqglSqg== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="208008478" X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208,217";a="208008478" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 17:18:47 -0700 IronPort-SDR: KACwq8sJjjvQXfS8+Hg1wqlgAiJzFg/lyteL8Ms4QotB0G3yrjzy8iJRV5QMtn85rHoNgy/5cJ ebXZrr7PbWLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208,217";a="262163959" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 18 Jun 2020 17:18:47 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 17:18:47 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 17:18:47 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 17:18:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AdE1UeQfngu/OCdx7LOPQvkCboEw4yuRVTUgv0NgwRjvTrqYZVto8kpiQsyliZXLVmdJ2IfVCMXuF22dTg/jlARMhda+GKaFPs177PQpE0UtXsuvXKsMR1kCZUqIw3j/wirCslYGtXm1XGGT25pTW44bYSf9RO1+qiGcHhgjQyDBgrhlHdT392+uoaNc29VUGFcCxRvYtXyWLfYgxOkhoIWZKTWnXi5F7uSu3GKclHt9nPOI9peFPW0An9N/eX7WcrXdoycge0+PdhUkHcm4cPR0pqhPNKUIx/tADeq9yH5YJCI/Q0RVc2LdamnsvNqBDMtvT0NcieNhoubiT/6tJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fy07J5tUCPpCSl2G9a21k/sppUjimBQlCtp11iM0Fok=; b=AkakCetqyvBneWHe4NPntCKS03Y2VFWUuk3zqyRztbnI87S7rz7w29XqeQbsJOJgLR9ogikf0BoZ471gfrE8gnBe9gd2GYT4aQJ6k5IrITPlh6v5VrfnpwRheiVIpbxgAtCStvD3eq4//dlYxpYQo03hTBsqGlt4QYgeRi875KllMO4nXoZaCRvJ3qqJjHYNJLNnvllrehFzlvliDL9xTRDUj/0w0xo3cPBWLl5etQlkGtmr+4Ft0Eaqy67lvN3M7DJfxW88sLE3d3XYsks5OsUahPLoDmwj/U0kVt5MPqlb7BNaLEALK/samkxxjPX/qKaceFCU/XCi/hR3gHAaNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fy07J5tUCPpCSl2G9a21k/sppUjimBQlCtp11iM0Fok=; b=aOgk7Vqa2Be2g+60mvLN51YbUMNoZnshP/HrEX29RF5WFajYaikWDJ9UpzWO5LbOHlbaQWEBagTXUrashFtWXcCTYvHz+KffpQ83se9StSzUPu0/wCIGEdhYeUvpJRYVlzs50NNHWaZyE6oOiaOQOL0VCFP+gukBH5e5kh2ZIKQ= Received: from DM6PR11MB3274.namprd11.prod.outlook.com (2603:10b6:5:b::26) by DM6PR11MB3131.namprd11.prod.outlook.com (2603:10b6:5:6d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Fri, 19 Jun 2020 00:18:45 +0000 Received: from DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::cc01:6f05:1402:e7d7]) by DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::cc01:6f05:1402:e7d7%6]) with mapi id 15.20.3109.021; Fri, 19 Jun 2020 00:18:45 +0000 From: "Dong, Eric" To: "Bi, Dandan" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [patch] MdeModulePkg/DisplayEngine: Add Debug message to show mismatch menu info Thread-Topic: [patch] MdeModulePkg/DisplayEngine: Add Debug message to show mismatch menu info Thread-Index: AQHWRR/5WIOx4Vp3J02or9fHkmpSDKjd5/CQgAARPsCAABW8UA== Date: Fri, 19 Jun 2020 00:18:44 +0000 Message-ID: References: <20200618032410.106828-1-dandan.bi@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 15ccbbb4-ee9c-4875-379f-08d813e65450 x-ms-traffictypediagnostic: DM6PR11MB3131: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:773; x-forefront-prvs: 0439571D1D x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TsA5qDTW/DGWNCCAeHhp49lr2EgECJQlNEACGOEkU4QVZR0oPqqAVSYFS7pPuDMPXF+IZzElqSOqWxg3ePRXXW4huts3gorhsB7x7s3eBNb8RQpjTC+YNswd6HIZcJas0xCVGTielKyJQu3mSdkUUXS6qelYT0NwFEUZ4eyixjwJJ+h7Yvv9uWPoOg07OA9W46fRe383aXFK0vzRpo2vm54FjZy0+ANQyiWjDey1gQhCN/bhRlFsmJMUyyTUatbK5i/WkG9Qt19MqJdD5p9pbGReYQGWVKtcYDdY4qxXTENXLinC+uXENBa6DiK/4nOOQ/lr/2anUnTCOHu/TnLkty/AEuEX909v//xzXB9nnH4Q6Fd4P4R2fjQ4CtqgbULljfowC/v/Qea5Fu654jJx9A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3274.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(396003)(366004)(39860400002)(136003)(6506007)(86362001)(7696005)(53546011)(110136005)(76116006)(316002)(66446008)(66946007)(64756008)(66574015)(26005)(66476007)(66556008)(186003)(166002)(83380400001)(71200400001)(52536014)(4326008)(2906002)(9326002)(15650500001)(8676002)(33656002)(55016002)(966005)(478600001)(107886003)(5660300002)(9686003)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: eq7LdQYRUCl+uIKpIgGEQFhCDPFRcG7peKoso2ONkk64Yn7IH/nh2RIb4P0yanSC/R1yWO1oyrbLWJHhBxa9szrbWgaol8ZZbTxon/1AQD8XQuhyMNTJJIQQk+BZ44xYMl8V4s/0IUppRyu+oROMO+V7YfnDYgAaIUvkzRzQOsXII2e3D3nnmHlsJwnlPOnqZsafy1GwqqKbjiCwRQh+SPt1u067YT3T73jNp4rVkoFH+sxx7DC4S4mma3RUOy/uPIYEWE6jp7/DXz33JuMBzU6ODSetvFVnDRnG9l0sYr+0bHmJn0924IYd9uioBjRbdiv6wIFeGSE2QfyDauEFbqhQcmd4wFoeW61awFTWsKAHz1YRxZYxrZ4A161rA4Wx6eJfGc0DU48gZKSY6hbtvljdMidb2sN3V7aEjMIcJgHcnupdooe8GSmvnBSnvwVhdsw7gl/vyawSqLT4bIx6r0izVZqnQB4L1ukMmIRQFEY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 15ccbbb4-ee9c-4875-379f-08d813e65450 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2020 00:18:44.9545 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZgOyNl4a1aOG5U6vDYiP+JC+FosDd9tWbuCDzIzQCDx7vwv3mhGMpZNIT0ppaaklCE0paJeBzVS/M/61nE+Ppw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3131 Return-Path: eric.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM6PR11MB3274B27F79BA2DA5AC86C66BFE980DM6PR11MB3274namp_" --_000_DM6PR11MB3274B27F79BA2DA5AC86C66BFE980DM6PR11MB3274namp_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hi Dandan, Thanks for your detail explanation, add my comments below. Thanks, Eric From: Bi, Dandan Sent: Thursday, June 18, 2020 4:39 PM To: Dong, Eric ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [patch] MdeModulePkg/DisplayEngine: Add Debug message to show = mismatch menu info Hi Eric, For example: For one of, if its current value is 4, but there is no option with value 4,= then it will pop up mismatch window and the debug message like below. [DisplayEngine]: Mismatch Error : Current value not exists in the op= tion list. <=3D it's better to add this line to= show an overview of error info. [DisplayEngine]: Mismatch Formset : Formset Guid =3D 9E0C30BC-3F06-4BA6-= 8288-09179B855DBE. Formset title =3D "####" <=3D Title also ne= eds if save happen in system level. [DisplayEngine]: Mismatch Form : FormId =3D 4096, Form title =3D F= ront Page. [DisplayEngine]: Mismatch OneOf : Named =3D Select Language. [DisplayEngine]: Mismatch OneOf : Current value =3D 4. [DisplayEngine]: Option 0 : Option Name =3D Standard En= glish. Option Value =3D 0. [DisplayEngine]: Option 1 : Option Name =3D Standard Fr= an=F4ais. Option Value =3D 1. [DisplayEngine]: Option 2 : Option Name =3D English. Op= tion Value =3D 2. [DisplayEngine]: Option 3 : Option Name =3D Fran=F4ais.= Option Value =3D 3. For OrderedList, its value is in the type of array, if one of array value i= s 4, but there is no option with value 4, then it will pop up mismatch wind= ow and the debug message like below. [DisplayEngine]: Mismatch Error : Current one value not exists i= n the option list. <=3D same as above reason, y= ou can provide better words if you have. [DisplayEngine]: Mismatch Formset : Formset Guid =3D A04A27F4-DF00-4D= 42-B552-39511302113D. Formset title =3D "####" <=3D Title al= so needs if save happen in system level. [DisplayEngine]: Mismatch Form : FormId =3D 1, Form title =3D M= y First Setup Page. [DisplayEngine]: Mismatch OrderedList: Name =3D Boot Order. [DisplayEngine]: Mismatch OrderedList: Value Arrary: Val= ue[0] =3D4. Val= ue[1] =3D1. Val= ue[2] =3D3. Val= ue[3] =3D0. Val= ue[4] =3D0. Val= ue[5] =3D0. Val= ue[6] =3D0. Val= ue[7] =3D0. [DisplayEngine]: Option 0 : Option Name =3D ATAPI CD= . Option Value =3D 2. [DisplayEngine]: Option 1 : Option Name =3D IDE HDD.= Option Value =3D 1. [DisplayEngine]: Option 2 : Option Name =3D PXE. Opt= ion Value =3D 3. Thanks, Dandan > -----Original Message----- > From: Dong, Eric > > Sent: Thursday, June 18, 2020 2:28 PM > To: Bi, Dandan >; devel@e= dk2.groups.io > Cc: Gao, Liming > > Subject: RE: [patch] MdeModulePkg/DisplayEngine: Add Debug message to > show mismatch menu info > > Hi Dandan, > > It's good to show more info about the mismatch error. Current end user > doesn't know which question need to check if this error appears. > > Can you post an example about the error message for one of and for > ordered list? We need to make sure the message is easy to be understood > and the end user knows what need to do to fix this error. > > Thanks, > Eric > > > -----Original Message----- > > From: Bi, Dandan > > > Sent: Thursday, June 18, 2020 11:24 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming >; Do= ng, Eric > > > > > Subject: [patch] MdeModulePkg/DisplayEngine: Add Debug message to > show > > mismatch menu info > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2326 > > > > Currently when meet mismatch case for one-of and ordered-list menu, > > just show a popup window to indicate mismatch, no more info for > debugging. > > This patch is to add more debug message about mismatch menu info which > > is helpful to debug. > > > > Cc: Liming Gao > > > Cc: Eric Dong > > > Signed-off-by: Dandan Bi > > > --- > > .../DisplayEngineDxe/ProcessOptions.c | 78 +++++++++++++++++++ > > 1 file changed, 78 insertions(+) > > > > diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c > > b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c > > index e7306f6d04..4331b2903c 100644 > > --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c > > +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c > > @@ -911,10 +911,73 @@ PasswordProcess ( > > FreePool (StringPtr); > > > > return Status; > > } > > > > +/** > > + Print some debug message about mismatched menu info. > > + > > + @param MenuOption The MenuOption for this Question. > > + > > +**/ > > +VOID > > +PrintMismatchMenuInfo ( > > + IN UI_MENU_OPTION *MenuOption > > +) > > +{ > > + CHAR16 *FormTitleStr; > > + CHAR16 *OneOfOptionStr; > > + CHAR16 *QuestionName; > > + LIST_ENTRY *Link; > > + FORM_DISPLAY_ENGINE_STATEMENT *Question; > > + EFI_IFR_ORDERED_LIST *OrderList; > > + UINTN Index; > > + EFI_HII_VALUE HiiValue; > > + EFI_HII_VALUE *QuestionValue; > > + DISPLAY_QUESTION_OPTION *Option; > > + UINT8 *ValueArray; > > + UINT8 ValueType; > > + > > + Question =3D MenuOption->ThisTag; > > + FormTitleStr =3D GetToken (gFormData->FormTitle, > > + gFormData->HiiHandle); > > + > > + DEBUG ((DEBUG_ERROR, "\n[DisplayEngine]: Mismatch Formset : > > Formset Guid =3D %g.\n", &gFormData->FormSetGuid)); > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch Form : FormId > > =3D %d, Form title =3D %s.\n", gFormData->FormId, FormTitleStr)); > > + > > + if (Question->OpCode->OpCode =3D=3D EFI_IFR_ORDERED_LIST_OP) { > > + QuestionName =3D GetToken (((EFI_IFR_ORDERED_LIST*)MenuOption- > > >ThisTag->OpCode)->Question.Header.Prompt, gFormData->HiiHandle); > > + Link =3D GetFirstNode (&Question->OptionListHead); > > + Option =3D DISPLAY_QUESTION_OPTION_FROM_LINK (Link); > > + ValueType =3D Option->OptionOpCode->Type; > > + > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch OrderedList: > Name > > =3D %s.\n", QuestionName)); > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch OrderedList: > > + Value Arrary:\n")); > > + > > + OrderList =3D (EFI_IFR_ORDERED_LIST *) Question->OpCode; > > + for (Index =3D 0; Index < OrderList->MaxContainers; Index++) { > > + ValueArray =3D Question->CurrentValue.Buffer; > > + HiiValue.Value.u64 =3D GetArrayData (ValueArray, ValueType, Inde= x); > > + DEBUG ((DEBUG_ERROR, " Val= ue[%d] > =3D%d.\n",Index, > > HiiValue.Value.u64)); > > + } > > + } else if (Question->OpCode->OpCode =3D=3D EFI_IFR_ONE_OF_OP) { > > + QuestionName =3D GetToken (((EFI_IFR_ONE_OF*)MenuOption- > >ThisTag- > > >OpCode)->Question.Header.Prompt, gFormData->HiiHandle); > > + QuestionValue =3D &Question->CurrentValue;; > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch OneOf : Named > > =3D %s.\n", QuestionName)); > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch OneOf : > Current > > value =3D %d.\n",QuestionValue->Value.u8)); > > + } > > + > > + Index =3D 0; > > + Link =3D GetFirstNode (&Question->OptionListHead); while (!IsNull > > + (&Question->OptionListHead, Link)) { > > + Option =3D DISPLAY_QUESTION_OPTION_FROM_LINK (Link); > > + OneOfOptionStr =3D GetToken (Option->OptionOpCode->Option, > > gFormData->HiiHandle); > > + DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Option %d : Opti= on > > Name =3D %s. Option Value =3D %d.\n",Index,OneOfOptionStr,Option- > > >OptionOpCode->Value.u8)); > > + Link =3D GetNextNode (&Question->OptionListHead, Link); > > + Index++; > > + } > > +} > > + > > /** > > Process a Question's Option (whether selected or un-selected). > > > > @param MenuOption The MenuOption for this Question. > > @param Selected TRUE: if Question is selected. > > @@ -1010,10 +1073,15 @@ ProcessOptions ( > > break; > > } > > > > OneOfOption =3D ValueToOption (Question, &HiiValue); > > if (OneOfOption =3D=3D NULL) { > > + // > > + // Print debug msg for the mistach menu. > > + // > > + PrintMismatchMenuInfo (MenuOption); > > + > > if (SkipErrorValue) { > > // > > // Just try to get the option string, skip the value which= not has > option. > > // > > continue; > > @@ -1102,10 +1170,15 @@ ProcessOptions ( > > continue; > > } > > > > if (!ValueInvalid) { > > ValueInvalid =3D TRUE; > > + // > > + // Print debug msg for the mistach menu. > > + // > > + PrintMismatchMenuInfo (MenuOption); > > + > > // > > // Show error message > > // > > do { > > CreateDialog (&Key, gEmptyString, gOptionMismatch, > > gPressEnter, gEmptyString, NULL); @@ -1152,10 +1225,15 @@ > ProcessOptions ( > > *OptionString =3D AllocateZeroPool (BufferSize); > > ASSERT (*OptionString); > > > > OneOfOption =3D ValueToOption (Question, QuestionValue); > > if (OneOfOption =3D=3D NULL) { > > + // > > + // Print debug msg for the mistach menu. > > + // > > + PrintMismatchMenuInfo (MenuOption); > > + > > if (SkipErrorValue) { > > // > > // Not report error, just get the correct option string info= . > > // > > Link =3D GetFirstNode (&Question->OptionListHead); > > -- > > 2.18.0.windows.1 --_000_DM6PR11MB3274B27F79BA2DA5AC86C66BFE980DM6PR11MB3274namp_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable

Hi Dandan,

 

Thanks for your detail explanation, add my comments= below.

 

Thanks,

Eric

From: Bi, Dandan <dandan.bi@intel= .com>
Sent: Thursday, June 18, 2020 4:39 PM
To: Dong, Eric <eric.dong@intel.com>; devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>
Subject: RE: [patch] MdeModulePkg/DisplayEngine: Add Debug message t= o show mismatch menu info

 

Hi Eric,

For example:

For one of, if its cur= rent value is 4, but there is no op= tion with value 4, then it will pop = ;up mismatch window and the debug message&nbs= p;like below.

[DisplayEngine]: Mismatch&nbs= p;Error        : Current value not exist= s in the option list.         =             &nb= sp;       <=3D it’s better to add th= is line to show an overview of error info.
[DisplayEngine]: Mismatch Formset &n= bsp;  : Formset Guid =3D 9E0C30BC-3F06-4BA6-8= 288-09179B855DBE.   Formset title =3D “####”  = ;          <=3D Title = also needs if save happen in system level.
[DisplayEngine]: Mismatch Form &= nbsp;       : FormId =3D = 4096,  Form title =3D Front Page.
[DisplayEngine]: Mismatch OneOf =      : Named =3D Select Langua= ge.
[DisplayEngine]: Mismatch OneOf =      : Current value =3D 4.
[DisplayEngine]: Option 0  =             &nb= sp;      : Option Name =3D&nbs= p;Standard English. Option Value =3D 0.
[DisplayEngine]: Option 1  =             &nb= sp;      : Option Name =3D&nbs= p;Standard Fran=F4ais. Option Value =3D 1.<= br> [DisplayEngine]: Option 2  =             &nb= sp;      : Option Name =3D&nbs= p;English. Option Value =3D 2.
[DisplayEngine]: Option 3  =             &nb= sp;      : Option Name =3D&nbs= p;Fran=F4ais. Option Value =3D 3.

For OrderedList, its value = is in the type of array, if one of&= nbsp;array value is 4, but there is no&n= bsp;option with value 4, then it will po= p up mismatch window and the debug messa= ge like below.

[DisplayEngine]: Mismatch&nbs= p;Error            := Current one value not exists in the option list.    &n= bsp;            = ;            <=3D= same as above reason, you can provide better words if you have.
[DisplayEngine]: Mismatch Formset&nbs= p;      : Formset Guid =3D&nbs= p;A04A27F4-DF00-4D42-B552-39511302113D.     Formset title =3D “####”=            <=3D = Title also needs if save happen in system level.
[DisplayEngine]: Mismatch Form &= nbsp;          : For= mId =3D 1,  Form title =3D My First=  Setup Page.
[DisplayEngine]: Mismatch OrderedList= : Name =3D Boot Order.
[DisplayEngine]: Mismatch OrderedList= : Value Arrary:
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[0] =3D4.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[1] =3D1.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[2] =3D3.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[3] =3D0.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[4] =3D0.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[5] =3D0.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[6] =3D0.
        = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp; Value[7] =3D0.
[DisplayEngine]: Option 0  =             &nb= sp;         : Option = ;Name =3D ATAPI CD. Option Value =3D 2.<= /span>
[DisplayEngine]: Option 1  =             &nb= sp;         : Option = ;Name =3D IDE HDD. Option Value =3D 1.
[DisplayEngine]: Option 2  =             &nb= sp;         : Option = ;Name =3D PXE. Option Value =3D 3.


Thanks,
Dandan
> -----Original Message-----
> From: Dong, Eric <= eric.dong@intel.com> > Sent: Thursday, June = 18, 2020 2:28 PM
> To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io
> Cc: Gao, Liming <<= a href=3D"mailto:liming.gao@intel.com">liming.gao@intel.com><= br> > Subject: RE: [patch] = MdeModulePkg/DisplayEngine: Add Debug message to=
> show mismatch menu in= fo

> Hi Dandan,

> It's good to show&nbs= p;more info about the mismatch error. Current=  end user
> doesn't know which qu= estion need to check if this error appea= rs.

> Can you post an = example about the error message for one = of and for
> ordered list? We need=  to make sure the message is easy t= o be understood
> and the end user = ;knows what need to do to fix this = error.

> Thanks,
> Eric

> > -----Original Message--= ---
> > From: Bi, Dandan&n= bsp;<dandan.bi@intel.com><= /span>
> > Sent: Thursday, Ju= ne 18, 2020 11:24 AM
> > To: devel@edk2.groups.io
> > Cc: Gao, Liming&nb= sp;<liming.gao@intel.com>= ; Dong, Eric
> > <eric.dong@intel.com>
> > Subject: [patch] M= deModulePkg/DisplayEngine: Add Debug message to<= br> > show
> > mismatch menu info=
> >
> > REF: https://bugzilla.tianocore.= org/show_bug.cgi?id=3D2326
> >
> > Currently when mee= t mismatch case for one-of and ordered-list&n= bsp;menu,
> > just show a p= opup window to indicate mismatch, no more&nbs= p;info for
> debugging.
> > This patch is = ;to add more debug message about mismatch&nbs= p;menu info which
> > is helpful to = ;debug.
> >
> > Cc: Liming Gao&nbs= p;<liming.gao@intel.com><= /span>
> > Cc: Eric Dong = ;<eric.dong@intel.com>
> > Signed-off-by: Dandan&n= bsp;Bi <dandan.bi@intel.com<= /a>>
> > ---
> >  .../DisplayEngineDxe/P= rocessOptions.c         | = ;78 +++++++++++++&= #43;+++++
> >  1 file chang= ed, 78 insertions(+)
> >
> > diff --git a/MdeMo= dulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
> > b/MdeModulePkg/Universal/Dis= playEngineDxe/ProcessOptions.c
> > index e7306f6d04..4331b= 2903c 100644
> > --- a/MdeModulePkg/Univ= ersal/DisplayEngineDxe/ProcessOptions.c
> > +++ b/MdeMo= dulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
> > @@ -911,10 +91= 1,73 @@ PasswordProcess (
> >    FreePool&n= bsp;(StringPtr);
> >
> >    return&nbs= p;Status;
> >  }
> >
> > +/**
> > +  Print = some debug message about mismatched menu info= .
> > +
> > +  @param = ; MenuOption         &nbs= p;   The MenuOption for this Question.
> > +
> > +**/
> > +VOID
> > +PrintMismatchMenuInfo&n= bsp;(
> > +  IN &nb= sp;UI_MENU_OPTION         &nbs= p;    *MenuOption
> > +)
> > +{
> > +  CHAR16 = ;            &n= bsp;            = ;*FormTitleStr;
> > +  CHAR16 = ;            &n= bsp;            = ;*OneOfOptionStr;
> > +  CHAR16 = ;            &n= bsp;            = ;*QuestionName;
> > +  LIST_ENTRY&= nbsp;           &nbs= p;         *Link;
> > +  FORM_DISPLA= Y_ENGINE_STATEMENT   *Question;
> > +  EFI_IFR_ORD= ERED_LIST           =  *OrderList;
> > +  UINTN =             &nb= sp;            =  Index;
> > +  EFI_HII_VAL= UE            &= nbsp;      HiiValue;
> > +  EFI_HII_VAL= UE            &= nbsp;      *QuestionValue;
> > +  DISPLAY_QUE= STION_OPTION         *Option;<= /span>
> > +  UINT8 =             &nb= sp;            =  *ValueArray;
> > +  UINT8 =             &nb= sp;            =  ValueType;
> > +
> > +  Question&nb= sp;=3D MenuOption->ThisTag;
> > +  FormTitleSt= r =3D GetToken (gFormData->FormTitle,
> > + gFormData->Hii= Handle);
> > +
> > +  DEBUG = ((DEBUG_ERROR, "\n[DisplayEngine]: Mismatch Formset&nbs= p;   :
> > Formset Guid =3D&n= bsp;%g.\n", &gFormData->FormSetGuid));
> > +  DEBUG = ((DEBUG_ERROR, "[DisplayEngine]: Mismatch Form &nb= sp;     : FormId
> > =3D %d,  Form=  title =3D %s.\n", gFormData->FormId, Form= TitleStr));
> > +
> > +  if (Qu= estion->OpCode->OpCode =3D=3D EFI_IFR_ORDERED_LIST_OP) = ;{
> > +    = ;QuestionName =3D GetToken (((EFI_IFR_ORDERED_LIST*)MenuOpti= on-
> > >ThisTag->OpCode)->= ;Question.Header.Prompt, gFormData->HiiHandle);
> > +    = ;Link =3D GetFirstNode (&Question->OptionListHead);
> > +    = ;Option =3D DISPLAY_QUESTION_OPTION_FROM_LINK (Link);=
> > +    = ;ValueType =3D Option->OptionOpCode->Type;
> > +
> > +    = ;DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch O= rderedList:
> Name
> > =3D %s.\n", Q= uestionName));
> > +    = ;DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch O= rderedList:
> > + Value Arrary= :\n"));
> > +
> > +    = ;OrderList =3D (EFI_IFR_ORDERED_LIST *) Question->Op= Code;
> > +    = ;for (Index =3D 0; Index < OrderList->M= axContainers; Index++) {
> > +    = ;  ValueArray =3D Question->CurrentValue.Buffer;
> > +    = ;  HiiValue.Value.u64 =3D GetArrayData (ValueArray= , ValueType, Index);
> > +    = ;  DEBUG ((DEBUG_ERROR, "    &= nbsp;           &nbs= p;            &= nbsp;         Value[%d]=
> =3D%d.\n",Index,
> > HiiValue.Value.u64));=
> > +    = ;}
> > +  } else=  if (Question->OpCode->OpCode =3D=3D EFI_IFR_ONE_= OF_OP) {
> > +    = ;QuestionName =3D GetToken (((EFI_IFR_ONE_OF*)MenuOption-
> >ThisTag-
> > >OpCode)->Question.He= ader.Prompt, gFormData->HiiHandle);
> > +    = ;QuestionValue =3D &Question->CurrentValue;;
> > +    = ;DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch O= neOf      : Named
> > =3D %s.\n", Q= uestionName));
> > +    = ;DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Mismatch O= neOf      :
> Current
> > value =3D %d.\n&qu= ot;,QuestionValue->Value.u8));
> > +  } > > +
> > +  Index = =3D 0;
> > +  Link = =3D GetFirstNode (&Question->OptionListHead);  w= hile (!IsNull
> > + (&Question-&g= t;OptionListHead, Link)) {
> > +    = ;Option =3D DISPLAY_QUESTION_OPTION_FROM_LINK (Link);=
> > +    = ;OneOfOptionStr =3D GetToken (Option->OptionOpCode->Op= tion,
> > gFormData->HiiHandle);
> > +    = ;DEBUG ((DEBUG_ERROR, "[DisplayEngine]: Option %d&= nbsp;           :&nb= sp;Option
> > Name =3D %s. = Option Value =3D %d.\n",Index,OneOfOptionStr,Option-
> > >OptionOpCode->Value.= u8));
> > +    = ;Link =3D GetNextNode (&Question->OptionListHead,&nbs= p;Link);
> > +    = ;Index++;
> > +  } > > +}
> > +
> >  /**
> >    Process&nb= sp;a Question's Option (whether selected or u= n-selected).
> >
> >    @param&nbs= p; MenuOption         &nb= sp;   The MenuOption for this Question.<= /span>
> >    @param&nbs= p; Selected          = ;     TRUE: if Question is sel= ected.
> > @@ -1010,10 +1= 073,15 @@ ProcessOptions (
> >     &nbs= p;      break;
> >     &nbs= p;    }
> >
> >     &nbs= p;    OneOfOption =3D ValueToOption (Que= stion, &HiiValue);
> >     &nbs= p;    if (OneOfOption =3D=3D NULL) = {
> > +    = ;      //
> > +    = ;      // Print debug msg = ;for the mistach menu.
> > +    = ;      //
> > +    = ;      PrintMismatchMenuInfo (MenuOption= );
> > +
> >     &nbs= p;      if (SkipErrorValue) {
> >     &nbs= p;        //
> >     &nbs= p;        // Just try&nbs= p;to get the option string, skip the val= ue which not has
> option.
> >     &nbs= p;        //
> >     &nbs= p;        continue;
> > @@ -1102,10 +1= 170,15 @@ ProcessOptions (
> >     &nbs= p;      continue;
> >     &nbs= p;    }
> >
> >     &nbs= p;    if (!ValueInvalid) {
> >     &nbs= p;      ValueInvalid =3D TRUE;
> > +    = ;      //
> > +    = ;      // Print debug msg = ;for the mistach menu.
> > +    = ;      //
> > +    = ;      PrintMismatchMenuInfo (MenuOption= );
> > +
> >     &nbs= p;      //
> >     &nbs= p;      // Show error message<= /span>
> >     &nbs= p;      //
> >     &nbs= p;      do {
> >     &nbs= p;        CreateDialog (&K= ey, gEmptyString, gOptionMismatch,
> > gPressEnter, gEmptyStri= ng, NULL); @@ -1152,10 +1225,15 @@
> ProcessOptions (
> >     &nbs= p;  *OptionString =3D AllocateZeroPool (BufferSize= );
> >     &nbs= p;  ASSERT (*OptionString);
> >
> >     &nbs= p;  OneOfOption =3D ValueToOption (Question, = QuestionValue);
> >     &nbs= p;  if (OneOfOption =3D=3D NULL) {
> > +    = ;    //
> > +    = ;    // Print debug msg for th= e mistach menu.
> > +    = ;    //
> > +    = ;    PrintMismatchMenuInfo (MenuOption); > > +
> >     &nbs= p;    if (SkipErrorValue) {
> >     &nbs= p;      //
> >     &nbs= p;      // Not report error,&n= bsp;just get the correct option string info.<= /span>
> >     &nbs= p;      //
> >     &nbs= p;      Link =3D GetFirstNode = (&Question->OptionListHead);
> > --
> > 2.18.0.windows.1=

--_000_DM6PR11MB3274B27F79BA2DA5AC86C66BFE980DM6PR11MB3274namp_--