summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools/PeCoffLib: handle EFI_IMAGE_REL_BASED_DIR64 in generic codeArd Biesheuvel2015-07-142-112/+11
| | | | | | | | | | | | | | Relocations of type EFI_IMAGE_REL_BASED_DIR64 are handled in exactly the same way on all 64-bit machine types (IPF, X64 and AARCH64). So move the handling of this type to the generic part of the relocation routine PeCoffLoaderRelocateImage (). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17942 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Fix an error that the call function declared implicitly.Zhang Lubo2015-07-142-8/+10
| | | | | | | | | | | | | | Use NetRandomInitSeed() instead of AsmReadTsc() to generate a random seed. Macro definition of EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE for EBC architecture. Add some space to make codes more standard. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: jiaxinwu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17941 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix ping IPv6 stack usage mode failure issueJiaxin Wu2015-07-142-6/+1
| | | | | | | | | | | | | | | Fix ping IPv6 stack usage mode failure issue and also update its the help info. Verified command: *ping -? *Ping -_ip6 -_s 2000:bbbb::12 2000:bbbb::8 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17940 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg: remove redundant parenthesesBruce Cran2015-07-141-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bruce Cran <bruce@cran.org.uk> Reviewed-by: Qin Long <qin.long.intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17939 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg: Make the function headers of Pkcs7GetAttachedContent follow Doxygen.Qiu Shumin2015-07-142-2/+2
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17938 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/Pkcs7VerifyDxe: Cleanup P7CheckTrust function comments.Qiu Shumin2015-07-141-6/+0
| | | | | | | | | | | | Delete description of non-existent parameters 'Content' and 'ContentSize' from P7CheckTrust() description. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17937 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: ensure SafeString length functions don't access beyond MaxSizeLeif Lindholm2015-07-131-2/+2
| | | | | | | | | | | | | | | | | The StrnLenS and AsciiStrnLenS functions, when presented with a string with no terminating NULL in the first MaxSize characters will check the character at String[MaxSize] before checking if Length < MaxSize. (They return the correct value, but have accessed beyond the stated limit in the process.) Flip the order of the tests to prevent this behaviour. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17936 6f19259b-4bc3-4df7-8a09-765794883524
* PerformancePkg Dp_App: Fix ASSERT in GetNameFromHandleHao Wu2015-07-131-6/+9
| | | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17745. StrCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, StringPtr); The above using of StrCpyS will cause ASSERT if StringPtr is longer than mGaugeString. Therefore, StrnCpyS is used here to resolve the issue. Similar scenario is for: StrCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, NameString); (twice) 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17935 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg S3Resume2Pei: Fix ASSERT in WriteToOsS3PerformanceDataHao Wu2015-07-131-1/+1
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17744. AsciiStrCpyS (PerfData->Token, PERF_TOKEN_SIZE, Token); The above using of AsciiStrCpyS will cause ASSERT if Token is longer than PerfData->Token. Therefore, AsciiStrnCatS is used here to resolve the issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17934 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg DeviceMngr: Potential read over memory boundaryHao Wu2015-07-131-1/+2
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17738. String = AllocateCopyPool (BufferLen, L"MAC:"); The above using of AllocateCopyPool() will read contents out of the scope of the constant string. Potential risk for the constant string allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17933 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg BootMngr: Fix potential read over memory boundaryHao Wu2015-07-131-1/+2
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17737. HelpString = AllocateCopyPool (HelpSize, L"Device Path : "); The above using of AllocateCopyPool() will read contents out of the scope of the constant string. Potential risk for the constant string allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17932 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg BootMaint: Fix potential read over memory boundaryHao Wu2015-07-131-1/+2
| | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17736. Str = AllocateCopyPool (MaxLen * sizeof (CHAR16), Str1); The above using of AllocateCopyPool() will read contents out of the scope of Str1. Potential risk for Str1 allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17931 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg BdsDxe: Fix ASSERT in BdsMemoryTestHao Wu2015-07-131-2/+12
| | | | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17735. StrCatS (StrPercent, sizeof (StrPercent) / sizeof (CHAR16), TmpStr); The above using of StrCatS will cause ASSERT if TmpStr is longer than StrPercent. Therefore, StrnCatS is used here to resolve the issue. Similar scenario is for: StrCatS (StrTotalMemory, StrTotalMemorySize / sizeof (CHAR16), TmpStr); Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17930 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg GenericBdsLib: Potential read over memory boudaryHao Wu2015-07-131-8/+12
| | | | | | | | | | | | | | | | | | | | This commit will resolve the issue brought by r17733. StringBuffer1 = AllocateCopyPool ( MAX_STRING_LEN * sizeof (CHAR16), L"Configuration changed. Reset to apply it Now." ); The above using of AllocateCopyPool() will read contents out of the scope of the constant string. Potential risk for the constant string allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17929 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg: update OpenSSL dependency to version 1.0.2dArd Biesheuvel2015-07-125-18/+18
| | | | | | | | | | | | | | Upstream OpenSSL version 1.0.2c contained a fatal flaw [CVE-2015-1793] and is no longer available from the openssl.org download servers. So upgrade to its replacement, version 1.0.2d. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17928 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVExpressPkg: use PSCI for system reset only on AARCH64 platformsArd Biesheuvel2015-07-101-0/+1
| | | | | | | | | | | | | | | | | | The PSCI specification covers both ARM and AARCH64, however, the ARM Trusted Firmware (ATF) reference implementation is only available for AARCH64, and PSCI firmware is not widely available for ARM platforms. So use the EfiResetSystemLib implementation that uses PSCI calls only on AARCH64, and revert to the Versatile Express-specific system register interface (which is only available during boot time) on ARM platforms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17927 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVExpressPkg: use ArmVExpressSysConfigRuntimeLib by defaultArd Biesheuvel2015-07-101-1/+1
| | | | | | | | | | | | | | | | Instead of using a NULL implementation of ArmPlatformSysConfigLib for DXE_RUNTIME_DRIVER modules, which prevents them from accessing system control registers even at boot time, use the new implementation that only switches into a non-functional mode at runtime, and operates as before otherwise. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17926 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/ArmVExpressPkg: add ArmPlatformSysConfigLib for runtimeArd Biesheuvel2015-07-102-0/+320
| | | | | | | | | | | | | | | This adds a ArmPlatformSysConfigLib implementation that is usable by DXE_RUNTIME_DRIVER modules. Since the system registers that this library encapsulates are not usable at runtime, this driver allows access to those registers only at boot time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17925 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Code logic optimization for Ip4Dxe driverfanwang22015-07-101-4/+4
| | | | | | | | | | | Move null check before set value to address to avoid null address dereferenced. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17924 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Code logic optimization for DnsDxe and HttpDxe driverfanwang22015-07-104-2/+10
| | | | | | | | | | | | | | | Revise some errors which may lead NULL pointer be dereferenced: * DnsDhcp.c: Paralist may be used without any initialized * DnsHeader and RcvString may be null but be dereferenced * HttpDriver.c: revise an if judgment * HttpImpl.c: add a judgment to avoid null dereferenced Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17923 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix a bug that return type differs from the left one when ↵Zhang Lubo2015-07-101-24/+37
| | | | | | | | | | | | assigned. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: jiaxinwu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17922 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Fix an error that return type differs from the left one when ↵Zhang Lubo2015-07-102-23/+38
| | | | | | | | | | | | assigned. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: jiaxinwu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17921 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFwCfgLib: avoid "variable set but not used" warning from GCCBill Paul2015-07-101-0/+1
| | | | | | | | | | | | | | | | The FileReserved variable in QemuFwCfgFindFile() is only used to skip over the reserved field in file headers, which causes newer versions of GCC to flag it with a "variable set but not used" warning (which is normally not visible since as of right now these warnings are supressed). It's true that the value read into FileReserved is never used, but this is intentional. This patch adds a do-nothing reference to silence the warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bill Paul <wpaul@windriver.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17920 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Make time based AuthVariable update atomicChao Zhang2015-07-103-30/+170
| | | | | | | | | | | | | System may break during time based AuthVariable update, causing certdb inconsistent. 2 ways are used to ensure update atomic. 1. Delete cert in certdb after variable is deleted 2. Clean up certdb on variable initialization Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17919 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add default value for TPM action questionChao Zhang2015-07-101-26/+12
| | | | | | | | | | | 1. Add default value for TPM action question. F9 restore default can get the right value 2. Remove redundant suppressif Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17918 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove Ip4ConfigDxe and related guid definitionJiaxin Wu2015-07-1018-3664/+0
| | | | | | | | | | | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Dependent network drivers, libraries and applications have been migrated to (or extended to) the new protocol version. For example: git 7c25b7ea (SVN r17869): ping & ifconfig git 00a6ad1b (SVN r17870): UefiHandleParsingLib git 6c5c70d6 (SVN r17873): DxeNetLib git 39561686 (SVN r17874): IpSecDxe git c581e503 (SVN r17875): EfiSocketLib This patch is based on related packages(MdeModulePkg, Nt32Pkg, ArmPlatformPkg, ArmVirtPkg, EmulatorPkg, OvmfPkg, Vlv2TbltDevicePkg) clean-up work finished. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17917 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg/SecPeiDebugAgentLib: Restore CPU interrupt stateJeff Fan2015-07-101-10/+19
| | | | | | | | | | | | | | | In DEBUG_AGENT_INIT_POSTMEM_SEC case, caller may disable/restore CPU interrupt to protect the stack/heap migration. SecPeiDebugAgentLib cannot always enable CPU interrupt. Otherwise system may crash during stack/heap migration. SecPeiDebugAgentLib should restore original CPU interrupt state in DEBUG_AGENT_INIT_POSTMEM_SEC case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Brian J. Johnson <bjohnson@sgi.com> Tested-by: Brian J. Johnson <bjohnson@sgi.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17916 6f19259b-4bc3-4df7-8a09-765794883524
* Vlv2TbltDevicePkg: Remove Ip4ConfigDxe module from buildJiaxin Wu2015-07-105-5/+0
| | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Therefore we can remove Ip4ConfigDxe driver from this build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17915 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Remove Ip4ConfigDxe module from OvmfPkgJiaxin Wu2015-07-106-6/+0
| | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Therefore we can remove Ip4ConfigDxe driver from this build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17914 6f19259b-4bc3-4df7-8a09-765794883524
* EmulatorPkg: Remove Ip4ConfigDxe module from EmulatorPkgJiaxin Wu2015-07-102-3/+1
| | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Therefore we can remove Ip4ConfigDxe driver from this build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17913 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: Remove Ip4ConfigDxe module from ArmVirtPkgJiaxin Wu2015-07-102-2/+0
| | | | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Therefore we can remove Ip4ConfigDxe driver from this build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Olivier Martin <Olivier.martin@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17912 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Remove Ip4ConfigDxe from ArmPlatformPkgJiaxin Wu2015-07-106-6/+0
| | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Therefore we can remove Ip4ConfigDxe driver from this build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17911 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix TerminalDxe VS2013 build failureRoy Franz2015-07-101-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17910 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix BinWrappers LzmaF86Compress ScriptLiming Gao2015-07-101-1/+1
| | | | | | | | | | LzmaF86Compress Script should use $arg to arg value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17909 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix potential integer overflow issueRuiyu Ni2015-07-102-15/+20
| | | | | | | | | | | In certain rare circumstance, the data passed from outside of SMM may be invalid resulting the integer overflow. The issue are found by code review. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17908 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: Fix a memory leak bug in BdsDxe driver.Ruiyu Ni2015-07-101-1/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17907 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkPkg FrameworkUefiLib: Fix ASSERT in CatVSPrintHao Wu2015-07-101-1/+7
| | | | | | | | | | | | | | | | | | | This commit will resolve issue brought by r17740. BufferToReturn = AllocateCopyPool(SizeRequired, String); The above using of AllocateCopyPool() will cause ASSERT if 'String' is NULL. Therefore, proper check for 'String' is needed. The above using of AllocateCopyPool() will read contents out of the scope of 'String'. Potential risk for 'String' allocated at the boundary of memory region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17906 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: aarch64: add -fno-asynchronous-unwind-tables to gcc cflagsLeif Lindholm2015-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Some toolchains, at least Fedora GCC, generate inline unwind tables in object files. These confuses GenFw to no end, leading to build failures: GenFw: ERROR 3000: Invalid WriteSections64(): ... unsupported ELF EM_AARCH64 relocation 0x105. GenFw: ERROR 3000: Invalid WriteSections64(): ... unsupported ELF EM_AARCH64 relocation 0x0. I am aware of no current use of these tables, so explicitly disable their generation for aarch64. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Wei Huang <wei@redhat.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17905 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/AArch64: use GCC_ASM_EXPORT to export functionsOlivier Martin2015-07-098-10/+10
| | | | | | | | | | | | This ensures the .type directive is used to mark them as function symbols Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17904 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/FvSimpleFileSystemDxe: Support file opening with no '.efi'Olivier Martin2015-07-091-12/+50
| | | | | | | | | | | | | | | | | | | | | | | FvSimpleFileSystem adds '.efi' to the EFI application and drivers filenames even through this extension is not present in the real filename of the EFI module. In the current behaviour, it would not be possible to open an EFI application using FvSimpleFileSystem if the extension has been omitted in the given filename. It can be create some confusion if someone wants to try to open a file with the real application name (eg: 'Shell'). This patch adds support to try again to look for the file with the extension if it had failed to find it without the extension. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17903 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Fix GCC49 build hang in PeiCoreRuiyu Ni2015-07-093-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PeiCore hang when loads a PEIM whose section alignment requirement is 0x40 but the actual base address is 0x20 aligned. The issue is caused by the following facts, in order: 1. GCC49 requires the section alignment of .data to be 0x40. So a new link script gcc4.9-ld-script was added for GCC49 to specify the 0x40 alignment. 2. GenFw tool was enhanced to sync ELF's section alignment to PE header. Before the enhancement, the section alignment of converted PE image always equals to 0x20. If only with #1 change, GCC49 build image won't hang in PeiCore because the converted PE image still claims 0x20 section alignment which is aligned to the align setting set in FDF file. But later with #2 change, the converted PE image starts to claims 0x40 section alignment, while build tool still puts the PEIM in 0x20 aligned address, resulting the PeCoffLoaderLoadImage() reports IMAGE_ERROR_INVALID_SECTION_ALIGNMENT error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17902 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/UefiDevicePathLib:Fix link error due to missing RamDisk GUIDsFeng Tian2015-07-091-0/+8
| | | | | | | | | | | UefiDevicePathLibOptionalDevicePathProtocol.inf needs to be updated to add RamDisk related GUIDs for passing compiler build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17901 6f19259b-4bc3-4df7-8a09-765794883524
* Nt32Pkg: Update DSC/FDF to include drivers for HTTP boot.Fu Siyuan2015-07-092-2/+8
| | | | | | | | | | This patch add the HTTP boot related drivers to NT32 platform. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17900 6f19259b-4bc3-4df7-8a09-765794883524
* add TTY_TERMINAL build option for ARM BDSRoy Franz2015-07-092-5/+10
| | | | | | | | | | | | | Enable selecting the TtyTerminal type for the ARM BDS build of QEMU using the TTY_TERMINAL define. Convert INTEL_BDS define to check for value (!if) rather than just definition (!ifdef) to allow setting of either value on command line. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17899 6f19259b-4bc3-4df7-8a09-765794883524
* Add PCD for selecting terminal type at build timeLaszlo Ersek2015-07-094-4/+25
| | | | | | | | | | | | | | | | Add a fixed pointer PCD to allow build-time selection of VT100 or TTY terminal type. The default remains VT100 emulation. Add support for building the ARM QEMU platforms with the TTY terminal with the "-D TTY_TERMINAL" build option. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> [Roy Franz: minor edits: add TtyTerminal GUID, rename LINUX_TERMINAL to TTY_TERMINAL] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17898 6f19259b-4bc3-4df7-8a09-765794883524
* Accept VT220 DEL and function keys for TTY terminal typeRoy Franz2015-07-093-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | Accept the VT220 escape code [3~ as backspace for TtyTerm terminals. This is sent by many Linux terminals by default. Also accept VT220 function keys F1-F12, and VT100 F1-F4 keys as these are commonly sent by Linux terminals. The VT220 escape codes are longer, and variable length so a new state is added to the state machine along with a variable to construct the multibyte escape sequence. There are currently no ambiguous escape sequence prefixes accepted, so the TTY terminal accepts escape sequences for a variety of terminals. The goal is to 'just work' with as many terminals as possible, rather than properly emulating any specific terminal. Backspace, Del, and F10 have been tested on xterm, rxvt, tmux, and screen. Note: The existing vt100 function key handling does not match the vt100 documentation that I found, so I added the TTY terminal handling of VT100 F1-F4 (really PF1-PF4 on vt100) separately. The vt100 has no F5-F10 keys, so I don't know what the current vt100 code is based on. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17897 6f19259b-4bc3-4df7-8a09-765794883524
* Treat ASCII 0x7F as backspace for TtyTerm terminalsRoy Franz2015-07-091-2/+8
| | | | | | | | | | | | | Treat ASCII 0x7F as backspace, rather than delete, for TTY terminals. This better matches the default Linux terminal settings that are used when connecting to a simulated platform using xterm or a similar terminal program. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17896 6f19259b-4bc3-4df7-8a09-765794883524
* Add "TtyTerm" terminal type to TerminalDxeRoy Franz2015-07-097-8/+73
| | | | | | | | | | | | | | | This patch a adds new terminal type, TtyTerm, to TerminalDxe. This terminal type provides a place to add support for various *nix terminals that don't behave like standard VT terminals. The goal is to 'just work' with as many terminals as possible, rather than properly emulating any one specific terminal. Signed-off-by: Roy Franz <roy.franz@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17895 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Refine code to use Strn**S safe functions instead of Str**S ones ↵Qiu Shumin2015-07-095-40/+45
| | | | | | | | | | | | in some cases. Safe string functions may ASSERT when the source length is larger than the MaxDest. This patch use Strn**S to indicate the copy length. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Tapan Shah <<tapandshah@hp.com>> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17894 6f19259b-4bc3-4df7-8a09-765794883524
* SourceLevelDebugPkg: Fix PEI timer interrupt regressionBrian J. Johnson2015-07-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Recent changes to debug timer initialization (commit 2befbc82, svn 17572) modified the Sec/Pei InitializeDebugAgent() routine to enable debug timer interrupts. This causes problems in the DEBUG_AGENT_INIT_POSTMEM_SEC case: the callers appear to assume that if they block timer interrupts before the call, interrupts will remain blocked afterwards. It is not always safe to have interrupts enabled on return from InitializeDebugAgent(). For instance, after calling InitializeDebugAgent(), OvmfPkg's TemporaryRamMigration() moves the stack, heap, and IDT to RAM, then switches to the new stack. Only then does it reenable timer interrupts. Taking an interrupt during this process can corrupt state, causing crashes. Do not unmask the debug timer interrupt in the DEBUG_AGENT_INIT_POSTMEM_SEC case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brian J. Johnson <bjohnson@sgi.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17893 6f19259b-4bc3-4df7-8a09-765794883524