From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 085477803D7 for ; Wed, 20 Mar 2024 10:35:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WYIbr8o/SMiBzRhprj7Or8iuRpE9BID8Bhjv9qht8Fo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1710930899; v=1; b=BpLQc6A7SlrrQKMvl503PwRTe4Vi5ZKWghJgXMlkyCMq0wLLVMghym+PbSGbFbfmrvt/C93e 2OP8ioL4npmnmjiKsI8CzXZcKFqAbZEdgho0N6nLkaFWv3KVo+yfP9/fLLVZBAhHjXaPaVPe5vg /OEYlMPNoL9xWMHteOdCXu15F0tPWprdxfvKsi3WpPULX3NeUBmn3/NXGJiMBDFUMhoX15Z+QI5 lY/HZSPte6/HtCcUurz+i3ZRYZOeMpqtTkO7dctFtLvyRent3hla5bu1btpjkOOxZYQnphmcncQ L649ygwDMFKaDcCuAyEYMBm/P2vMGeK1QTyWWr1QzOm4w== X-Received: by 127.0.0.2 with SMTP id IuyoYY7687511xctFz4SHRxf; Wed, 20 Mar 2024 03:34:59 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mx.groups.io with SMTP id smtpd.web11.40570.1710930898649931253 for ; Wed, 20 Mar 2024 03:34:58 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5683341" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5683341" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 03:34:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="45091325" X-Received: from chentina-desk1.gar.corp.intel.com ([10.5.215.0]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 03:34:54 -0700 From: "Tina Chen" To: devel@edk2.groups.io Cc: Tina Chen , Jiewen Yao , Rahul Kumar , Dandan Bi , Ming Tan , Arthur Chen , Xiao X Chen , CindyX Kuo Subject: [edk2-devel] [PATCH v2] SecurityPkg/OpalPasswordDxe: Update UI according to UEFI spec Date: Wed, 20 Mar 2024 18:33:38 +0800 Message-ID: <20240320103337.1789-2-tina.chen@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 20 Mar 2024 03:34:58 -0700 Reply-To: devel@edk2.groups.io,tina.chen@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 4Rt3b3KNAsL1FfDFSyY465dBx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=BpLQc6A7; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4735 Should not call HiiGetBrowserData() and HiiSetBrowserData() in FORM_OPEN call back function. Those APIs are called within OpalHiiSetBrowserData/OpalHiiGetBrowserData which have been used by OpalHii.c. 1. Move HiiPopulateMainMenuForm() into ExtracConfig() for the Opal main formset initialize. 2. Move HiiPopulateDiskInfoForm() to HiiSelectDisk(). 3. Remove HiiGetBrowserData() and HiiSetBrowserData() redundant usage. Cc: Jiewen Yao Cc: Rahul Kumar Cc: Dandan Bi Cc: Ming Tan Cc: Arthur Chen Cc: Xiao X Chen Cc: CindyX Kuo Signed-off-by: Tina Chen --- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 23 ++++---------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/= Opal/OpalPassword/OpalHii.c index 8035f44ebe..de58ab7df3 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c @@ -494,7 +494,6 @@ HiiPopulateMainMenuForm ( }=0D }=0D =0D - OpalHiiSetBrowserData ();=0D return EFI_SUCCESS;=0D }=0D =0D @@ -632,17 +631,7 @@ DriverCallback ( HiiKey.Raw =3D QuestionId;=0D HiiKeyId =3D (UINT8)HiiKey.KeyBits.Id;=0D =0D - if (Action =3D=3D EFI_BROWSER_ACTION_FORM_OPEN) {=0D - switch (HiiKeyId) {=0D - case HII_KEY_ID_VAR_SUPPORTED_DISKS:=0D - DEBUG ((DEBUG_INFO, "HII_KEY_ID_VAR_SUPPORTED_DISKS\n"));=0D - return HiiPopulateMainMenuForm ();=0D -=0D - case HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS:=0D - DEBUG ((DEBUG_INFO, "HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTION= S\n"));=0D - return HiiPopulateDiskInfoForm ();=0D - }=0D - } else if (Action =3D=3D EFI_BROWSER_ACTION_CHANGING) {=0D + if (Action =3D=3D EFI_BROWSER_ACTION_CHANGING) {=0D switch (HiiKeyId) {=0D case HII_KEY_ID_GOTO_DISK_INFO:=0D return HiiSelectDisk ((UINT8)HiiKey.KeyBits.Index);=0D @@ -819,6 +808,7 @@ HiiSelectDisk ( {=0D OpalHiiGetBrowserData ();=0D gHiiConfiguration.SelectedDiskIndex =3D Index;=0D + HiiPopulateDiskInfoForm ();=0D OpalHiiSetBrowserData ();=0D =0D return EFI_SUCCESS;=0D @@ -840,8 +830,6 @@ HiiPopulateDiskInfoForm ( TCG_RESULT Ret;=0D CHAR8 *DiskName;=0D =0D - OpalHiiGetBrowserData ();=0D -=0D DiskName =3D HiiDiskGetNameCB (gHiiConfiguration.SelectedDiskIndex);=0D if (DiskName =3D=3D NULL) {=0D return EFI_UNSUPPORTED;=0D @@ -903,11 +891,6 @@ HiiPopulateDiskInfoForm ( GetSavedOpalRequest (OpalDisk, &gHiiConfiguration.OpalRequest);=0D }=0D =0D - //=0D - // Pass the current configuration to the BIOS=0D - //=0D - OpalHiiSetBrowserData ();=0D -=0D return EFI_SUCCESS;=0D }=0D =0D @@ -1061,6 +1044,8 @@ ExtractConfig ( FreePool (ConfigRequestHdr);=0D }=0D =0D + HiiPopulateMainMenuForm ();=0D +=0D //=0D // Convert Buffer Data to by helper function BlockToConfig(= )=0D //=0D --=20 2.43.0.windows.1 -- Tina Chen -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116934): https://edk2.groups.io/g/devel/message/116934 Mute This Topic: https://groups.io/mt/105041945/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-