Commit Graph

54 Commits

Author SHA1 Message Date
Liming Gao d1102dba72 MdeModulePkg: Clean up source files
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>
2018-06-28 11:19:45 +08:00
Song, BinX f826516d43 MdeModulePkg: Fix MSFT C4255 warning
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-11-14 18:18:43 +08:00
Hao Wu 9f4048f7f8 MdeModulePkg: Replace [Ascii|Unicode]ValueToString
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-03-02 09:58:11 +08:00
Hao Wu 39cde03cc5 MdeModulePkg: Use IsZeroGuid API for zero GUID checking
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-31 11:14:01 +08:00
Dandan Bi bef778c1fe MdeModulePkg/SetupBrowser: Correct the incorrect variable name
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-06-01 11:13:15 +08:00
Ard Biesheuvel ce3ecf1364 MdeModulePkg: remove unreachable code
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-12-03 08:51:17 +00:00
Dandan Bi 5ad66ec692 MdeModulePkg:Use safe string functions
Replace unsafe String functions with new added safe string functions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17724 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29 02:36:31 +00:00
Dandan Bi e6557276f0 MdeModulePkg:fix browser not call EFI_BROWSER_ACTION_CHANGED
fix bellow bug:
change checkbox  from FALSE to TRUE.EFI_BROWSER_ACTION_CHANGED called
but when checkbox change back to FALSE,don't call EFI_BROWSER_ACTION_CHANGED

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17512 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-26 11:43:18 +00:00
Eric Dong aee257db53 MdeModulePkg: Fix potential buffer overflow issues.
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@17472 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-19 09:26:25 +00:00
Eric Dong 1a03ab8ae2 MdeModulePkg: Fix Typo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17449 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 23:35:01 +00:00
Eric Dong 9bd22b08d1 MdeModulePkg: Add match2 opcode support in SetupBrowserDxe and sample code in DriverSampleDxe
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17340 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 10:40:53 +00:00
Eric Dong 784952b189 Refine code to make it more safely.
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@15720 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-30 01:19:21 +00:00
Eric Dong 4e1005eca7 Update code to support VS2013 tool chain.
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@15695 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:52:57 +00:00
Eric Dong 40578d09d1 Update the code to follow UEFI spec, process date/time/ref value type as buffer type when in an expression.
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@15690 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:10:22 +00:00
Eric Dong 4f467fd33b Fix GCC build fail.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15477 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-21 02:17:29 +00:00
Eric Dong e6106e892d Refine the check expression result logic.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Gao, Liming <liming,gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15476 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-18 06:40:13 +00:00
Eric Dong d63a9eb477 Refine data copy and data compare logic.
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@14894 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-25 02:38:03 +00:00
Eric Dong 07d7dbaeba Update the logic, based on the device path and formset guid to find the HiiHandle.
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@14828 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-07 07:38:05 +00:00
Eric Dong 7c6c064ca8 Update Browser to provide the customization possibilities.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14540 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-12 02:19:56 +00:00
Eric Dong 2536161545 Rollback patch 14537 & 14538, because patch 14537 is not tested by Laszlo Ersek, but i wrote it.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14539 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-12 02:03:10 +00:00
Eric Dong b9feb4bdf2 Update Browser to provide the customization possibilities.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

MdeModulePkg Patch
Tested-by: Laszlo Ersek <lersek@redhat.com>

