summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe
AgeCommit message (Collapse)AuthorFilesLines
2024-01-24MdeModulePkg/SetupBrowserDxe: EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLYMing Tan1-0/+9
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 SetupBrowserDxe, if callback function return EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY, then call SetQuestionValue with GetSetValueWithHiiDriver to apply the change immediately. Signed-off-by: Ming Tan <ming.tan@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-08-03MdeModulePkg/SetupBrowser: Load storage via GetVariable for EfiVarStoreDandan Bi1-22/+32
For EfiVarStore (EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER), it will call ExtractConfig-GetVariable-HiiBlockToConfig-ConfigToBlock when load storage value in LoadStorage function. It's not necessary and costs lots of time to do the conversion between config and block. So now enhance it to call GetVariable directly. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Eric Dong <eric.dong@intel.com>
2022-07-22MdeModulePkg/SetupBrowserDxe:Follow spec'd way to reconnect driverWalon Li2-9/+4
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3952 In UEFI spec, it defines reconnect timing that will be activated upon exiting of the formset or the browser. However, we did't use this kind of way to check reconnect conditioncode. Code only blocks reconnect if page is updated dynamically. That's not matched spec'd way. We should check current formset whether is exiting, then reconnect driver. Signed-off-by: Walon Li <walon.li@hpe.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-12-07MdeModulePkg: Apply uncrustify changesMichael Kubacki6-4636/+4849
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-12-07MdeModulePkg: Change OPTIONAL keyword usage styleMichael D Kinney4-13/+12
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2020-06-10MdeModulePkg/SetupBrowserDxe: Do not reconnect driver with form-updateWalon Li2-1/+9
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2701 Recording to the spec, the reconnect is activated upon exiting of the formset or the browser. Exiting is by user but form-browser internal logic. That means the reconnection is only happened when user press ESC or _EXIT action to exit form. Driver callback may update HII form dynamically so form-browser needs to refresh its internal data. It's not exiting formset for user exactly and they didn't know what happened. So use a flag to record that and do not reconnect driver if updated by callback. Signed-off-by: Walon Li <walon.li@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2020-03-12MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT.Nickle Wang1-1/+2
From the function description of GetIfrBinaryData(), FormSetGuid can be NULL. However, FormSetGuid is passed to IsZeroGuid(). This causes exception when FormSetGuid is NULL. Signed-off-by: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2020-01-15MdeModulePkg/Setup: Update opcode number variable type to UINTNBrian R Haug1-9/+9
Update data type of variables which save the opcode numbers to UINTN, in case some configuration module has lots of configuration items. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Brian R Haug <brian.r.haug@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-11-06MdeModulePkg/SetupBrowserDxe: ASSERT GetBufferForValue(&Value)Shenglei Zhang1-0/+3
Before called by GetBufferForValue(), Value has already been called function IsTypeInBuffer to make sure the value must be buffer type. So GetBufferForValue can not return NULL. This commit adds ASSERT to assume (GetBufferForValue (&Value) is not NULL. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2019-08-02MdeModulePkg: Fix typos and add periodsShenglei Zhang1-2/+2
1.Update @parm to @param in function comments in Presentation.c. 2.Add missing period (.) in some function comments. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2019-07-10MdeModulePkg/Setup: Check ConfigAccess protocol in case it's destroyedGregX Yeh1-0/+34
https://bugzilla.tianocore.org/show_bug.cgi?id=1920 Check ConfigAccess protocol is available before process user input. Signed-off-by: GregX Yeh <gregx.yeh@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2019-05-09MdeModulePkg/Setup: Remove PcdFrameworkCompatibilitySupport usageDandan Bi2-90/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 Currently Framework compatibility support is not needed and PcdFrameworkCompatibilitySupport will be removed from edk2. So remove the usage of this PCD firstly. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-04-09MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney9-63/+9
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2018-09-06MdeModulePkg: Removing ipf which is no longer supported from edk2.Chen A Chen1-1/+1
Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-09-04MdeModulePkg/Setup: Fix incorrect size used in AllocateCopyPoolBi, Dandan1-2/+2
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1115 When the type of HiiValue is EFI_IFR_TYPE_BUFFER, its question type is EFI_IFR_ORDERED_LIST_OP. And the buffer size allocated for Statement->BufferValue of orderedList is "Statement->StorageWidth" in IfrParse.c. So here when backup the buffer value and copy the size of "Statement->StorageWidth + sizeof(CHAR16)" is incorrect. This patch is to fix this issue. Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2018-08-21MdeModulePkg SetupBrowserDxe: Remove a redundant functionshenglei1-33/+0
The function IsDevicePathExist that is never called has been removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1062 Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2018-06-28MdeModulePkg: Clean up source filesLiming Gao9-342/+342
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-11-14MdeModulePkg: Fix MSFT C4255 warningSong, BinX1-0/+1
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-10-10MdeModulePkg: Update Ppi/Protocol/Guid usage in INF filesLiming Gao1-1/+1
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-09-22MdeModulePkg/SetupBrowser:Add NULL check before using a pointerDandan Bi1-5/+5
Add NULL pointer check before using a pointer to avoid possible NULL pointer dereference. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-09-21MdeModulePkg/SetupBrowser: Handle questions with Bit VarStoreDandan Bi4-42/+219
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=545 For oneof/numeric/CheckBox(storage can be Bit VarStore) If the question value can be updated and shown correctly in UI page, we need do enhancements in following cases: 1. Parse the Ifr data to get the bit VarStore info correctly. 2. Set/get value to/from bit VarStore correctly. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-07-27MdeModulePkg/SetupBrowser: Record the reset status in all SendFormBi, Dandan3-13/+20
After calling SendForm to enter front page, configuration change in some driver may require system reset. Currently the reset status is saved in SendForm level. Then SendForm can return the reset status. IsResetRequired API also can return the reset status before exiting browser. It return the reset status in current SendForm level now. But SendForm can be recursive called by some module.so the reset status in previous SendForm may be lost. Now change the IsResetRequired API to return the reset info no matter the reset is caught in any SendForm. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-03-02MdeModulePkg: Replace [Ascii|Unicode]ValueToStringHao Wu3-9/+44
It is the follow up of commits 51f0ceb..9e32e97 to replace AsciiValueToString/UnicodeValueToString with AsciiValueToStringS/UnicodeValueToStringS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-01-20MdeModulePkg: Use EfiEventEmptyFunction from UefiLibStar Zeng1-18/+2
Use EfiEventEmptyFunction from UefiLib and remove the duplication of event empty function. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298 Cc: Feng Tian <feng.tian@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-12-06MdeModulePkg/SetupBrowserDxe: Fix incorrect local variable usedDandan Bi1-4/+5
https://bugzilla.tianocore.org/show_bug.cgi?id=280 Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-11-25MdeModulePkg: Clear the buffer after using itDandan Bi1-0/+1
Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-11-25MdeModulePkg/SetupBrowser:Don't support password without interactive flagDandan Bi1-21/+2
In current SetupBrowser, the logic related to non-interative password is not correct. How to support it correctly or whether support it is still under investigation. First step remove the incorrect logic. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-10-27MdeModulePkg/Universal: Fix typos in commentsGary Lin2-8/+8
- stardard -> standard - doule -> double - defalut -> default - Pacakge -> Package - globa -> global - responsiblity -> responsibility - outputed -> outputted - specifiecd -> specified - Resuts -> Results - the a -> a - suported -> supported - assocated -> associated - TURE -> TRUE - successfull -> successfully - excute -> execute - reseting -> resetting - Retrive -> Retrieve - funciton -> function - paramter -> parameter - dependecy -> dependency - boundry -> boundary - permenantly -> permanently Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-10-19MdeModulePkg/SetupBrowser: Send discard info to driver when fail to submitDandan Bi1-0/+29
When fail to submit data and user discard the change, we should send the discard info to driver with EFI_BROWSER_ACTION_CHANGED callback. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-09-27MdeModulePkg FormBrowserEx: Change its structure name with EDKII_ prefixLiming Gao3-3/+3
EDKII implementation protocol should be with EDKII_ prefix. V2: add gEdkiiFormBrowserExProtocolGuid to align its structure name. Cc: Eric Dong <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-08-31MdeModulePkg: Use IsZeroGuid API for zero GUID checkingHao Wu3-7/+7
Instead of comparing a GUID with gZeroGuid via the CompareGuid API, the commit uses the IsZeroGuid API to check if the given GUID is a zero GUID. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com>
2016-08-23MdeModulePkg/Browser: Fix conflicting policy in getting default of checkboxLiming Gao1-2/+5
We have added a new policy to get default value for question: get default from other default id if current default is not specified. But when getting default value for checkbox, if the default flag is not set, it will set the default value to FALSE for checkbox. This behavior in checkbox conflicts with the new added policy, so now we move this behavior to the end of getting default form other default id. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-12MdeModulePkg/Browser: Enhance the logic when getting value from AltRespDandan Bi1-26/+35
This patch is to enhance SetupBrowser to handle following two cases: 1. When searching BlockName in AltResp, the hex digits of related BlockName in AltResp may be in uppercase. 2. When converting the Value in AltResp to HiiValue, the length of value string is bigger than the length of StorageWidth of the question. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-11MdeModulePkg/Browser: Share default if some default value are not specifiedDandan Bi2-5/+43
Add a new implementation policy of getting default value in SetupBrowser. The new policy is only for the situation that a question has default value but doesn't have default value for all supported default type. In this case, we will choose the smallest default id from the existing defaults, and share its value to other default id which has no default value. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-06-27MdeModulePkg/SetupBrowser: Fix the typo in the commentGary Lin1-1/+1
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-06-01MdeModulePkg/SetupBrowser: Correct the incorrect variable nameDandan Bi1-2/+2
Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-05-17MdeModulePkg/SetupBrowser: Clean the BufferValue for string before useDandan Bi2-1/+5
When copy new string content to BufferValue, need to clean the BufferValue firstly, or the BufferValue may contain some content that doesn't belong to the new string. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-17MdeModulePkg/SetupBrowser: Should free ConfigResp when it no longer be usedDandan Bi1-1/+2
When submit form fail, the progress point to the first fail part in ConfigResp, so should free the ConfigResp after Progrss has been processed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-05-06MdeModulePkg/SetupBrowser: Call submit callback function when no failureDandan Bi1-2/+13
In current code will always call submit callback function, but we should call submit callback function when has no failure in the submit action. This patch to fix this issues. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-06MdeModulePkg: Restore question base on the fail info when submit failDandan Bi2-7/+151
When RouteConfig function fail in SubmitForForm or SubmitForFormSet function, we should restore the question value base on the failure information, should not restore all the question. This patch to fix this issue. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-25MdeModulePkg/SetupBrowserDxe: Remove the useless checkDandan Bi1-1/+1
When the type of HiiValue is BUFFER Type, the BufferValue of the related question can not be NULL, so can remove the check. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-04-19MdeModulePkg/SetupBrowserDxe: Get default from callback for orderedListDandan Bi1-1/+9
For orderedlist question, the value is stored in a buffer, not in HiiValue. So when need to get default value from callback function for orderedlist, need to pass the buffer. This patch is to enhance this logic. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-02-25MdeModulePkg: Add new HII action type EFI_BROWSER_ACTION_SUBMITTEDDandan Bi1-0/+98
Add new HII action type EFI_BROWSER_ACTION_SUBMITTED to notify HII driver when its question values are submitted. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-01-27MdeModulePkg:Restore the HiiValue for string opcodeDandan Bi1-1/+5
String opcode has HiiValue and BufferValue,BufferValue for string content, HiiValue for StringId.Function GetQuestionValue only update the BufferValue(string content),but the StringId and string content do not match,now fix this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19750 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.Cecil Sheng1-2/+12
On a failed REF_OP callback, all changed fields in the Selection should be restored. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19268 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15Rollback change r19245 because it missed one change.Cecil Sheng1-6/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19267 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15MdeModulePkg: Convert all .uni files to utf-8Jordan Justen2-0/+0
To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.Cecil Sheng1-2/+6
On a failed REF_OP callback, all changed fields in the Selection should be restored. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19245 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-03MdeModulePkg: remove unreachable codeArd Biesheuvel1-1/+0
Some compilers (like RVCT) are finicky about unreachable code, so remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19106 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-27MdeModulePkg SetupBrowserDxe: Save global variable values before nest ↵Eric Dong2-4/+28
function called. The SendForm function can be called nest in it. This function also uses some global variables. So we must save global variable values before it been called again. Checked in the missing change for gBrowserFormSetList. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18681 6f19259b-4bc3-4df7-8a09-765794883524