summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/UfsPassThru: Fix wrong GLOBAL_REMOVE_IF_UNREFERENCED usageFeng Tian2015-07-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | GLOBAL_REMOVE_IF_UNREFERENCED means __declspec(selectany) for MS tool chain IA32/X64 build. According to MSDN, "selectany" would tell the compiler that the declared global data item (variable or object) is a pick-any COMDAT (a packaged function). At link time, if multiple definitions of a COMDAT are seen, the linker picks one and discards the rest. So we have to remove GLOBAL_REMOVE_IF_UNREFERENCED key word from two global variable's extern definitions of .h file as we have used this keyword in .c file, otherwise the MS tool chain would pick the definitions in .h file and treat it as uninitialized data to generate full-0 content for these two global variables. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18088 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRangesStar Zeng2015-07-281-2/+2
| | | | | | | | | | | to instead of AllocatePool() to ensure the data is clean for the following consumption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18087 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Add missing PCD usage information in UNI and DEC files.Qiu Shumin2015-07-282-0/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18081 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Add ESC key support in setup browser pop-up message boxDandan Bi2015-07-272-1/+2
| | | | | | | | | | | | | When load default value or save changes will pop up message box to let user confirm,Y means confirm and N means ignore,now add Esc key with the same function of N key.And change the content of pop up message in .uni file, now will display "Press 'Y' to confirm, 'N'/'ESC' to ignore." 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@18076 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:SetupBrowser output debug message when DisplayEngineDxe is not ↵Dandan Bi2015-07-271-0/+1
| | | | | | | | | | | | | | installed Enhance the setupbrowserdxe to output debug message when DisplayEngineDxe is not installed and this will be easy for user to find the reason why can not enter Setup page. 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@18075 6f19259b-4bc3-4df7-8a09-765794883524
* Support get string from configuration string packages.Eric Dong2015-07-272-7/+8
| | | | | | | | 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@18074 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg CapsuleRuntimeDxe: Reduce reserved memory consumptionStar Zeng2015-07-272-67/+47
| | | | | | | | | | | | | | | | | | Reduce reserved memory consumption by page table buffer, then OS can have more available memory to use. Take PhysicalAddressBits = 48 and 2MB page granularity as example, 1:1 Virtual to Physical identity mapping page table buffer needs to be ((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes. The code is updated to only allocate 2 pages (1G page enabled) or 6 pages for 4G page table, and 8 extra pages to handles > 4G request by page fault. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18070 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg CapsuleX64: Reduce reserved memory consumptionStar Zeng2015-07-276-132/+478
| | | | | | | | | | | | | | | | | We are going to reduce reserved memory consumption by page table buffer, then OS can have more available memory to use. Take PhysicalAddressBits = 48 and 2MB page granularity as example, 1:1 Virtual to Physical identity mapping page table buffer needs to be ((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes. The code is updated to build 4G page table by default and only use 8 extra pages to handles > 4G request by page fault. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18069 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg BootScriptExecutorDxe: Reduce reserved memory consumptionStar Zeng2015-07-271-23/+89
| | | | | | | | | | | | | | | | | | | | | | | | | We are going to reduce reserved memory consumption by page table buffer, then OS can have more available memory to use. Take PhysicalAddressBits = 48 and 2MB page granularity as example, 1:1 Virtual to Physical identity mapping page table buffer needs to be ((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes. Current BootScriptExecutorDxe handles > 4G request by page fault because S3ResumePeim only builds 4G page table when long mode waking vector is not needed, but BootScriptExecutorDxe still assume the page table buffer for page table is at 1:1 Virtual to Physical identity mapping. To reduce reserved memory consumption, the code is updated to only use 8 extra pages to handles > 4G request by page fault. Another, when both BIOS and OS wants long mode waking vector, S3ResumePei should have established 1:1 Virtual to Physical identity mapping page table for ACPI spec requirement, so no need to hook page fault handler. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18067 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg Variable: Read MonotonicCount by ReadUnaligned64()Star Zeng2015-07-271-2/+2
| | | | | | | | | | | | As variable HEADER_ALIGNMENT = 4, the MonotonicCount in AUTHENTICATED_VARIABLE_HEADER may be not UINT64 aligned, so go to use ReadUnaligned64() to ensure read data correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18064 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Make boot option description uniqueRuiyu Ni2015-07-261-0/+61
| | | | | | | | | | | | | | | | When there are multiple network boot options, user will see multiple "UEFI Network" boot options. It's hard to distinguish them using the description. The patch enhances the boot option generation logic to append " 2" /" 3"/" 4"/... number suffix to the non-first network boot options. So the 2nd one becomes "UEFI Network 2". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18062 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Add old IPv4_DEVICE_PATH support for new IScsiDxefanwang22015-07-262-10/+24
| | | | | | | | | | | | | | | | | | GatewayIpAddress and SubnetMask do not exist in old IPv4_DEVICE_PATH, this will lead new IScsiDxe to error if IPv4_DEVICE_PATH in system is not updated. Following UEFI2.5 spec of IPv4_DEVICE_PATH do a check before accessing fields only defined in new version, add a judgement here to make old IPv4_DEVICE_PATH and new IScsiDxe can cowork. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> [lersek@redhat.com: rewrapped commit message] Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18057 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg VariableDxe: Correct address pointers from AuthVariableLibStar Zeng2015-07-262-2/+2
| | | | | | | | | | | | | | Originally, the double pointer (VOID **) is not correct for convert address pointers from AuthVariableLib. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18054 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Check the case caused by mismatchDandan Bi2015-07-261-5/+7
| | | | | | | | | | | | | When mismatch happens,there exists one case that exit current form and display last form.Assert code don't cover this case. Now add check to handle this situation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18053 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Correct the parameter order in match2 sample opcodeDandan Bi2015-07-261-1/+1
| | | | | | | | | | | | The first parameter of match2 opcode should be the pattern and the second one should be the string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18052 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix the issue EfiPxeBcDhcp() may return wrong status.Zhang Lubo2015-07-261-2/+2
| | | | | | | | | | | | | | | | if the instance of the DHCP4 protocol driver is in the Dhcp4Bound status that is DHCP configuration has completed, so the Dhcp4->Start FUNC in the EfiPxcBcDhcp() will return EFI_ALREADY_STARTED status which lead to EfiPxeBcDhcp FUNC not in correspondence with UEFI spec. 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: Ye Ting <ting.ye@intel.com> [lersek@redhat.com: updated copyright year as Siyuan asked] Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18050 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove TransmitReceive() and ActiveChild dependencyJiaxin Wu2015-07-262-5/+13
| | | | | | | | | | | | | | | | | | | Fix git 59a8cfd4 (SVN r17869) removes DHCP4.TransmitReceive()and DORA process dependency, but it updated TransmitReceive() to take the ownership of DhcpSb->ActiveChild but never release it. This will break the retransmit and lease time out counter of DORA. To fix that, TransmitReceive() doesn't need to be the ActiveChild, and the timer routine should be updated to handle the TransmitReceive specially. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18048 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: SmbiosDxe: ARM and AARCH64 are VALID_ARCHITECTURESLaszlo Ersek2015-07-261-1/+1
| | | | | | | | | | | | | | | | | | This driver is soon going to be built by ArmVirtPkg/ArmVirtQemu.dsc (without any changes). Although VALID_ARCHITECTURES is not used by the build system (it is just a comment), it is best kept up-to-date for human readers' sake. Cc: Feng Tian <feng.tian@intel.com> Cc: Elvin Li <elvin.li@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18041 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiSmmCore: Remove a hidden assumption of SMRAM reservationStar Zeng2015-07-265-84/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that assumes the SMRAM reserved range is only at the end of the SMRAM descriptor. // // This range has reserved area, calculate the left free size // gSmmCorePrivate->SmramRanges[Index].PhysicalSize = SmramResRegion->SmramReservedStart - gSmmCorePrivate->SmramRanges[Index].CpuStart; Imagine the following scenario where we just reserve the first page of the SMRAM range: SMRAM Descriptor: Start: 0x80000000 Size: 0x02000000 Reserved Range: Start: 0x80000000 Size: 0x00001000 In this case the adjustment to the SMRAM range size yields zero: ReservedStart - SMRAM Start is 0x80000000 - 0x80000000 = 0. So even though most of the range is still free the IPL code decides its unusable. The problem comes from the email thread: [edk2] PiSmmIpl SMRAM Reservation Logic. http://thread.gmane.org/gmane.comp.bios.tianocore.devel/15268 Also to follow the idea in the email thread, the patch is to 1. Keep only one copy of full SMRAM ranges in gSmmCorePrivate->SmramRanges, split record for SmmConfiguration->SmramReservedRegions and SMM Core that will be marked to be EFI_ALLOCATED in gSmmCorePrivate->SmramRanges. 2. Handle SmmConfiguration->SmramReservedRegions at beginning of, at end of, in the middle of, or cross multiple SmramRanges. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18031 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/TerminalDxe: Some improvementsHeyi Guo2015-07-161-23/+4
| | | | | | | | | | | | | | | | 1. Get default terminal type from PCD rather than using PCANSI directly in BuildTeminalDevpath; 2. Only terminal type is needed to create an TerminalDev instance, so remove the useless code of creating and freeing DefaultNode. 3. Some white space refining. Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18027 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/TerminalDxe: Set NullRemaining to FALSE by defaultHeyi Guo2015-07-161-1/+1
| | | | | | | | | | | | | This is bug fix for TerminalDxe: NullRemaining should be set to FALSE by fault and then be set to TRUE conditionally. Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18026 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/DxePrintLibPrint2Protocol: make mStatusString array CONSTArd Biesheuvel2015-07-161-1/+1
| | | | | | | | | | | | | | Change the type of mStatusString[] to reflect that it is a CONST array of pointers to CONST. 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: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18022 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Correct PcdConOutColumn help string.Liming Gao2015-07-162-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18020 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg DxeIpl: Skip install MemoryInfoHob if this hob existsLiming Gao2015-07-161-25/+30
| | | | | | | | | | | | Add the check at DxeLoadCore() on MdeModulePkg\Core\DxeIplPeim\DxeLoad.c to skip install the "gEfiMemoryTypeInformationGuid" hob if it is already installed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18018 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove two protocols and add HttpLib accessfanwang22015-07-152-2/+4
| | | | | | | | | | | Remove two protocols never used in DxeNetLib.inf and add HttpLib access in MdeModulePkg.dec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17983 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
* 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
* 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
* 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
* 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
* 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
* 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
* fix the problem that data type conversion may loss data.Zhang Lubo2015-07-081-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17886 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg AcpiTableDxe: Install config table at ACPI data changeStar Zeng2015-07-082-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UEFI spec has clear description below: Configuration Table Groups The GUID for a configuration table also defines a corresponding event group GUID with the same value. If the data represented by a configuration table is changed, InstallConfigurationTable() should be called. When InstallConfigurationTable() is called, the corresponding event is signaled. When this event is signaled, any components that cache information from the configuration table can optionally update their cached state. For example, EFI_ACPI_TABLE_GUID defines a configuration table for ACPI data. When ACPI data is changed, InstallConfigurationTable() is called. During the execution of InstallConfigurationTable(), a corresponding event group with EFI_ACPI_TABLE_GUID is signaled, allowing an application to invalidate any cached ACPI data. But current implementation only InstallConfigurationTable() at first time ACPI data change. if (((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) && !AcpiTableInstance->TablesInstalled1) { Status = gBS->InstallConfigurationTable (&gEfiAcpi10TableGuid, AcpiTableInstance->Rsdp1); if (EFI_ERROR (Status)) { return EFI_ABORTED; } AcpiTableInstance->TablesInstalled1 = TRUE; } if (((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) && !AcpiTableInstance->TablesInstalled3) { Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, AcpiTableInstance->Rsdp3); if (EFI_ERROR (Status)) { return EFI_ABORTED; } AcpiTableInstance->TablesInstalled3= TRUE; } The AcpiTableInstance->TablesInstalled1 and AcpiTableInstance->TablesInstalled3 conditional judgment need to be removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17885 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Replace unsafe string functions.Zhang Lubo2015-07-0812-48/+58
| | | | | | | | | | | | Replace unsafe string functions with new added safe string functions. 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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17881 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/XhciPei: Error handling enhancement for XhcPeiExecTransferFeng Tian2015-07-081-5/+8
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17880 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/XhciDxe: Error handling enhancement for XhcExecTransferFeng Tian2015-07-081-5/+8
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17879 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove NetLib and Ip4Config Protocol dependency.jiaxinwu2015-07-082-184/+25
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: jiaxinwu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17873 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Refine code to use Strn**S safe functions instead of Str**S ↵Qiu Shumin2015-07-083-5/+5
| | | | | | | | | | | | ones 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: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17867 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/PartitionDxe: Fix media probeRonald Cron2015-07-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | The call in ProbeMediaStatus() to the ReadDisk() function of the EFI_DISK_IO_PROTOCOL interface implemented in DiskIoDxe/DiskIo.c crashed in DiskIo2ReadWriteDisk() because of the NULL value of the destination buffer pointer. Pass the address of a buffer in the stack instead of a NULL pointer. In addition to avoiding the crash, that way, the media probe does not depend anymore on the way the EFI_DISK_IO_PROTOCOL implementation deals with a NULL value of the destination buffer pointer as the UEFI specification does not specify the expected behaviour. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17859 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Add HttpLib.Fu Siyuan2015-07-074-0/+1724
| | | | | | | | | | This patch add the header file and DXE implementation for the HttpLib. 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@17856 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, jiaxinwu2015-07-0720-574/+4169
| | | | | | | | | | and also add new UI configuration support in Ip4Dxe driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: jiaxinwu <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@17853 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Refine the function commentsDandan Bi2015-07-071-0/+1
| | | | | | | | 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@17852 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Update UefiBootManagerLib to support HTTP boot option creationRuiyu Ni2015-07-072-1/+12
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17849 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Modify the incorrect DestStr length in safe string functionsDandan Bi2015-07-072-2/+2
| | | | | | | | | 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@17847 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Use StrnCpyS instead of StrCpyS to indicate the copy length ↵Qiu Shumin2015-07-072-3/+3
| | | | | | | | | | | | from the source. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17841 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove mZeroGuid definition in Universal/Variable/RuntimeDxeHao Wu2015-07-072-2/+3
| | | | | | | | | | | | MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the mZeroGuid defined in Universal/Variable/RuntimeDxe is redundant. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17840 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove gZeroGuid definition in SetupBrowserDxeHao Wu2015-07-073-4/+2
| | | | | | | | | | | | MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the gZeroGuid defined in SetupBrowserDxe is redundant. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17839 6f19259b-4bc3-4df7-8a09-765794883524