summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
AgeCommit message (Collapse)Author
2013-05-09Skip PXE prompt/menu/discover if PXE_DISCOVERY_CONTROL tag bit 3 set.sfu5
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14332 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-071. Fix TOCTOU issue in VariableSmm, FtwSmm, FpdtSmm, SmmCorePerformance SMM ↵lzeng14
handler. For VariableSmm, pre-allocate a mVariableBufferPayload buffer with mVariableBufferPayloadSize(match with mVariableBufferPayloadSize in VariableSmmRuntimeDxe) to hold communicate buffer payload to avoid TOCTOU issue. 2. Add check to ensure CommBufferPayloadSize not exceed mVariableBufferPayloadSize or is enough to hold function structure in VariableSmm and FtwSmm. 3. Align FtwGetLastWrite() in FaultTolerantWriteSmmDxe.c to FtwGetLastWrite() in FaultTolerantWrite.c. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14325 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-251. Use the check IsAddressValid() to prevent SMM communication buffer ↵lzeng14
overflow in SmmVariable, FtwSmm, FpdtSmm, SmmCorePerformance and SmmBaseHelper, and add check to prevent InfoSize overflows in SmmVariableHandler. 2. Refine the debug message. 3. Add check to make sure the input VariableName is A Null-terminated string. 4. Use local variable to hold StrSize (VariableName) to avoid duplicated StrSize calculation. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14317 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-25Fix ping command issue in IP4 driver.sfu5
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14314 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-25Get ParentDevicePath by using attribute EFI_OPEN_PROTOCOL_GET_PROTOCOL ↵sfu5
instead of BY_CHILD. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14313 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-24Mallicious code may use SmmFaultTolerantWriteHandler() to update some flash ↵lzeng14
area directly, like Variable region, so return EFI_ACCESS_DENIED after End Of Dxe in SmmFaultTolerantWriteHandler(). And add code to prevent InfoSize overflow. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14312 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-23Remove unused [Guids] section from PXE inf file.sfu5
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14310 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-22Fix potential overflow for SetVariable interfaceczhang46
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Guo Dong <dong.guo@intel.com> Reviewed-by : Siyuan Fu <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14305 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-19Add transit bit check for detecting partial response in iSCSI stack.tye1
Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14296 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-19Fix a potential SMM memory dump issue. If pass communication buffer with ↵czhang46
DataBuffer to SMM SetVariable which is big enough to cover SMM range. Then GetVariable can dump SMM memory contents. Add more range check for SetVariable Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Dong Guo <guo.dong@intel.com> Reviewed-by : Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14292 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-16Update the browser logic, make the storage as browser level instead of form ↵ydong10
set level. 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@14280 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-16MdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that ↵erictian
requires a relocation entry with PC relative addressing that does not require a relocation entry. This patch is required to make this file assemble and link with Xcode Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14279 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-15Fix SMM Variable driver stack GetVariable return INVALID_PARAMETER when ↵czhang46
DataSize is bigger than SMM communication buffer. Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Dong Guo <guo.dong@intel.com> Reviewed-by : Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14276 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-12Fix build failure by adding UINT16 type cast.niruiyu
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14259 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-12Update SMM variable DXE driver GetNextVariable interface to comply with UEFI ↵czhang46
spec VariableNameSize is the returned buffer size. GetNextVariable should behavior correct if it is bigger than SMM communication buffer or less than string size of VariableName. Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Dong Guo <guo.dong@intel.com> Reviewed-by : Fu Siyuan <siyuan.fu@intel.com> Reviewed-by : Zeng Star <star.zeng@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14258 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-11Fix several bugs in the implementation of converting SAS/SASEX device path ↵niruiyu
node from/to text. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14256 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-08If DataSize or VariableNameSize is near MAX_ADDRESS, this can cause the ↵lzeng14
computed PayLoadSize to overflow to a small value and pass the check in InitCommunicateBuffer(). To protect against this vulnerability, check DataSize and VariableNameSize to make sure PayloadSize doesn't overflow. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14252 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-02Refine code to follow coding style.ydong10
Signed-off-by: Eric Dong git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14239 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-02Fill SMBIOS BCD revision field.li-elvin
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14238 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-02Don't assume HiiDatabase has been present at the entrypoint and don't assume ↵lzeng14
HiiDatabase and HiiFont are on the same handle according to the UEFI spec. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14236 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-27Update the traversal path logic.ydong10
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@14220 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-27Update the code to follow UEFI spec, do the discard action when return ↵ydong10
EFI_BROWSER_ACTION_REQUEST_EXIT. 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@14219 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-20MdeModulePkg: Fixed 'variable set but not used' build warning.erictian
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-15Add debug message to output video resolution used by GraphicsConsole.li-elvin
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14210 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-15Refine the logic about gFunctionKeySetting, avoid some HII drivers can't ↵ydong10
show the hotkey info. Also add missing code in UI.c 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@14208 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-15Revert error check in code by patch 14206.ydong10
Signed-off-by: Eric Dong git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14207 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-15Update the logic: ydong10
Not remove the form set data, add check before browser use form set data to avoid use the useless form set data. 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@14206 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-11Fix a bug in IP4 driver which may cause “reconnect –r” hang.sfu5
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14170 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-11Initialize DefaultInfo before using it.sfu5
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14168 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-11Fix a bug in IP4 driver that the broadcast/multicast mac address is ↵sfu5
overrided by the gateway’s mac address. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14167 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-05Enhance the ConPlatform driver to take care of the optional Controller ↵niruiyu
device path node when comparing the GOP device path. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Kinney Michael D <michael.d.kinney@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14161 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-27Adds ASSERT check in DxePcd driver when error status of read DynamicHii PCD ↵lgao4
is not EFI_NOT_FOUND to avoid the incorrect value is used. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14147 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-01Update SecurityStub SAP protocol to support SecureHandler and SecureHandler2 ↵lgao4
both. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14118 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-01Removes a useless condition in PxeBcImpl.c.sfu5
Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14117 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-01Fix a bug in snp driver binding Start() that it may return incorrect status ↵sfu5
code. Signed-off-by: Ari Zigler <ariz@mellanox.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14115 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-29Based on the feature PCD value, browser will decide whether to gray out the ↵ydong10
read only menu. 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@14112 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28Update code which is not include in patch 14076.ydong10
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14102 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25Variables with state VAR_ADDED&VAR_IN_DELETED_TRANSITION should be ↵lzeng14
considered as valid variables if there is no duplicated ones with VAR_ADDED state. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14085 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25Add NULL pointer check.lzeng14
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14084 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-24Refine code to follow coding style.ydong10
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14080 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-22Refine the sample about how to convert the device path to string.ydong10
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@14077 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-22Update the code of processing device path info in browser to follow UEFI spec.ydong10
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-22Take the highest horizontal resolution as highest video resolution.li-elvin
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Tian Hot <hot.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14074 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-22Refine the menu display logic, support menus with more than one page of options.ydong10
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@14072 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-181. Update the logic of UpdateVariable() for updating variable from:lzeng14
set old variable to IN_DELETED_TRANSITION -> check if reclaim is needed(If yes, do reclaim) -> add new variable -> set old variable to DELETED if no reclaim happened. to: set old variable to IN_DELETED_TRANSITION -> check if reclaim is needed(If yes, do reclaim) -> add new variable -> set old variable to DELETED. 2. Update UpdateVariable() to correctly handle the case "both ADDED and IN_DELETED_TRANSITION variable are present", and delete both old ADDED and IN_DELETED_TRANSITION variable when deleting or updating variable. 3. Update VariableServiceGetNextVariableName() to return the valid IN_DELETED_TRANSITION variable if only IN_DELETED_TRANSITION variable is present. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14065 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-17Fix ICC11(VS2005) build failure.lzeng14
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14062 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-16Fix build failure.lzeng14
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14056 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-15Fix the issue that RuntimeServiceQueryVariableInfo() in ↵lzeng14
VariableSmmRuntimeDxe always return EFI_SUCCESS. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14050 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-15The unit of Duration for S3BootScriptSaveMemPoll() is us, but not ns, so ↵lzeng14
update BootScriptExecuteMemPoll() to use MicroSecondDelay() instead of NanoSecondDelay(), and update BootScriptWriteMemPoll() to use S3BootScriptSaveMemPoll() correctly with possible minimum deviation. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14048 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-08Add the TPL raise/restore code for VariableSmmRuntimeDxe to avoid variable ↵lzeng14
services reentry. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14038 6f19259b-4bc3-4df7-8a09-765794883524