summaryrefslogtreecommitdiff
path: root/MdeModulePkg
AgeCommit message (Collapse)AuthorFilesLines
2016-05-20MdeModulePkg ScsiDiskDxe: Add Erase Block Protocol support for UFS devicesHao Wu3-27/+761
This patch implements the EFI_ERASE_BLOCK_PROTOCOL in ScsiDiskDxe driver. For now, the codes support the erase block feature only on Universal Flash Storage (UFS) devices. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-19MdeModulePkg NvmExpressDxe: Add BlockIo2 supportHao Wu7-92/+1642
Together with EFI_BLOCK_IO_PROTOCOL, EFI_BLOCK_IO2_PROTOCOL is also produced on NVMe devices. The following Block I/O 2 functions are implemented: Reset ReadBlocksEx WriteBlocksEx FlushBlocksEx Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-19MdeModulePkg BootManagerUiLib: Remove invalid keyword "bds".Dong, Eric1-4/+3
In current code, BootManagerUiLib is not BDS scope. So we remove bds keyword in the function name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-19BootMaintenanceManagerUiLib: Remove invalid keyword "bds"Dong, Eric3-6/+4
In current code, BootMaintenanceManagerUiLib is not BDS scope. So we remove bds keyword in the function name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-19MdeModulePkg UiApp: Remove invalid keyword "bds" in UiApp.Eric Dong1-4/+3
In current code, UiApp is not the BDS scope. So we remove the bds keyword in the function name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-19BootMaintenanceMangerUiLib: Save mode info for later use.Dong, Eric2-1/+78
In current code, we use different output modes for boot phase and setup phase. When split BootMaintenanceMangerUiLib from UiApp code, we not add logic to save the boot phase mode info which will be used later. This change add this logic. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-19MdeModulePkg BootManagerUiLib: Save mode info for later use.Dong, Eric2-1/+78
In current code, we use different output modes for boot phase and setup phase. When split BootManagerUiLib from UiApp code, we not add logic to save the boot phase mode info which will be used later. This change add this logic. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-19MdeModulePkg: PeiCore: Fix PEI Multiple Sub-FV Support issueZhang, Chao B1-9/+13
FirmwareVolmeInfoPpiNotifyCallback is re-enterable during FV process. Since PrivateData->FVCount increases when processing each sub FVs, need to cache Parent FV count in stack before processing any sub FV. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com>
2016-05-18MdeModulePkg/UiApp: Exit function when parameter is unsupported or invalidDandan Bi1-0/+2
When the parameter is unsupported or invalid, should exit the function. 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: Eric Dong <eric.dong@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
2016-05-18MdeModulePkg: Skip invalid bus number scanning in PciBusDxe driverMa, Maurice1-0/+8
When PcdPciDisableBusEnumeration is enabled, the PciBus driver might get into a dead loop if the secondary bus register on PCI bridge is not programmed or programmed improperly. Adding this check to avoid any potential dead loop caused by this. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Lee Leahy <Leroy.p.leahy@intel.com>
2016-05-18BootMaintenanceManagerUiLib: Rollback changes for BootNext.Eric Dong1-30/+39
Commit a85be3ae48a8aaa40b755cd0ff7270c67cfed585 imports errors for BootNext question, this patch rollback the related changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-18MdeModulePkg: Terminate two unterminated VA_COPYs in ↵Zenith4321-0/+2
CheckRemainingSpaceForConsistencyInternal() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith432@users.sourceforge.net> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-18MdeModulePkg UiApp: Add "Enter Setup" status code.Dong, Eric1-0/+8
The original BdsDxe driver has "Enter Setup" status code while current code not. This patch restores it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-17MdeModulePkg: Refine the code for DxeHttpLibJiaxin Wu1-5/+7
Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-17MdeModulePkg/SetupBrowser: Clean the BufferValue for string before useDandan Bi2-1/+5
When copy new string content to BufferValue, need to clean the BufferValue firstly, or the BufferValue may contain some content that doesn't belong to the new string. 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: Liming Gao <liming.gao@intel.com>
2016-05-17MdeModulePkg/SetupBrowser: Should free ConfigResp when it no longer be usedDandan Bi1-1/+2
When submit form fail, the progress point to the first fail part in ConfigResp, so should free the ConfigResp after Progrss has been processed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-05-17MdeModulePkg/BootMaintenanceManagerUiLib: hide library-internal symbolLaszlo Ersek1-1/+1
Static storage duration objects that are internal to a library instance should: - either have internal linkage (i.e., be declared STATIC), - or, if they are referenced in multiple files of the library instance, prefixed with a word that is specific to the library instance, and minimizes namespace collisions. In this case, the "gHiiDriverList" variable (with static storage duration and external linkage) is defined in both BootMaintenanceManagerUiLib and UiApp. When these are linked together, GCC catches the multiple external definitions and aborts the build. (GCC notices this due to commit 214a3b79417f.) Fix the error by applying the first rule above. Fixes: a85be3ae48a8aaa40b755cd0ff7270c67cfed585 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-05-17MdeModulePkg/BootMaintenanceManagerUiLib: remove unused but set variableLaszlo Ersek1-2/+0
As-is, the code triggers [-Werror=unused-but-set-variable] with GCC. Fixes: a85be3ae48a8aaa40b755cd0ff7270c67cfed585 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-05-16MdeModulePkg-DxeCore: rename CoreGetMemoryMapPropertiesTableJiewen Yao2-5/+5
This patches rename CoreGetMemoryMapPropertiesTable to CoreGetMemoryMapWithSeparatedImageSection. The reason is that CoreGetMemoryMapPropertiesTable is called by MemoryAttributesTable.c to get separated PE image section information. It is confusing to use *PropertiesTable, because it is NOT related to PropertiesTable.c We rename it to avoid confusing. Cc: Michael D 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: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-15MdeModulePkg Variable: return error for empty str VariableName to GetVariableStar Zeng3-2/+14
Current GetVariable implementation will return the first variable for empty str VariableName, it is because GetVariable and GetNextVariablename are sharing same function FindVariable. But UEFI sepc defines SetVariable that If VariableName is an empty string, then EFI_INVALID_PARAMETER is returned, that means an empty string variable could never be set successfully, so GetVariable should return error for empty string VariableName. 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>
2016-05-13MdeModulePkg UiApp: change code for easy customization.Eric Dong13-919/+1484
Change file arrangement to let user easy customize the front page UI. After this change: 1. UiCustomizeFrontPage function in FrontPageCustomizedUi.c use to let user customize front page menus. UiFrontPageCallbackHandler function use to handle the callback for the added menus. 2. FrontPageCustomizedUiSupport.c file used to add support functions used by FrontPageCustomizedUi.c file. 3. After this change, only above two files need to be updated if front page menus needed to be changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-13BootMaintenanceManagerUiLib: change code for customization.Dong, Eric11-381/+812
Change file arrangement to let user easy customize the BMM UI. After this change: 1. UiCustomizeBMMPage function in BootMaintenanceManagerCustomizedUi.c use to let user customize BMM first page menus. UiBMMCallbackHandler function use to handle the callback for the added menus. 2. BootMaintenanceManagerCustomizedUiSupport.c file used to add support functions used by BootMaintenanceManagerCustomizedUi.c file. 3. After this change, only above two files need to be updated if BMM first page menus needed to be changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-13MdeModulePkg:DxeHttpLib: Add checks in HttpGenRequestMessage APINagaraj Hegde1-90/+125
HttpGenRequestMessage assumes that HTTP message would always contain a request-line, headers and an optional message body. However, subsequent to a HTTP PUT/POST request, HTTP requests would contain just the message body. This patch supports creation of such request messages with additional checks. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-05-12MdeModulePkg AtaAtapiPassThru: Fix incorrect parameter description commentHao Wu1-6/+6
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-12MdeModulePkg Ata: Use the new (incompatible) PortMultiplierPort semanticsHao Wu3-23/+66
The Mantis ticket 1353 <https://mantis.uefi.org/mantis/view.php?id=1353> and Mantis ticket 1472 <https://mantis.uefi.org/mantis/view.php?id=1472> updated the description of the port multiplier port number parameter in SATA Device Path Node and ATA Pass-Through Protocol. Now, this parameter should be set to 0xFFFF instead of 0 to indicate that an ATA device is directly attached on the controller port. Please note that this is an incompatible change. The consumer of SATA device path or ATA_PASS_THRU needs to re-examine its usage to follow UEFI 2.5 mantis 1353 and 1472. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-12MdeModulePkg/UsbMouseAbsolutePointerDxe: fix VS2015 NOOPT build errorFeng Tian1-4/+4
Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
2016-05-11MdeModulePkg/PciHostBridgeDxe: Honor ResourceAssignedRuiyu Ni3-58/+134
Change PciHostBridgeDxe driver to not install the PciHostBridgeResourceAllocation protocol and let PciRootBridgeIo.Configuration() return the correct PCI resource assignment information when the ResourceAssigned is TRUE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-05-11MdeModulePkg/PciHostBridgeLib: Add ResourceAssigned fieldRuiyu Ni1-0/+2
Some platform doesn't require PciBus driver to assign resource to PCI devices which causes PciRootBridgeIo.Configuration() cannot return correct resource information to caller. When resource assignment by PciBus is not mandatory, only light version of PCI bus enumeration is performed, which only collects the device resource consumption and publishes the PciIo instance. The corresponding logic is in PciEnumeratorLight() in PciBus driver. But PciEnumeratorLight() still depends on PciRootBridgeIo.Configuration() returns the starting bus number in order to search down to find all PCI devices under the root bridge. When ResourceAssigned in PCI_ROOT_BRIDGE returned by PciHostBridgeGetRootBridges() is TRUE, PciHostBridge driver treats the Bus/Io/Mem/MemAbove4G/PMem/PMemAbove4G as the resource that are *actually assigned* to the root bridge, instead of the resource that *can be assigned* to the root bridge. So that PciRootBridgeIo.Configuration() can return the correct information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-05-11MdeModulePkg/PciHostBridgeDxe: Fix a Base/Limit comparing bugRuiyu Ni2-14/+14
When the aperture base equals to aperture limit, the old code treats the aperture as non-existent. It's not correct because it indicates a range starting with base and the length is 1. The new code corrects the comparing bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-05-11MdeModulePkg/PciHostBridgeDxe: Don't miss prefetchable MMIO apertureRuiyu Ni1-1/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-05-10MdeModulePkg/PciSioSerialDxe: Do not flush the UARTRuiyu Ni1-26/+1
The patch aligns to the IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe driver not flush the UART in Reset() and SetAttributes() function. It was found the flush causes hang on certain PCI serial devices. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Jin <eric.jin@intel.com>
2016-05-10MdeModulePkg RamDiskDxe: Fix wrong HII behavior for more than 8 RAM disksHao Wu5-29/+37
The RamDiskDxe driver originally uses a variable-length HII varstore to retrieve the HII checkbox status of each registered RAM disk. However, HII does not support the variable-length varstore feature. Therefore, only the checkbox status for the first 8 RAM disks are tracked for the following definition of HII varstore structure considering the alignment: typedef struct { UINT64 Size; UINT8 RamDiskList[0]; } RAM_DISK_CONFIGURATION; This commit uses the private data of each registered RAM disks to track the HII checkbox status instead to resolve the 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>
2016-05-10MdeModulePkg RamDiskDxe: Report ACPI NFIT for reserved memory RAM disksHao Wu5-0/+658
The RamDiskDxe now will report RAM disks with reserved memory type to NFIT in the ACPI table. This commit will also make sure that an NVDIMM root device exists in the \SB scope before reporting any RAM disk to NFIT. To properly report the NVDIMM root device, one will need to append the following content in the [Rule.Common.DXE_DRIVER] field in platform FDF files: RAW ACPI Optional |.acpi RAW ASL Optional |.aml 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> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
2016-05-09MdeModulePkg/Sd: add Erase Block support on sd/emmc deviceFeng Tian10-6/+978
It's done by producing EFI_ERASE_BLOCK_PROTOCOL protocol instance. Cc: Hao Wu <hao.a.wu@intel.com> 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>
2016-05-09MdeModulePkg: FileExplorerLib: prevent freeing null pointerMichael Zimmermann1-1/+3
when there's no volume label 'Info' can be NULL Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg/SdMmcPciHcDxe: Check SD's supported bus mode before switchFeng Tian3-41/+75
Before switch to a bus mode, we need check if the SD device supports this bus mode. Cc: Wu, Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg/SdMmcPciHcDxe: Error handling enhance on tuning procedureFeng Tian4-21/+56
Enhance the code to reset tuning circuit when tuning error case happens. Cc: Wu, Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg/SdMmcPciHcDxe: Using PIO rather than DMA for clock tuningFeng Tian3-98/+164
The original code is using ADMA mode to do clock tuning procedure. It may have problem on some SD/MMC host controllers as there is no way to know when to send next tuning cmd. Update it to PIO mode to strictly follow SD Host Controller Simplified Specification 3.0 Figure 2-29. By this way, if the Buffer Read Ready interrupt is set, we could know it's ok to send the next clock tuning cmd. Cc: Wu, Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg/SdMmcPciHcDxe: Use BaseClk if the target clock is largerFeng Tian3-3/+20
The original code has a bug to calculate which clock freq should be used when the target clock freq is larger than the BaseClock Freq provided by the system. Cc: Wu, Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg/SdMmcPciHcDxe: break cmd exec if the card isn't identifiedFeng Tian2-5/+29
Check if the card is identified/initialized correctly. if not, break the following cmd execution through PassThru()/ResetDevice(). Cc: Wu, Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg: Ignore BootFileName if it is overloaded.Heyi Guo1-3/+7
Make sure "BootFileName" is not overloaded before use it in PXE driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: chenzhihui <chenzhihui4@huawei.com> Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-05-06MdeModulePkg/FileExplore: Make LibraryClass & Depex module type consistentDandan Bi1-1/+1
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: Liming Gao <liming.gao@intel.com>
2016-05-06MdeModulePkg/HiiDatabaseDxe: Fix memory leak issues in HiiDatabaseDxeDandan Bi1-1/+20
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: Eric Dong <eric.dong@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
2016-05-06MdeModulePkg/SetupBrowser: Call submit callback function when no failureDandan Bi1-2/+13
In current code will always call submit callback function, but we should call submit callback function when has no failure in the submit action. This patch to fix this issues. 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: Liming Gao <liming.gao@intel.com>
2016-05-06MdeModulePkg: Restore question base on the fail info when submit failDandan Bi2-7/+151
When RouteConfig function fail in SubmitForForm or SubmitForFormSet function, we should restore the question value base on the failure information, should not restore all the question. This patch to fix this issue. 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: Liming Gao <liming.gao@intel.com>
2016-05-06MdeModulePkg NvmExpressDxe: Initialize IoAlign info for an NVMe deviceHao Wu1-0/+1
The "IoAlign" field in EFI_BLOCK_IO_MEDIA of an NVMe device is not initialized properly, leading to a zero value for this field. It should be initialized from the "IoAlign" field in the EFI_NVM_EXPRESS_PASS_THRU_MODE structure maintained by the NVMe controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-06MdeModulePkg: Refine SNP driver's media status check logic.Fu Siyuan4-16/+64
Some UNDI drivers may not support the cable detect in UNDI INITIALIZE command, but support the media present check in UNDI GET_STATUS command. Current SNP driver will set the MediaPresentSupported field to FALSE in EFI_SIMPLE_NETWORK_MODE for such case, which forbid the media detect from the callers. This patch updates the SNP driver to support such kind of UNDIs for media detect. MediaPresentSupported will be set to TRUE, and a GET_STATUS command will be issued immediately after INITIALIZE command in SNP->Initialize() function, to refresh the value of MediaPresent in SNP mode data. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Ye Ting <ting.ye@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
2016-05-05MdeModulePkg: ScsiDiskDxe: cope with broken "Supported VPD Pages" VPD pageLaszlo Ersek1-0/+37
The USB flash drive with Vendor ID 0x1516 (CompUSA) and Product ID 0x6221 returns a broken "Supported VPD Pages" VPD page. In particular, the PageLength field has the invalid value 0x0602 (decimal 1538). This prevents the loop from terminating that scans for the Block Limits VPD page code in ScsiDiskInquiryDevice(): for (Index = 0; Index < PageLength; Index++) { because the Index variable has type UINT8, and it wraps from 255 to 0, without ever reaching PageLength (1538), and because EFI_SCSI_PAGE_CODE_BLOCK_LIMITS_VPD does not occur at offsets 0 through 255. * The fix is not to change the type of Index to UINT16 or a wider type. Namely, section 7.8.14 Supported VPD Pages VPD page in the "SCSI Primary Commands - 4" (SPC-4) specification names the following requirement: The supported VPD page list shall contain a list of all VPD page codes (see 7.8) implemented by the logical unit in ascending order beginning with page code 00h. Since page codes are 8-bit unsigned quantities, it follows that the maximum size for the Supported VPD Pages VPD page is 0x100 bytes, in which every possible page code (0x00 through 0xFF) will be found, before the UINT8 offset wraps around. (EFI_SCSI_SUPPORTED_VPD_PAGES_VPD_PAGE.SupportedVpdPageList is correctly sized as well, in "MdePkg/Include/IndustryStandard/Scsi.h".) * Instead, add sanity checks that enforce the above requirement. If the device breaks the spec, simply fall back to the "Block Limits page absent" case. Cc: Feng Tian <feng.tian@intel.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1330955 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-05-05MdeModulePkg FileExplorerLib: Add UefiHiiServicesLib dependency.Dong, Eric1-0/+1
FileExplorerLib depends on UefiHiiServicesLib, so add this missing library dependency back. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-05MdeModulePkg: Do not use hard coded TTL/ToS in PXE driver.Fu Siyuan3-11/+21
EFI_PXE_BASE_CODE_PROTOCOL has interface to set the TTL and ToS value, but not used by the UdpWrite() interface. The code always use a hard coded 16 for the TTL and 0 for ToS. This patch update the UpdWrite() to use the TTL and ToS which have been set by the SetParameters(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-By: Samer El-Haj-Mahmoud <elhaj@hpe.com>