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 29FB3AC09D4 for ; Tue, 2 Jan 2024 03:28:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Md/lVvsxnLPXernfS6B11WBa+mjcvtdkCQH9YsqdfTA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704166117; v=1; b=HQr5r9KzJIPGMx2FCBUz3BCbCWBgc05TK4MCS9f8r/QuBQQzGg9IFYjxQeli6kpRhzQKVjZz fTbZcBrnoMkQeSTkNMsWsgTWKqwHivSQd/BBJMHe7xsos3jZuXTBoq2A19qNfR3N1y1TM5SB3qD jbyhsLqhh8qYm1WehACYwfRE= X-Received: by 127.0.0.2 with SMTP id Gw33YY7687511xhdu99vAJuc; Mon, 01 Jan 2024 19:28:37 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.22085.1704166114692993276 for ; Mon, 01 Jan 2024 19:28:35 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10940"; a="396562470" X-IronPort-AV: E=Sophos;i="6.04,324,1695711600"; d="scan'208";a="396562470" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jan 2024 19:28:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,324,1695711600"; d="scan'208";a="14064239" X-Received: from mingtan1-mobl2.ccr.corp.intel.com ([10.239.153.12]) by fmviesa002.fm.intel.com with ESMTP; 01 Jan 2024 19:28:33 -0800 From: "Tan, Ming" To: devel@edk2.groups.io Cc: Liming Gao , Dandan Bi Subject: [edk2-devel] [PATCH 3/3] MdeModulePkg/DriverSampleDxe: EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY Date: Tue, 2 Jan 2024 11:27:32 +0800 Message-Id: <20240102032732.3143-4-ming.tan@intel.com> In-Reply-To: <20240102032732.3143-1-ming.tan@intel.com> References: <20240102032732.3143-1-ming.tan@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 Reply-To: devel@edk2.groups.io,ming.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: WX0v7kXtdYRXjz033w8DCgZ2x7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=HQr5r9Kz; 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: UEFI_Spec_2_10_Aug29.pdf page 1695. In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack(): If the callback function returns with the ActionRequest set to _QUESTION_APPLY, then the Forms Browser will write the current modified question value on the selected form to storage. Update the DriverSampleDxe, add a new question "Question apply test". Signed-off-by: Ming Tan Cc: Liming Gao Cc: Dandan Bi --- .../Universal/DriverSampleDxe/DriverSample.c | 14 ++++++++++++++ .../Universal/DriverSampleDxe/NVDataStruc.h | 1 + MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 10 ++++++++++ .../Universal/DriverSampleDxe/VfrStrings.uni | 4 ++++ 4 files changed, 29 insertions(+) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeMod= ulePkg/Universal/DriverSampleDxe/DriverSample.c index 62ba52e940..cbc8900eb9 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -858,6 +858,7 @@ ExtractConfig ( @retval EFI_INVALID_PARAMETER Configuration is NULL.=0D @retval EFI_NOT_FOUND Routing data doesn't match any storage in= this=0D driver.=0D + @retval EFI_DEVICE_ERROR If value is 44, return error for testing.= =0D =0D **/=0D EFI_STATUS=0D @@ -1065,6 +1066,12 @@ RouteConfig ( return Status;=0D }=0D =0D +=0D + if (PrivateData->Configuration.QuestionApply =3D=3D 44) {=0D + // Return error for verify the error handling of caller.=0D + return EFI_DEVICE_ERROR;=0D + }=0D +=0D //=0D // Store Buffer Storage back to EFI variable=0D //=0D @@ -1599,6 +1606,13 @@ DriverCallback ( *ActionRequest =3D EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;= =0D break;=0D =0D + case 0x1253:=0D + //=0D + // User change the value of "Question apply test".=0D + //=0D + *ActionRequest =3D EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY;=0D + break;=0D +=0D case 0x1231:=0D //=0D // 1. Check to see whether system support keyword.=0D diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModu= lePkg/Universal/DriverSampleDxe/NVDataStruc.h index 489d7bcbf3..3f5388946d 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h @@ -95,6 +95,7 @@ typedef struct { MY_EFI_UNION_DATA MyUnionData;=0D UINT8 QuestionXUefiKeywordRestStyle;=0D UINT8 QuestionNonXUefiKeywordRestStyle;=0D + UINT8 QuestionApply;=0D } DRIVER_SAMPLE_CONFIGURATION;=0D =0D //=0D diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/= Universal/DriverSampleDxe/Vfr.vfr index 5323e2b411..0c376fe9b7 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -513,6 +513,16 @@ formset default =3D 18,=0D endnumeric;=0D =0D + numeric varid =3D MyIfrNVData.QuestionApply,=0D + questionid =3D 0x1253,=0D + prompt =3D STRING_TOKEN(STR_QUESTION_APPLY_TEST_PROMPT),=0D + help =3D STRING_TOKEN(STR_QUESTION_APPLY_TEST_HELP),=0D + flags =3D INTERACTIVE,=0D + minimum =3D 0,=0D + maximum =3D 255,=0D + default =3D 19,=0D + endnumeric;=0D +=0D text=0D help =3D STRING_TOKEN(STR_POPUP_TEST_HELP),=0D text =3D STRING_TOKEN(STR_POPUP_TEST_PROMPT),=0D diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeMod= ulePkg/Universal/DriverSampleDxe/VfrStrings.uni index 8a3e286bec..ed906045fd 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni @@ -269,6 +269,10 @@ #language fr-FR "Subm= itted callback test"=0D #string STR_SUBMITTED_CALLBACK_TEST_HELP #language en-US "Chan= ge the value and press F10 to submit will pop up a dialogue to show SUBMITT= ED Callback has been triggered"=0D #language fr-FR "Chan= ge the value and press F10 to submit will pop up a dialogue to show SUBMITT= ED Callback has been triggered"=0D +#string STR_QUESTION_APPLY_TEST_PROMPT #language en-US "Ques= tion apply test"=0D + #language fr-FR "Ques= tion apply test"=0D +#string STR_QUESTION_APPLY_TEST_HELP #language en-US "Chan= ge the value and it will be applied automaticlly. If set to 44, then return= failed."=0D + #language fr-FR "Chan= ge the value and it will be applied automaticlly. If set to 44, then return= failed."=0D #string STR_POPUP_TEST_PROMPT #language en-US "Sele= ct it to invoke Hii Popup Protocol"=0D #language fr-FR "Sele= ct it to invoke Hii Popup Protocol"=0D #string STR_POPUP_TEST_HELP #language en-US "Sele= ct this question will pop up a message box, then user can decide whether ex= it current form or not"=0D --=20 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113025): https://edk2.groups.io/g/devel/message/113025 Mute This Topic: https://groups.io/mt/103475995/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-