From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.3157.1592469545209523581 for ; Thu, 18 Jun 2020 01:39:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=tC6AAmZ5; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: dandan.bi@intel.com) IronPort-SDR: 56ummKhMOcd3YgYcLozp7dzJuIa+rkCQ4UpIEEWphmvSLsN6Wnwg+TnVseRngJlYrlAkJBeJqM rDAM1Zlxt64w== X-IronPort-AV: E=McAfee;i="6000,8403,9655"; a="227191878" X-IronPort-AV: E=Sophos;i="5.73,526,1583222400"; d="scan'208";a="227191878" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 01:39:04 -0700 IronPort-SDR: AAsexQbUqq6MHPhomkpyTL4XgBK1zB4laK4eudsnPxcuV9FJyHUA0vcpUYyVnevmxMiKV89ULB eAZaFumriUjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,526,1583222400"; d="scan'208";a="309048581" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 18 Jun 2020 01:39:03 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 01:39:03 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 01:39:03 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 01:39:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwlWC73S6G88ZAcdnLYCGn+pT8baKX3rtlkaDs2vQdCIIXH1UJB0M3DjzJYLrtsC+b0r4a2bmkpk66ABB3rAbGqDTYyHxFA9fk+EXgJxuBEtqeJIO8Zrqpezn70ciEdngcQRd49rYmjPr67CF2ScrDC+s6nyjrIPR1o6fAMkQOf+Bm1JspeDGXswXGw+dQDChX4VdCaIJclmoUIRuhNVDBkK/+MAEHJ0LhpslrWL3VLv09WmQyvvCK+6HRhRl+HEM3qwD2CX78q+3Mx0/lzOb6LBdqsUP9FD7rMkr4q67sWjWdAbe5kILi36motwSlQCBUWQURsThw3jgXvnGi4YIQ== 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=OuVw/USeRnjeeDoTeYVJZVKxvQdXs9W2o9x2sgNSJUs=; b=iqTTBxHJX09jIU2YrytNkayU1JSj17uZ6L/ej9MrEq6m74jD5s4hEOQIZoOYTRxDr689hkdeH5oWdNJ3JaT8YQQM8mLIi9jmgH+R48a0QALF4oY0y7zynRxs3+5uIBMFTxU+dpaHEMZo1dO6ywM1JBBygZVWlP963iYoNVyiiOa6SFtJuPAca9HndeET3eJIBlg8V3aodgSWkdP1/f9XKrH5PayZqIs9ZhyYtTsKq/nS4i9j9jPkv0Yd4/fnSFo4eV01jnmYV+R+kP7NCE53mlJOsJChpjqTBDSMVo56wiDbRC2sp1V50OrK9H4YW0GelOA3biVkXHSk9+ZQ+mVdnA== 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=OuVw/USeRnjeeDoTeYVJZVKxvQdXs9W2o9x2sgNSJUs=; b=tC6AAmZ5RaRCDOCHyuhn7ARtAKEYVONqJTQonvSEk2Lg5YbTraI3N4xFBYBc4tJzPw6lf7b1x56FOf9yKKYH8d3GVwfbQgG9YZjR9IdJuEvKS1w5tiXQVj8BXW0RI4LsYU5ceCI67K1k4u6e3Tgi5KDgRa8mG4Cbvw/ctTSFgS8= Received: from BN6PR11MB1393.namprd11.prod.outlook.com (2603:10b6:404:3c::12) by BN7PR11MB2867.namprd11.prod.outlook.com (2603:10b6:406:b9::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 08:39:00 +0000 Received: from BN6PR11MB1393.namprd11.prod.outlook.com ([fe80::a1f4:15d6:9a79:de03]) by BN6PR11MB1393.namprd11.prod.outlook.com ([fe80::a1f4:15d6:9a79:de03%11]) with mapi id 15.20.3088.029; Thu, 18 Jun 2020 08:39:00 +0000 From: "Dandan Bi" To: "Dong, Eric" , "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/CQgAARPsA= Date: Thu, 18 Jun 2020 08:39:00 +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: 2ff8a99d-df8a-4336-97dc-08d813630cb0 x-ms-traffictypediagnostic: BN7PR11MB2867: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:497; x-forefront-prvs: 0438F90F17 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QfIsTd7EgvvSo8gQOYJx74Kg/FogLzNXCTiB72jl5bkxx9kc4YcYIyYlmMY+P62rMOmBx/OefBkSESA71YJyVltv6ZlP4GfGgji0VW7a2A5MsOQ/BHULfFAuvZjNVTYaH9+uVF10HAFrkBJRWzADg8ehsUw8eRcqwdLB1BIDRVBjeJl5ikxbgwTZ6BJCPE0E2BO6bCWRBx7DfvbFIlucEgXnpko+KgkA40JWOqEBoWspmgGIcp/w14rPfinLI7UF+qItYwAkHliEmFSbnMZMxJsz+fgYF+Ju0CA1dH/noXlfaepbDsQLrETSNhIa3MDi7kQGPq3THntyJ1o9Pqlc3hrAlG2q3i6OHRoEclqSWpukqNNMX+qraYZqDHqnUFpIDzJ9iprZ+Qh7Uy9MgpsJEw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB1393.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(346002)(376002)(366004)(39860400002)(396003)(26005)(6506007)(52536014)(53546011)(66446008)(4326008)(107886003)(66556008)(316002)(66476007)(966005)(83380400001)(64756008)(2906002)(86362001)(9686003)(7696005)(55016002)(8936002)(71200400001)(8676002)(186003)(15650500001)(76116006)(66946007)(478600001)(5660300002)(66574015)(110136005)(33656002)(19627235002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: rZE65U0RDsoxrVNKHdyBW2cZQhKDJjGPlGMATQaYmfcu48u9Lfoo2lWrx5UM5NOXv2UiptyQuJ3zCq++Xb3gtbWqDW08HH6r5ToBuLR+M69ylh9Jbtznt4mWxQGQdKWad47OWwPRbtcGPovRuc/8KtwCTz3mVwHkPreoxWs5Dowz+9KazrMaDyBcPcHYuzLx028vAEg4EQwZCpW/k4n+h3xO/RhKgAGdaytpXSIPTsLl2vVsbNxvwE5uKLVol09QuJl7yxe0Uunxrvp2cBqIVaCVwtT2NFUjQJLVmwUlNXlskS4rhn++222zr//l7apub/kVs/R4wjRcdh6RX9C2WNrO1S24Bs+3h5VKes9GbQxEGx6W/FCf11DQroidI7heQYtOm+qEKDlpkcvl5v+noeVPLRQB09Edn+eVqUN93TSNxXZ+vWMydvOncp6mgrYgxiMzhZgkOYSDW+DmnJtbXK3x08HhlXPbwdxip+fQpiY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2ff8a99d-df8a-4336-97dc-08d813630cb0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2020 08:39:00.7725 (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: /jU03SfCYgO2UDE2lNEA2VVd18ghRXBB7IjzZxUpTboP1Awtz8fvTRNJrhugR1mBzyPzHN2+KWwuKr49sisVXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2867 Return-Path: dandan.bi@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable 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 Formset : Formset Guid =3D 9E0C30BC-3F06-4BA6-= 8288-09179B855DBE. [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 Formset : Formset Guid =3D A04A27F4-DF00-4D= 42-B552-39511302113D. [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@edk2.groups.io > Cc: Gao, Liming > Subject: RE: [patch] MdeModulePkg/DisplayEngine: Add Debug message to > show mismatch menu info >=20 > Hi Dandan, >=20 > 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. >=20 > 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. >=20 > Thanks, > Eric >=20 > > -----Original Message----- > > From: Bi, Dandan > > Sent: Thursday, June 18, 2020 11:24 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming ; Dong, 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