summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Fix use-after-free error in InstallConfigurationTable()Shi, Steven2017-06-202-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=601 When installing configuration table and the original gDxeCoreST->ConfigurationTable[] buffer happen to be not big enough to add a new table, the CoreInstallConfigurationTable() enter the branch of line 113 in InstallConfigurationTable.c to free the old gDxeCoreST->ConfigurationTable[] buffer and allocate a new bigger one. The problem happens at line 139 CoreFreePool(), which is to free the old gDxeCoreST->ConfigurationTable[] buffer. The CoreFreePool()'s behavior is to free the buffer firstly, then call the InstallMemoryAttributesTableOnMemoryAllocation (PoolType) to update the EfiRuntimeServices type memory info, the CoreInstallConfigurationTable() will be re-entered by CoreFreePool() in its calling stack, then use-after-free read error will happen at line 59 of InstallConfigurationTable.c and use-after-free write error will happen at line 151 and 152 of InstallConfigurationTable.c. The patch is to update System table to the new table pointer before calling CoreFreePool() to free the old table. The case above is in DxeCore, but not in PiSmmCore. The change in PiSmmCore is to be consistent with DxeCore. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi <steven.shi@intel.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Steven Shi <steven.shi@intel.com>
* MdeModulePkg: Clean ACPI 2.0 characters in UEFI specDandan Bi2017-06-204-17/+16
| | | | | | | | | | v2: Add some missing changes. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7Dandan Bi2017-06-208-28/+54
| | | | | | | | | | | v2: Add some missing changes Ps2KeyboardDxe. Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/Network: Typo fixJiaxin Wu2017-06-142-5/+5
| | | | | | | | | | | warter -> water Maunual -> Manual Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/BMMUiLib: Fix incorrect variable nameDandan Bi2017-06-131-1/+1
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=592 In function UpdateConsoleContent, we compare console name with "ErrOut" string to check whether the content in console Error device page has been changed. But when call function UpdateConsoleContent, we pass console name as "ConErr" by mistake. This patch is to fix the inconsistent issue. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@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>
* MdeModulePkg/DxeHttpLib: Handle new #define in HttpMappingToStatusCodehegdenag2017-06-091-0/+2
| | | | | | | | | | Related to the ECR for support of HTTP Redirect (308) 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: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/PciHostBridgeDxe: Make bitwise operands of the same sizeHao Wu2017-06-091-1/+1
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/UefiPxeBcDxe: Refine the PXE boot displayed informationJiaxin Wu2017-06-053-2/+54
| | | | | | | | | | | | This path is to refine the PXE boot displayed information so as to in line with NetworkPkg/UefiPxeBcDxe driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/UefiPxeBcDxe: Fix the PXE BootMenu selection issueJiaxin Wu2017-06-051-3/+3
| | | | | | | | | | | | | Currently implementation doesn't accept the input during the user is trying to select the PXE BootMenu from option 43. This path is to fix that problem. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/Xhci: Correct the indention of commentsRuiyu Ni2017-06-021-4/+4
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/Xhci: Remove TRB when canceling Async Int TransferRuiyu Ni2017-06-021-0/+21
| | | | | | | | | | | | Some USB devices don't report data periodically through Int Transfer. They report data only when be asked. If the TRB is not removed from the XHCI HW, when next time HOST asks data again, the data is reported but consumed by the previous TRB, which results the HOST thinks data never comes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/MnpDxe: Fix EBC build hang issue.Fu Siyuan2017-06-021-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/UsbBus: Correct debug messageRuiyu Ni2017-06-021-3/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/UsbBus: Fix system hang when failed to uninstall UsbIoRuiyu Ni2017-06-021-16/+27
| | | | | | | | | | | | | | | | | | | | | | | When "reconnect -r" is typed in shell, UsbFreeInterface() is called to uninstall the UsbIo and DevicePath. But When a UsbIo is opened by a driver and that driver rejects to close the UsbIo in Stop(), the uninstall doesn't succeed. But UsbFreeInterface () frees the DevicePath memory without check whether the uninstall succeeds. It leads to the DXE core database contain a DevicePath instance but that instance's memory is freed. Assertion happens when someone calls InstallProtocol(DevicePath) because the InstallProtocol() checks all DevicePath instance to find whether the same one exits in database. We haven't seen any USB device driver which rejects to close UsbIo in Stop(), but it's very likely. 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: Star Zeng <star.zeng@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/Xhci: Fill the 'interval' field for ISO endpoint contextHao Wu2017-06-012-2/+58
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=510 The commit fills the 'Interval' field of the Endpoint Context data for isochronous endpoints. It will resolve the error when a Configure Endpoint Command is sent to an isochronous endpoint. 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>
* MdeModulePkg/PrintLib: Avoid reading content beyond the format stringHao Wu2017-06-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=567 In functions DxePrintLibPrint2ProtocolVaListToBaseList() and InternalPrintLibSPrintMarker(), when processing ASCII format strings, if the format string walker pointer 'Format' is pointing at the end of the format string (i.e. '\0'), the following expression: *(Format + 1) will read an undefined value. Though this value won't affect the functionality, since it will be masked by variable 'FormatMask': (*(Format + 1) << 8)) & FormatMask (FormatMask is 0xff for ASCII format string) This commit adds additional logic to avoid reading undefined content. 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>
* MdeModulePkg: Fix potential memory leaks in DxeHttpLib.Paulo Alcantara2017-05-271-3/+12
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <pcacjr@gmail.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/DebugSupportDxe: Fix XCODE5 build failureMichael Kinney2017-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=572 Update X64 AsmFuncs.S to resolve a build failure using the XCODE5 tool chain. This change updates AsmFuncs.S to match AsmFuncs.asm and AsmFuncs.nasm. The error generated in XCODE5 build is: error: invalid instruction mnemonic 'movzxw' movzxw 8(%rax), %rax ^~~~~~ The correct instruction is movzwq 8(%rax), %rax Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Andrew Fish <afish@apple.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/RegularExpressionDxe: Fix XCODE5 build failureMichael Kinney2017-05-241-1/+1
| | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=572 The ErrorMessage local variable in OnigurumaMatch() should be type OnigUChar instead of type CHAR8. This resolves a build failure with the XCODE5 tool chain. Cc: Andrew Fish <afish@apple.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB infoStar Zeng2017-05-241-3/+3
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=570 Use PdbStringOffset to get PDB info, it will have no functional impact, and will just make the code more generic. 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>
* MdeModulePkg SmiHandlerProfile: Use fixed data type in data structureStar Zeng2017-05-243-67/+105
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=568 Use fixed data type in data structure and make the structure be natural aligned. Without this update, the code must assume DXE and SMM are using same data type (same size of UINTN), but it may be not true at some case, for example, after standalone SMM feature is enabled. With this update, the data structure will be phase independent and convenient for consumer to parse the data. 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>
* MdeModulePkg SmiHandlerProfile: Fix no PDB case handling incorrectlyStar Zeng2017-05-242-6/+12
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=569 The PdbStringOffset should be set to 0 for no PDB case, then SmiHandlerProfileInfo can use it to know whether there is PCD info or not. 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>
* MdeModulePkg/LogoDxe: Return error if HII Package not presentMichael Kinney2017-05-221-2/+5
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=554 Update LogoDxe module to print a DEBUG() message and exit with an error instead of ASSERT_EFI_ERROR() if the HII Image Package with the logo image is not present. If a tool chain does not support generation of PE/COFF resource sections, then this module can not produce the logo from an HII Image Package. XCODE5 is an example of a tool chain that does not currently support generation of PE/COFF resource sections. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Andrew Fish <afish@apple.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/BDS: Fix a buffer overflow bugRuiyu Ni2017-05-221-8/+8
| | | | | | | | | | | | | | | KeyOption points to a buffer holding the content of Key####. So its size is smaller than EFI_BOOT_MANAGER_KEY_OPTION. Old code to assign value to KeyOption->OptionNumber modifies the memory outside of the KeyOption buffer. The patch fixes this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctlyStar Zeng2017-05-191-0/+1
| | | | | | | | | | | | | | | When DynamicEx PCD is only used in PEI code, but not DXE code, current implementation of DxePcdGetNextTokenSpace does not assign TmpTokenSpaceBufferCount correctly, but leaves it as initial value, then DxePcdGetNextTokenSpace may return incorrect token space guid and status. This patch is to fix this issue. Cc: Liming Gao <liming.gao@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/PciHostBridgeDxe: Fix EBC build failureDandan Bi2017-05-181-2/+2
| | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/PciBus: Add IOMMU support.Jiewen Yao2017-05-174-4/+54
| | | | | | | | | | | | | | | | | | | | If IOMMU protocol is installed, PciBus need call IOMMU to set access attribute for the PCI device in Map/Ummap. Only after the access attribute is set, the PCI device can access the DMA memory. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leo Duran <leo.duran@amd.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Previous patch Tested-by: Brijesh Singh <brijesh.singh@amd.com> Previous patch Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Leo Duran <leo.duran@amd.com>
* MdeModulePkg/PciHostBridge: Add IOMMU support.Jiewen Yao2017-05-174-0/+102
| | | | | | | | | | | | | | | | | | | | | If IOMMU protocol is installed, PciHostBridge just calls IOMMU AllocateBuffer/FreeBuffer/Map/Unmap. PciHostBridge does not set IOMMU access attribute, because it does not know which device request the DMA. This work is done by PciBus driver. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leo Duran <leo.duran@amd.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Previous patch Tested-by: Brijesh Singh <brijesh.singh@amd.com> Previous patch Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Leo Duran <leo.duran@amd.com>
* MdeModulePkg/Include: Add IOMMU protocol definition.Jiewen Yao2017-05-172-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This protocol is to abstract DMA access from IOMMU. 1) Intel "DMAR" ACPI table. 2) AMD "IVRS" ACPI table 3) ARM "IORT" ACPI table. There might be multiple IOMMU engines on one platform. For example, one for graphic and one for rest PCI devices (such as ATA/USB). All IOMMU engines are reported by one ACPI table. All IOMMU protocol provider should be based upon ACPI table. This single IOMMU protocol can handle multiple IOMMU engines on one system. This IOMMU protocol provider can use UEFI device path to distinguish if the device is graphic or ATA/USB, and find out corresponding IOMMU engine. The IOMMU protocol provides 2 capabilities: A) Set DMA access attribute - such as write/read control. B) Remap DMA memory - such as remap above 4GiB system memory address to below 4GiB device address. It provides AllocateBuffer/FreeBuffer/Map/Unmap for DMA memory. The remapping can be static (fixed at build time) or dynamic (allocate at runtime). 4) AMD "SEV" feature. We can have an AMD SEV specific IOMMU driver to produce IOMMU protocol, and manage SEV bit. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leo Duran <leo.duran@amd.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Previous patch Tested-by: Brijesh Singh <brijesh.singh@amd.com> Previous patch Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Leo Duran <leo.duran@amd.com>
* MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()Hao Wu2017-05-171-2/+2
| | | | | | | | | | For function UfsPassThruGetTargetLun(), the length of the input device node specified by 'DevicePath' should be compared with the size of 'UFS_DEVICE_PATH' rather than the size of 'SCSI_DEVICE_PATH'. 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>
* MdeModulePkg SmiHandlerProfile: Fix memory leak in DumpSmiChildContextStar Zeng2017-05-122-2/+14
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=530 In DumpSmiChildContext() of SmiHandlerProfile.c and SmiHandlerProfileInfo.c, the return buffer from ConvertDevicePathToText() should be freed after used. 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>
* MdeModulePkg CapsuleApp: Fix mixed EOL format issueStar Zeng2017-05-111-1/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/FormDisplay: Make the LineWidth of option consistentDandan Bi2017-05-111-1/+1
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=529 LineWidth of option in funcrion UpdateSkipInfoForMenu and DisplayOneMenu are inconsistent. Now fix this issue to avoid incorrect UI display. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@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>
* MdeModulePkg: Addressing TCP Window Retraction when window scale factor is used.Fu Siyuan2017-05-093-11/+44
| | | | | | | | | | | | | The RFC1323 which defines the TCP window scale option has been obsoleted by RFC7323. This patch is to follow the RFC7323 to address the TCP window retraction problem when a non-zero scale factor is used. The changes has been test in high packet loss rate network by using HTTP boot and iSCSI file read/write. 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: Ye Ting <ting.ye@intel.com>
* MdeModulePkg: Add wnd scale check before shrinking window.Fu Siyuan2017-05-091-5/+24
| | | | | | | | | | | Moving Right window edge to the left on sender side without additional check can lead to the TCP deadlock, when receiver ACKs proper segment, while sender discards it for future ACK. To prevent this add check if usable window (or shrink amount in this case) is bigger then receiver's window scale factor. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrey Tepin <atepin@kraftway.ru> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg: Update DEC/DSC version from 0.96 to 0.97Tian, Feng2017-05-052-3/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Fix issue the iSCSI client can not send reset packet correctly.Zhang, Lubo2017-05-021-9/+9
| | | | | | | | | | | | | | | if we already established a iSCSI connection from initiator to target based on IPv4 stack, after using reconnect -r command, we can not rebuild the session with the windows target, since the server thought the session is still exist. This issue is caused by wrong place of acquire ownership of sock lock which lead the iSCSI can not reset the connection correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* MdeModulePKg/BDS: Build meaningful description for Wi-Fi boot optionRuiyu Ni2017-04-261-5/+23
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Fan Wang <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdeModulePkg/Ip4Dxe: Refine the IPv4 configuration help infoJiaxin Wu2017-04-252-3/+4
| | | | | | | | | | | | | | Below value indicate whether network address configured successfully or not: Network Device List->MAC->IPv4 Network Configuration->Configured. This patch is to refine its help info. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* MdeModulePkg: Update PiSmmCore to set correct ImageAddress into LoadedImageLiming Gao2017-04-251-2/+2
| | | | | | | Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg PiSmmIpl: Fix the issue in LMFA featureLiming Gao2017-04-251-6/+6
| | | | | | | | | SmramBase should be got from mLMFAConfigurationTable. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/UfsPciHc: Avoid overriding return value in BindingStartHao Wu2017-04-251-7/+6
| | | | | | | | | | | In function UfsHcDriverBindingStart(), the return value 'Status' may be overridden during the original PCI attributes restore process. This commit refines the logic to avoid such override. 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>
* MdeModulePkg/UfsPciHc: Remove unused field in UfsHc private structHao Wu2017-04-252-5/+3
| | | | | | | | | The commit removes the unused field 'EFI_HANDLE Handle' in Ufs host controller private data structure 'UFS_HOST_CONTROLLER_PRIVATE_DATA'. 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>
* MdeModulePkg: Discard received broadcast message in DxeIpIoLib.Fu Siyuan2017-04-241-0/+6
| | | | | | | 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>
* MdeModulePkg/NvmExpressDxe: Handling return of write to sq and cq dbSuman Prakash2017-04-241-2/+6
| | | | | | | | | | | | | | | In case of an async command if updating the submission queue tail doorbell fails then the command will not be picked up by device and no completion response will be created. This scenario has to be handled. Also if we create an AsyncRequest element and insert in the async queue, it will never receive a completion so in the timer routine this element won't be freed, resulting in memory leak. Also in case of blocking calls we should capture the status of updating completion queue head doorbell register and return it to caller of PassThru. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Suman Prakash <suman.p@samsung.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/PiSmmCore: Remove redundant PoolTail pointer assignmentHao Wu2017-04-241-4/+4
| | | | | | 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>
* MdeModulePkg/DeviceManagerUiLib: Fix the network device MAC display issueJiaxin Wu2017-04-212-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | v3: * Add NULL string check. v2: * Define new STR_FORM_NETWORK_DEVICE_TITLE_HEAD for L" Network Device " instead of hard code in the code. Network device tile (STR_FORM_NETWORK_DEVICE_TITLE) is dynamic adjusted according the different MAC value. So, the string value shouldn't be treated as a constant string (Network Device). Otherwise, the display will be incorrect. Reproduce: Device Manager->Network Device List, select to enter MAC, then to press ESC back to previous page, then re-enter, found each enter/ESC operation, the MAC address display +1. Cc: Eric Dong <eric.dong@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/Mtftp4Dxe: Add invalid ServerIp check during MTFTP configurationJiaxin Wu2017-04-211-1/+5
| | | | | | | | | Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/Ip4Dxe: Fix the incorrect RemoveEntryListJiaxin Wu2017-04-211-2/+2
| | | | | | | | | | | Cc: Subramanian Sriram <sriram-s@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
* MdeModulePkg/FirmwarePerformanceDxe: Error Level is not used correctlyJeff Fan2017-04-211-2/+2
| | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>