OvmfPkg Patch  
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com> 


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14537 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-09 05:26:47 +00:00
erictian b6cb9c399a MdeModulePkg: Fixed 'variable set but not used' build warning.
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14214 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-20 07:26:19 +00:00
ydong10 80a047f04a Update the code of processing device path info in browser to follow UEFI spec.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14076 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-22 09:49:44 +00:00
erictian dbcecd5da2 Should pass in bytes of string buffer to UnicodeSPrint() rather than Unicode string length.
Signed-off-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13691 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-29 09:23:34 +00:00
ydong10 33efdf51b0 Refine the logic to handle the device path info get from string token.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13632 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-14 09:52:25 +00:00
ydong10 816a711058 When do discard action, enable callback action for questions which have value changed.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13509 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-06 02:27:33 +00:00
ydong10 8f42067688 Update the code to follow the spec when evaluate the expression.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12973 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-31 08:08:10 +00:00
ydong10 31585af434 Enable nest for suppressif/grayoutif/diableif for form/question/option.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12972 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-31 07:17:42 +00:00
ydong10 e8ef42833f Correct definition to follow spec.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12929 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-12 13:03:56 +00:00
ydong10 db40504eae Add support for EFI_IFR_QUESTION_REF3 opcode for browser when this opcode has the device path info.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12759 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-22 07:46:35 +00:00
ydong10 901ba0e78d Enable buffer type when process some expression opcode which support buffer type.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12739 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-18 07:07:31 +00:00
ydong10 20258293aa Initialize the parameter mUnicodeCollation before use it to avoid system hang.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12577 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27 01:10:18 +00:00
ydong10 39099cbdcf Enhance op-code EFI_IFR_TO_BOOLEAN to case insensitive.
Signed-off-by: ydong10
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12520 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-10 03:17:46 +00:00
ydong10 cce6230ffb Change the HiiDataBase and browser codes to support new efi varstore data structure.
Signed-off-by:ydong10
Reviewed-by:lgao4



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12009 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-12 07:24:36 +00:00
ydong10 b18e705046 Add new call back return value; also add some sample code to use it.
Signed-off-by: ydong10
Reviewed-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11713 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-31 00:59:15 +00:00
hhtian e5eed7d364 Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10418 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24 09:33:45 +00:00
rsun3 3dd405becf Fix a bug in SetupBrowserDxe driver when check current user's access setup permission. EFI_USER_INFO_ACCESS_CONTROL.Size may be equal to sizeof (EFI_USER_INFO_ACCESS_CONTROL) because of no extra data.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10254 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-16 06:22:05 +00:00
lgao4 771ececd12 Add the missing check for NULL pointer before use it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10116 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-27 09:04:11 +00:00
lgao4 2573712e01 Enhance SetupBrowser to support new UEFI HiiFormMap feature
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10069 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-25 10:10:59 +00:00
rsun3 4140a6635b Coding style fix and minor improvements.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9977 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-11 02:33:16 +00:00
lgao4 7b9b2b920e Fix the bug for evaluate EFI_IFR_NOT_EQUAL_OP opcode, and the bug in using UnicodeSPrint function.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9554 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-11 11:01:50 +00:00
rsun3 cbf73e5030 Add IFR Security Op-code support in the Form Browser.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9492 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-26 09:26:42 +00:00
lgao4 eccfeab1ca Invoke EFI_BROWSER_ACTION_RETRIEVE callback when read EfiVarstore question.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9425 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-13 06:46:59 +00:00
xdu2 8b0fc5c1e1 1. Code clean up: add IN/OUT modifier for parameters.
2. UI enchancement: if there is no editable item in a Form, the F9/F10 will not be displayed in the footer.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9363 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-26 03:05:16 +00:00
qwang12 bc166db311 Add in ASSERT to check out-of-bound and possible dereference of NULL pointers.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7391 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-02 07:18:59 +00:00
qwang12 d0720b5706 K8:
Add in "check-for-null" to catch the de-reference of NULL pointer.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7309 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-20 01:55:11 +00:00
lgao4 ac7e320cb8 Remove NibbleToHexChar() function from BaseLib
Move IsHexDigit, BufToHexString, HexStringToBuf from BaseLib to MdeModulePkg IfrSupportLib. The reason is:
1) IsHexDigit function provides the logic to check Hex Digit and convert it to Decimal value, which is required by IScsi LUN and HII user input. But this logic is not provided by any functions in MdeLib. So, it can't be deleted. It is moved to IfrSupportLib.
2) BufToHexString function converts a array of buffers to hex string. If the buffer length is less than sizeof (UINT64), it can be directly replaced by UnicodeValueToString(). But HII modules may use BufToHexString to convert the buffers whose length > sizeof (UINT64). For example:
.\MdeModulePkg\Universal\HiiDatabaseDxe\ConfigRouting.c line 201, 1148
.\Universal\SetupBrowserDxe\Setup.c line line 1457, 1503
Like this case, it is not easy to use UnicodeValueToString to replace BufToHexString. So, BufToHexString is still kept. Because such usages are in HII modules, this function is moved to IfrSupportLib. 
3) HexStringToBuf is moved to IfrSupportLib. The reason is similar to BufToHexString.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6782 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-01 02:32:12 +00:00
qwang12 f4113e1fdb 1) Remove the variable initalization in declaration.
2) Change all gBS->FreePool to use the MdePkg/BaseLib's FreePool.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6662 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-21 06:59:58 +00:00
qwang12 8d00a0f195 Sync in bug fix from EDK I:
1) issue with setup browser and IFR refresh opcode
2) [HII]HIIConfigRoutingExportConfig generate error format of <MultiConfigAltResp>
3) [HII] ConfigRouting->ExtractConfig() will cause overflow
4) [Hii Database] EFI_HII_DATABASE_NOTIFY should be invoked when a string package is created internally when a new String Token is created
5) [PT]HIIConfigAccessProtocolTest fail on NT32uefi
6) Incorrect HII package types in EDK

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6378 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-04 14:28:08 +00:00
qwang12 676df92c2c Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its implementation only check if a pointer is NULL. If a garbage pointer is passed in, the gBS->FreePool will still ASSERT in debug build and return error code.
It is recommended that module writer should keep track how a pointer is allocated and free it after use.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6306 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-30 07:32:46 +00:00