summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot supportRuiyu Ni2016-04-061-1/+5
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM DiskNi, Ruiyu2016-04-063-9/+27
| | | | | | | | | | | MemoryTypeInformation don't count the reserved memory used by RAM Disk, but it still check all types of memory and do reset when any type of memory size changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg/Bds: Free resources after ram disk boot finishesNi, Ruiyu2016-04-063-5/+152
| | | | | | | | | | The resource free includes to un-register the ram disk device and free the memory occupied by the ram disk. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot mediaNi, Ruiyu2016-04-062-89/+95
| | | | | | | | | | Use reserved memory to hold the buffer for the RAM disk to follow the ACPI spec requirement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg/UiApp: Correct the total RAM calculationJeremy Linton2016-04-051-70/+64
| | | | | | | | | | This change mirrors the change in InteFrameworkModulePkg. We now account for all TYPE19 memory regions found in the smbios data, as well as handling records with Extended Addresses. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP receptionLaszlo Ersek2016-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | Commit 1b31acb66c02 ("MdeModulePkg: Check received packet size before use it.") introduced a chunk of code under the new "Resume" label, in function UdpIoOnDgramRcvdDpc(). The new code is supposed to run only when the received packet has zero-length payload, but a "return" statement was forgotten, and the code is reached on the normal (nonzero-length payload) path as well, after the packet has been processed (and possibly freed) by RxToken->CallBack(). This is a logic bug, with the direct symptom being use-after-free / General Protection Fault. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ting Ye <ting.ye@intel.com> Cc: "Subramanian, Sriram (EG Servers Platform SW)" <sriram-s@hpe.com> Fixes: 1b31acb66c026f2791c959a4ec9b55c04d583c22 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
* MdeModulePkg: Check received packet size before use it.Fu Siyuan2016-04-015-34/+111
| | | | | | | | | | | | | | | | | Arbitrary length of packet may be received from network, including the packets with zero payload data or malformed protocol header. So the code much check the actually received data size before using it. For example, in current edk2 network stack, an zero payload UDP packet may cause the platform ASSERT in NetbufFromExt() because of the zero fragment number. This patch update the IpIoLib and UdpIoLib to check and discard the zero payload data packet to avoid above assert. Some other network drivers are also updated to check the packet size to guarantee the minimum length of protocol header is received from upper layer driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* Revert "TerminalDxe: select the UART's default receive FIFO depth"Ruiyu Ni2016-04-012-2/+2
| | | | | | | | | | | | | | This reverts commit 31ae446b1a039a55d0336f2201d77d1032533413. Changing the receive FIFO depth in Terminal driver Start() is not recommended. A new PCD PcdUartDefaultReceiveFifoDepth was added and MdeModulePkg/SerialDxe driver uses the PCD as the default receive FIFO depth. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
* MdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculationSamer El-Haj-Mahmoud2016-03-312-3/+4
| | | | | | | | | | | | | | | | | EndingAddress is calculated incorrectly. Original code calculates it as (StartingAddress + Size). Correct value should be (StartingAddress + Size - 1. Note: Besides the changes made by Samer, Hao also fixed a similar issue in RamDiskImpl.c Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Signed-off-by: Tapan Shah <tapandshah@hpe.com> Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* MdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variablesZeng, Star2016-03-311-3/+1
| | | | | | | Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/UefiBootManagerLib: BmGetActiveConsoleIn code cleanupThomas Palmer2016-03-311-2/+5
| | | | | | | | | | | Check for NULL from AllocateCopyPool before setting Count to 1. Also change sizeof (EFI_HANDLE*) to sizeof (EFI_HANDLE). Handles is a EFI_HANDLE pointer, so the allocated memory must be the size of EFI_HANDLE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/SdMmc: Add EDKII SD/MMC stackFeng Tian2016-03-3052-0/+24405
| | | | | | | | | | | | | | | | | | | | | | | This stack includes: 1. Dxe phase support by: 1) SdMmcPciHcDxe driver to consume PciIo and produce SdMmcPassThru. 2) SdDxe driver to consume SdMmcPassThru to produce BlkIo1/BlkIo2. 3) EmmcDxe driver to consume SdMmcPassThru to produce BlkIo1/BlkIo2/SSP. 2. Pei phase support 1) SdBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2. 2) EmmcBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2. 3) SdMmcPciHcPei driver to produce SdMmcHostController Ppi. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg PartitionDxe: Add Re-entry handling logic for BindingStopHao Wu2016-03-292-21/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | There are scenario when the BindingStop service of PartitionDxe driver be re-entered. An example will be ejecting a DVD from a SATA DVDROM and then run "reconnect -r" under shell. In this specific case, part of the calling stack will be: PartitionDriverBindingStop() (PartitionDxe) -> Stop first child handle (PartitionDxe) -> ScsiDiskFlushBlocksEx() (ScsiDiskDxe) -> A media change is detected (ScsiDiskDxe) -> Reinstall of BlockIO(2) protocols (ScsiDiskDxe) -> Entering PartitionDriverBindingStop() again (PartitionDxe) -> Potential risk of referencing already stopped child handle (PartitionDxe) ... The current code has potential issue of referencing of already stopped child handle. This commit adds re-entry handling logic to resolve such issue. 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>
* MdeModulePkg/SerialDxe: Set FIFO depth with PCDHeyi Guo2016-03-292-5/+7
| | | | | | | | | | | | Set UART receive FIFO depth with PCD instead of fixed number "1". The default value of PCD is also 1, so it makes no difference for platforms which do not explicitly set this PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg DiskIoDxe: Media status check not be done at DiskIo levelHao Wu2016-03-291-13/+1
| | | | | | | | | | | | | | | | | | | | | | Found an issue that file system cannot be started on a DVD when doing the following process: Boot to shell with a DVD inside a SATA DVDROM. Eject the DVD and run "reconnect -r". Put the DVD inside again and run "reconnect -r". The cause is that after executing the second reconnect action, DiskIo immediately returns EFI_NO_MEDIA in function DiskIo2ReadWriteDisk() when checking the media information. However, at this time, the media information does not get updated by the ScsiDisk driver. Therefore, DiskIo driver should left the no media check to ScsiDisk driver. Generally, the media changed and media write protect check should also be left to lower-level device driver. Thus, these two checks in function DiskIo2ReadWriteDisk() are also removed. 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>
* MdeModulePkg PartitionDxe: Some ISO images cannot be recognized properlyHao Wu2016-03-291-7/+7
| | | | | | | | | Some ISO images cannot be recognized properly when they are on media whose block size is not 2048 bytes. 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>
* MdeModulePkg ScsiDiskDxe: Fix hang issue when reconnecting an ISCSI deviceHao Wu2016-03-291-5/+13
| | | | | | | | | | | | | The 'Reset' function for BlockIO(2) in ScsiDiskDxe should return EFI_SUCCESS instead of EFI_DEVICE_ERROR when a device does not support reset feature. Otherwise, a 'reconnect -r' action when an ISCSI device is attached will cause system hang. 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>
* MdeModulePkg: DeviceManagerUiLib: remove set but unused variablesLaszlo Ersek2016-03-251-2/+0
| | | | | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg: BootMaintenanceManagerUiLib: remove set but unused variablesLaszlo Ersek2016-03-252-8/+0
| | | | | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg: UfsPassThruDxe: remove set but unused variablesLaszlo Ersek2016-03-252-10/+1
| | | | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg: BootManagerMenuApp: remove set but unused variablesLaszlo Ersek2016-03-251-2/+0
| | | | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg/PciHostBridgeDxe: remove unused but set variablesArd Biesheuvel2016-03-251-8/+0
| | | | | | | | | | | | | | | | | Remove variables that are declared, assigned but never referenced. This fixes a warning emitted by GCC when -Wunused-but-set-variable is in effect. 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: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg/RamDiskDxe: Fix typo in HII messageAlcantara, Paulo2016-03-241-1/+1
| | | | | | | | | | | | s/Configutation/Configuration/ Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com> Signed-off-by: Juliano Ciocari <juliano.ciocari@hp.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com>
* MdeModulePkg/PciBus: Should reserve enough bus number for HPCRuiyu Ni2016-03-241-2/+2
| | | | | | | | | | | | | | | When there is no bridge before the HPC (hot plug controller), the issue cannot be seen. But when there are bridges before the HPC, the PciBus will only use the value (= <CurrentBusNumber> + <ReservedBusNumber>) as the sub-ordinary bus number for HPC. The correct sub-ordinary bus number should be: <CurrentBusNumber> + <OccupiedBusNumber>(by earlier bridges) + <ReservedBusNumber>. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg/Bds: Fix VS2012 build failure.Ruiyu Ni2016-03-241-4/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/FileExplorerLib.h: Remove the redefinition of typedefsDandan Bi2016-03-241-14/+1
| | | | | | | | | | Xcode clang seems unhappy with both FileExplorerLib.h and Protocol/FileExplorer.h both defining CHOOSE_HANDLER, now remove the definition in FileExplorerLib.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/BootMaintenanceManagerUiLib: Remove type casting in ChooseFileDandan Bi2016-03-231-3/+3
| | | | | | | | | | | The type casting is not necessary and now remove it. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Gary Lin <glin@suse.com>
* MdeModulePkg/BootMaintManagerUiLib: Declare EFIAPI for ChooseFile handlerDandan Bi2016-03-232-0/+6
| | | | | | | | | | | | | | | | The BootMaintenanceManagerUiLib use ChooseFile() from FileExplorerLib to select files. And the third parameter in ChooseFile() is CHOOSE_HANDLER, per the definition of CHOOSE_HANDLER, it must use EFIAPI as the calling convention. But the calling convention was not specified for following handlers: CreateBootOptionFromFile, CreateDriverOptionFromFile, BootFromFile. Now specifies the calling convention for those functions. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Gary Lin <glin@suse.com>
* MdeModulePkg RamDiskDxe: Remove unnecessary TPL raise operationsHao Wu2016-03-232-14/+0
| | | | | | | | | | There is no asynchronous operations to the registered RAM disks link list maintained within RamDiskDxe driver, therefore, the TPL raise and restore operations when dealing with the link list are unnecessary. 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>
* MdeModulePkg RamDiskDxe: Uninstall DEVICE_PATH_PROTOCOL with correct paramHao Wu2016-03-231-1/+1
| | | | | | | | | | | Previously, the code uninstalls the DEVICE_PATH_PROTOCOL with the device path given by caller of the 'RamDiskUnregister' function. The given device path might be different from the one used to install the DEVICE_PATH_PROTOCOL. 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>
* MdeModulePkg RamDiskDxe: Remove unnecessary 'DisconnectController' callsHao Wu2016-03-232-5/+0
| | | | | | | | | | | The 'DisconnectController' function calls after 'UninstallMultipleProtocolInterfaces' are unnecessary, since 'DisconnectController' is called inside function 'UninstallMultipleProtocolInterfaces'. 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>
* MdeModulePkg/Bds: BDS hotkey shouldn't work on inactive consolesRuiyu Ni2016-03-231-23/+73
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Sunny Wang <sunnywang@intel.com>
* MdeModulePkg DxeCore: Address boundary check for Type AllocateAddressStar Zeng2016-03-221-0/+26
| | | | | | | | | | | | | | | | | | Check for Type AllocateAddress, if NumberOfPages is 0 or if (NumberOfPages << EFI_PAGE_SHIFT) is above MAX_ADDRESS or if (Start + NumberOfBytes) rolls over 0 or if Start is above MAX_ADDRESS or if End is above MAX_ADDRESS, return EFI_NOT_FOUND. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg DxeCore: Check Start consistently in CoreConvertPagesExStar Zeng2016-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | Current check: ASSERT (NumberOfPages); ASSERT ((Start & EFI_PAGE_MASK) == 0); ASSERT (End > Start) ; if (NumberOfPages == 0 || ((Start & EFI_PAGE_MASK) != 0) || (Start > (Start + NumberOfBytes))) { This patch is to update "(Start > (Start + NumberOfBytes))" to "(Start >= End)" to be consistent with "ASSERT (End > Start)" Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg PlatformVarCleanupLib: Locate VarCheck protocol when usingStar Zeng2016-03-182-11/+11
| | | | | | | | | | | | | | | Do not locate VarCheck protocol in Constructor, then the gEdkiiVarCheckProtocolGuid could be removed from [Depex]. It will be more flexible for the library Consumer to work without VarCheck protocol installed, for example at recovery boot mode with EmuRuntimeDxe. The unused UefiLib is also been removed from [LibraryClasses] in *.inf. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: Fixed incorrect return value of MatchStringCecil Sheng2016-03-171-5/+29
| | | | | | | | | | | In UEFI2.6, CapturePtr's in the Captures array returned by MatchString are to be separatedly allocated so that they can be freed by the caller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: ConSplitterDxe: use U64 mult/div wrappers in AbsPtr scalingLaszlo Ersek2016-03-161-3/+24
| | | | | | | | | This is an emergency fix for UINT64 multiplications and divisions not being done with the right BaseLib functions -- they break Ia32 builds. Fixes: 30ed3422ab2de03abf7c1433ebb482f6e5e16f45 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Rescale ConSplitter Absolute Pointer.Derek Lin2016-03-161-7/+36
| | | | | | | | | | ConSplitter's Absolute Pointer should scale virtual device's resolution like what Simple Pointer do. Before this change, caller will get Virtual device's resolution but physical device's current point. This change let caller get Virtual device's resolution with virtual device's current point. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Derek Lin <derek.lin2@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: Coding style update for DxeHttpLib.infJiaxin Wu2016-03-161-2/+2
| | | | | | | | | Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@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: Zhang Lubo <lubo.zhang@intel.com>
* MdeModulePkg: Refine the UI codeDandan Bi2016-03-164-71/+17
| | | | | | | | | Remove the ASSERT in UI code that may be triggered, and clean up the useless code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/DriverSampleDxe: Uninstall the ConfigAccess protocolDandan Bi2016-03-161-0/+2
| | | | | | | | | | In DriverSampleInit, has installed the configAccess protocol to the DriverHandle[1], but don't uninstall it in DriverSampleUnload. Now uninstall the configAccess protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Add PcdMaxPeiPerformanceLogEntries16 PROMPT&HELP STR to *.uniStar Zeng2016-03-151-1/+10
| | | | | | | | | | | | | | | | | | | | | Commit 7c50b3434377cbb49ce4514ee31339000a5cadc0 introduced PcdMaxPeiPerformanceLogEntries16 to support > 256 PEI performance log entries, but its PROMPT&HELP STR were forgotten to be added into *.uni. Commit 7c50b3434377cbb49ce4514ee31339000a5cadc0 also updated PcdMaxPeiPerformanceLogEntries HELP STR. This patch is to add PcdMaxPeiPerformanceLogEntries16 PROMPT&HELP STR and update PcdMaxPeiPerformanceLogEntries HELP STR in *.uni. Cc: Shumin Qiu <shumin.qiu@intel.com> Cc: Cinnamon Shia <cinnamon.shia@hpe.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add missing pcd description to MdeModulePkg.uniDandan Bi2016-03-111-0/+8
| | | | | | | | | | | Since PcdHiiOsRuntimeSupport has added in the MdeModulePkg.dec file, now add the usage information in the uni file. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* ModulePkg/DxeHttpLib: Adding Functions to HttpLibGhazi Belaam2016-03-104-66/+753
| | | | | | | | | | | There some usefull functions in edk2 private modules that could be used, so we added them to the httpLib Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ghazi Belaam <Ghazi.belaam@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg: Increase the maximum number of PEI performance log entriesCinnamon Shia2016-03-085-10/+37
| | | | | | | | | | | | | The maximum number of PEI performance log entries is 255. Add a new PCD, PcdMaxPeiPerformanceLogEntries16, to increase the maximum number of PEI performance log entries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Joseph Shifflett <joseph.shifflett@hpe.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg AcpiTableDxe: Use Rsdt to check against NULLStar Zeng2016-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | Some static scan tool may regard CurrentRsdtEntry to be potentially referenced to NULL pointer if CurrentRsdtEntry == NULL is used in the right above if condition judgment. CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32)); It is introduced by commit f9bbb8d9c3f065faba9f266cf4e731fe2ca70c4d. To avoid it and have same style with "((Xsdt == NULL) || CurrentTablePointer64 == (UINT64) (UINTN) Table->Table)", use Rsdt instead of CurrentRsdtEntry to check against NULL. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Shumin Qiu <shumin.qiu@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg/Bds: More user-friendly network boot option descriptionRuiyu Ni2016-03-072-39/+133
| | | | | | | | | | | | The patch enhances the UefiBootManagerLib to use more user-friendly network boot option description. It builds description like below: "PXEv6 (MAC:112233445566 VLAN1)" "HTTPv4 (MAC:112233445566)" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg/UefiBootManagerLib: Separate boot description functions.Ruiyu Ni2016-03-074-621/+613
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg/Bds: Fix VS2010/VS2012 build failure.Ruiyu Ni2016-03-071-0/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg AcpiTableDxe: Don't uninstall Acpi Sdt Protocol at ReadyToLockStar Zeng2016-03-043-67/+3
| | | | | | | | | | | | 1. The consumer of Acpi Sdt Protocol may want to use the API after ReadyToLock. 2. The ACPI system configuration table even could be overwritten, we see little issue in leaving Acpi Sdt Protocol installed. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Feng Tian <feng.tian@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>