From: "Tina Chen" <tina.chen@intel.com>
To: devel@edk2.groups.io
Cc: Tina Chen <tina.chen@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Rahul Kumar <rahul1.kumar@intel.com>,
Dandan Bi <dandan.bi@intel.com>, Ming Tan <ming.tan@intel.com>,
Arthur Chen <arthur.g.chen@intel.com>,
Xiao X Chen <xiao.x.chen@intel.com>,
CindyX Kuo <cindyx.kuo@intel.com>
Subject: [edk2-devel] [PATCH v2] SecurityPkg/OpalPasswordDxe: Update UI according to UEFI spec
Date: Wed, 20 Mar 2024 18:33:38 +0800 [thread overview]
Message-ID: <20240320103337.1789-2-tina.chen@intel.com> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4735
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 <jiewen.yao@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Ming Tan <ming.tan@intel.com>
Cc: Arthur Chen <arthur.g.chen@intel.com>
Cc: Xiao X Chen <xiao.x.chen@intel.com>
Cc: CindyX Kuo <cindyx.kuo@intel.com>
Signed-off-by: Tina Chen <tina.chen@intel.com>
---
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 (
}
}
- OpalHiiSetBrowserData ();
return EFI_SUCCESS;
}
@@ -632,17 +631,7 @@ DriverCallback (
HiiKey.Raw = QuestionId;
HiiKeyId = (UINT8)HiiKey.KeyBits.Id;
- if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
- switch (HiiKeyId) {
- case HII_KEY_ID_VAR_SUPPORTED_DISKS:
- DEBUG ((DEBUG_INFO, "HII_KEY_ID_VAR_SUPPORTED_DISKS\n"));
- return HiiPopulateMainMenuForm ();
-
- case HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS:
- DEBUG ((DEBUG_INFO, "HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS\n"));
- return HiiPopulateDiskInfoForm ();
- }
- } else if (Action == EFI_BROWSER_ACTION_CHANGING) {
+ if (Action == EFI_BROWSER_ACTION_CHANGING) {
switch (HiiKeyId) {
case HII_KEY_ID_GOTO_DISK_INFO:
return HiiSelectDisk ((UINT8)HiiKey.KeyBits.Index);
@@ -819,6 +808,7 @@ HiiSelectDisk (
{
OpalHiiGetBrowserData ();
gHiiConfiguration.SelectedDiskIndex = Index;
+ HiiPopulateDiskInfoForm ();
OpalHiiSetBrowserData ();
return EFI_SUCCESS;
@@ -840,8 +830,6 @@ HiiPopulateDiskInfoForm (
TCG_RESULT Ret;
CHAR8 *DiskName;
- OpalHiiGetBrowserData ();
-
DiskName = HiiDiskGetNameCB (gHiiConfiguration.SelectedDiskIndex);
if (DiskName == NULL) {
return EFI_UNSUPPORTED;
@@ -903,11 +891,6 @@ HiiPopulateDiskInfoForm (
GetSavedOpalRequest (OpalDisk, &gHiiConfiguration.OpalRequest);
}
- //
- // Pass the current configuration to the BIOS
- //
- OpalHiiSetBrowserData ();
-
return EFI_SUCCESS;
}
@@ -1061,6 +1044,8 @@ ExtractConfig (
FreePool (ConfigRequestHdr);
}
+ HiiPopulateMainMenuForm ();
+
//
// Convert Buffer Data to <ConfigResp> by helper function BlockToConfig( )
//
--
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]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2024-03-20 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 10:33 Tina Chen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-09 9:33 [edk2-devel] [PATCH v2] SecurityPkg/OpalPasswordDxe: Update UI according to UEFI spec Cindy Kuo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240320103337.1789-2-tina.chen@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox