summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/DriverSample: Skip the character "&" before "OFFSET="Dandan Bi2016-08-111-0/+5
| | | | | | | | | | | | | When comparing the L"OFFSET=" with the ConfigResp string to find all the "OFFSET=" in ConfigResp, should skip the character "&" before "OFFSET=" in ConfigResp 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>
* MdeModulePkg/Browser: Share default if some default value are not specifiedDandan Bi2016-08-112-5/+43
| | | | | | | | | | | | | | | | Add a new implementation policy of getting default value in SetupBrowser. The new policy is only for the situation that a question has default value but doesn't have default value for all supported default type. In this case, we will choose the smallest default id from the existing defaults, and share its value to other default id which has no default value. 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>
* MdeModulePkg/HiiDB: Share default if some default value are not specifiedDandan Bi2016-08-112-16/+109
| | | | | | | | | | | | | | | | Add a new implementation policy of getting default value in HiiDatabase. The new policy is only for the situation that a question has default value but doesn't have default value for all supported default type. In this case, we will choose the smallest default id from the existing defaults, and share its value to other default id which has no default value. 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>
* MdeModulePkg DSC: Add build option to disable deprecated APIsHao Wu2016-08-081-0/+3
| | | | | | | | | | | | | | | Add the following definition in the [BuildOptions] section in package DSC files to disable APIs that are deprecated: [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> 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> Reviewed-by: Feng Tian <feng.tian@Intel.com>
* MdeModulePkg LoadFileOnFv2: Fix the potential NULL pointer accessLiming Gao2016-08-031-0/+6
| | | | | | | | Check NULL pointer before access it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg LoadFileOnFv2: Correct copy right formatLiming Gao2016-08-031-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg UefiBootManagerLib: Fix VS2012 build failureLiming Gao2016-08-031-0/+1
| | | | | | | | Initialize local variable Description as NULL first. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/UsbMass: Not retry if usb bot transfer execution failFeng Tian2016-08-032-4/+13
| | | | | | | | | | | | | | The retry mechanism will bring issue if the usb device is unplugged from XHCI HC but s/w is trying to access it through BlockIo. The current cmd will get device error return status, but the sequential cmds will be timeout. This behavior will cause system unresponsive for a long while and bring bad user experience. So we break the retry loop if found device error. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: add generic SataController driver.Feng Tian2016-08-037-0/+1835
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
* MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is emptyFeng Tian2016-08-032-3/+12
| | | | | | | | | | The original code will assert when dealing with those empty FVs. The fix is used to solve this bug. Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* MdeModulePkg: Add new LoadFileOnFv2 in Package DSC for BuildLiming Gao2016-08-011-0/+1
| | | | | | | Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg LoadFileOnFv2: Add new LoadFileOnFv2 driverLiming Gao2016-08-014-0/+531
| | | | | | | | | | | | | | This driver searches APPLICATION in FV and installs LoadFile protocol for every found one. Then, BDS will add BootOption for LoadFile protocol. It provides the generic way to expose boot option for the internal application, such as Shell. With this driver, PlatformBds doesn?t need to specially handle Shell application. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg UefiBootManagerLib: Update LoadFile boot descriptionLiming Gao2016-08-011-0/+47
| | | | | | | | | Update boot description to support LoadFile protocol based on FV file. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg UefiBootManagerLib: Support LoadFile Protocol based on FVLiming Gao2016-08-011-40/+76
| | | | | | | | | | New LoadFileOnFv2 driver will install LoadFile protocol based on FV file. Update UefiBootManagerLib to find BootMenuApp with LoadFile protocol. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg UefiBootManagerLib: Add BmIsBootMenuAppFilePath internal APILiming Gao2016-08-011-19/+30
| | | | | | | | | This function abstracts the common logic to find BootMenuApp file. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: Add missed character in copyright.Fu Siyuan2016-08-011-1/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
* MdeModulePkg SmbiosDxe: Use definition in IndustryStandard/Smbios.hStar Zeng2016-07-291-3/+3
| | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Amy Chan <amy.chan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
* MdeModulePkg UiApp: Use definition in IndustryStandard/Smbios.hStar Zeng2016-07-291-4/+4
| | | | | | | | | | | | Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Amy Chan <amy.chan@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> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
* MdeModulePkg/XhciDxe: fix a bug on TRB check in async int transferFeng Tian2016-07-251-1/+5
| | | | | | | | | | | | | The last TRB in transfer ring is a LINK type TRB, which shouldn't be accounted as a valid item in IsAsyncIntTrb(). Without this fix, the original algo will bring issue on those URBs whose TRBs crosses the transfer ring. Cc: Star Zeng <star.zeng@intel.com> 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/UsbBus: reduce the port status polling before port resetFeng Tian2016-07-252-29/+19
| | | | | | | | | | | | | | | | | | This change is used to remove the port status polling in port reset functions. Why it's needed is because: 1) The same polling on same port has taken place prior to this removed one. See UsbEnumeratePort()->GetPortStatus(). So this polling in UsbEnumerateNewDev()->ResetPort() is redundant. 2) EDKII Xhci driver hooks all GetPortStatus() operations. If we don't remove this one, XHCI driver's XhcPollPortStatusChange() may enter twice in reset process and wrongly think the device is unplugged. Cc: Star Zeng <star.zeng@intel.com> 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/UsbBus: remove redundant host controller reset in UsbBusFeng Tian2016-07-251-4/+1
| | | | | | | | | | | The Host Controller reset has been done at EDKII UHCI/EHCI/XHCI, The original code will do twice host controller initialization which is unnecessary. It also bring issues on some USB HCs. Cc: Star Zeng <star.zeng@intel.com> 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 RamDiskDxe: Not use hardcode 'SectionInstance' to locate SSDTHao Wu2016-07-201-22/+36
| | | | | | | | | | | | This commit will scan all the EFI raw section instances within the module's FV to make sure the NVDIMM root device SSDT can be properly located. Cc: Feng Tian <feng.tian@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* MdeModulePkg/PciHostBridgeDxe: fix Ia32 GCC44 build errorLaszlo Ersek2016-07-181-1/+1
| | | | | | | | | | | | | | | | | > cc1: warnings being treated as errors > MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c: > In function 'GetProposedResources': > MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c:1388: > error: integer constant is too large for 'long' type Append a ULL suffix to the replacement text of PCI_RESOURCE_LESS that is aligned with the style of the EFI_RESOURCE_SATISFIED and EFI_RESOURCE_NOT_SATISFIED macros. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Fix bug in TCP which not sending out ACK in certain circumstance.Fu Siyuan2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Consider the situation as shown in below chart. The last ACK message has acknowledged the Tcb->RcvWl2, and all the segments until Tcb->RcvNxt have been received by TCP driver. The Tcb->RcvNxt is not acknowledged due to the delayed ACK. In this case an incoming segment (Seg->Seq, Seg->End) should not be accepted by TCP driver, and an immediate ACK is required. Current TcpSeqAcceptable() thought it’s an acceptable segment incorrectly, it continues the TcpInput() process instead of sending out an ACK and droping the segment immediately. Tcb->RcvWl2 Tcb->RcvNxt Tcb->RcvWl2 + Tcb->RcvWnd Seg->Seq Seg->End | | | | | | | ---+-----+---------------+-------------+--------------------------+----------- <income segment> <----Acceptable Range--- --> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Eugene Cohen <eugene@hp.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-By: Ye Ting <ting.ye@intel.com>
* MdeModulePkg/PciBusDxe: recognize hotplug-capable PCIe portsLaszlo Ersek2016-07-132-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Section 7.8.2 of the PCI Express specification (r4.0 v0.3), entitled "PCI Express Capabilities Register (Offset 02h)", and section 7.8.9 "Slot Capabilities Register (Offset 14h)" of the same, describe the conditions when a PCIe port should be considered "supporting hotplug": - it should be a root complex port or a switch downstream port, and - it should have the "Slot Implemented" bit set in the Express Capabilities Register, and - it should have the "Hot-Plug Capable" bit set in the Slot Capabilities Register. The first two sub-conditions are already implemented in at least two open source projects I could find: - in SeaBIOS by Marcel Apfelbaum: "hw/pci: reserve IO and mem for pci express downstream ports with no devices attached" <https://code.coreboot.org/p/seabios/source/commit/3aa31d7d6375>, - in edk2 itself, in the implementation of the "PCI" UEFI Shell command: see the "PcieExplainTypeSlot" case label in function PciExplainPciExpress(), file "ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c". PciBusDxe recognizes such PCIe ports as bridges, but it doesn't realize they support hotplug. In turn PciBusDxe omits getting any resource padding information from the platform's EFI_PCI_HOT_PLUG_INIT_PROTOCOL for these bridges: GatherPpbInfo() [PciEnumeratorSupport.c] GetResourcePaddingPpb() [PciResourceSupport.c] GetResourcePaddingForHpb() [PciHotPlugSupport.c] IsPciHotPlugBus() [PciHotPlugSupport.c] // // returns FALSE // // // the following is not reached: // gPciHotPlugInit->GetResourcePadding() Implement a function called SupportsPcieHotplug() for identifying such ports, and call it from IsPciHotPlugBus() (after the call to IsSHPC()). Cc: "Johnson, Brian J." <bjohnson@sgi.com> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <Ruiyu.ni@intel.com>
* MdeModulePkg/PciBusDxe: look for the right capability in IsSHPC()Laszlo Ersek2016-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCI Hot Plug capability register block is marked with capability ID 0x0C (EFI_PCI_CAPABILITY_ID_SHPC), not 0x06 (EFI_PCI_CAPABILITY_ID_HOTPLUG). This bug prevents PciBusDxe from recognizing whether a PCI-to-PCI bridge supports hotplug. In turn the platform's EFI_PCI_HOT_PLUG_INIT_PROTOCOL is not consulted for resource padding information: GatherPpbInfo() [PciEnumeratorSupport.c] GetResourcePaddingPpb() [PciResourceSupport.c] GetResourcePaddingForHpb() [PciHotPlugSupport.c] IsPciHotPlugBus() [PciHotPlugSupport.c] IsSHPC() [PciHotPlugSupport.c] // // returns FALSE // // // the following is not reached: // gPciHotPlugInit->GetResourcePadding() Look for the correct capability ID. Cc: "Johnson, Brian J." <bjohnson@sgi.com> Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <Ruiyu.ni@intel.com>
* MdeModulePkg AtaBusDxe: Fix ATA commands cannot be sent to some devicesHao Wu2016-07-121-3/+3
| | | | | | | | | | | | If there is no port multiplier (PortMultiplierPort = 0xFFFF), current code in functions TransferAtaDevice() and TrustTransferAtaDevice() will always set the DEV bit of the ATA device register. It causes that ATA commands cannot be sent to some ATA hard drives. Cc: Feng Tian <feng.tian@intel.com> 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: Fix build error in the PXE driver.Fu Siyuan2016-07-121-1/+1
| | | | | | | Fix the build error introduced by 0a28d02d9fb5293757c507e592a4d0404a7ecf74. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg MemoryProfile: ASSERT to ensure 'DriverInfoData' is not NULLHao Wu2016-07-122-0/+2
| | | | | | | | | | | | Code logic ensures that the pointer 'DriverInfoData' will not be NULL when it is used. Add ASSERT as warning for case that will not happen. Cc: Star Zeng <star.zeng@intel.com> 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: Update PXE driver to follow edk2 coding standards.Fu Siyuan2016-07-122-4/+4
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* MdeModulePkg: Fix typos in comments and variablesGiri P Mudusuru2016-07-1145-200/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - abstrated to abstracted - accessibla to accessible - addres to address - apropriate to appropriate - arry to array - availabe to available - avaliable to available - becasue to because - correponding to corresponding - etablished to established - exeuction to execution - extensiable to extensible - fileds to fields - loadding to loading - ptototypes to prototypes - prococol protocol - requried to required - resoruce to resource - runing to running - uild to build Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg SdBlockIoPei: Initialize 'SwitchResp' elements before usingHao Wu2016-07-111-0/+1
| | | | | | | | | | The commit makes sure that the elements in array 'SwitchResp' get initialized before being used. Cc: Feng Tian <feng.tian@intel.com> 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 MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffsetStar Zeng2016-07-091-3/+2
| | | | | | | | | | | | | | | | | | | | At 94092aa60341a3e4b1e1ea7c362781b8404ac538, we extended MEMORY_PROFILE_ALLOC_INFO to add ActionStringOffset and Reserved2[6] fields, that was not aware the Reserved[4] field can be reused to have better memory profile database size efficiency. With the patch, PcdMemoryProfilePropertyMask|0x3 and PcdMemoryProfileMemoryType|0xffff, the memory profile database size can be reduced as below on my sample platform. UefiMemoryProfileSize - 0x1597A8 -> UefiMemoryProfileSize - 0x12AB28 SmramProfileSize - 0xCF68 -> SmramProfileSize - 0xB8E8 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>
* ArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLibArd Biesheuvel2016-07-072-2/+2
| | | | | | | | | | | | Switch all users of ArmLib that depend on the MMU routines to the new, separate ArmMmuLib. This needs to occur in one go, since the MMU routines are removed from ArmLib build at the same time, to prevent conflicting symbols. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/BootMaintUiLib: Update menus when open BMM formDandan Bi2016-07-073-9/+46
| | | | | | | | | | | | | | | | BootMaintenanceManagerUiLib depend on the LeagcyBootMaintUiLib to show the legacy menus. So we need to do the actions related to LegacyUi in BMM after the LeagcyBootMaintUiLib have been initialized. So now : 1). update menus (including legacy menus), 2) re-scan boot options (including legacy boot option) when opening the BMM form. We think when opening BMM form, the LeagcyBootMaintUiLib must have been initialized. 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>
* MdeModulePkg/HiiDB: Record fail info if fail to save data for EfiVarStoreDandan Bi2016-07-071-0/+3
| | | | | | | | | | | | | | | | | HiiConfigRoutingRouteConfig function returns 'Progress' to indicate the failure info in the ConfigResp string. But when fail to route the ConfigResp for EfiVarStore, it doesn't return the correct failure info. Now this patch is to fix this issue and add debug info let user know the reason of failure. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@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> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* MdeModulePkg/Bds: MemoryTypeInformation excludes boot option mem useRuiyu Ni2016-07-073-40/+19
| | | | | | | | | | | | The patch re-orders the sequences by putting updating memory type information before loading the boot option so that the reserved memory usage by HTTP RAM disk boot can be excluded by the memory type information updating. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Fix IPv4 stack potential disappeared issueJiaxin Wu2016-07-073-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | IP4_CONFIG2_INSTANCE->DataItem is used to save the configuration data to NV variable. When the policy is changed from static to DHCP, DnsServers info will be cleaned from DataItem first (See Ip4Config2SetPolicy), it's correct because DnsServers info should not be saved to NV variable. But if there is any DnsServers info received from DHCP message, it will be reset to DataItem again (See Ip4Config2SetDnsServerWorker), which may cause the NV variable contain the DnsServers info while the policy is DHCP (See Ip4Config2WriteConfigData). Then, while the platform is reset, the issue happened. Because Ip4Config2DataTypeDnsServer is set under DHCP policy, which is not allowed by UEFI Spec and error returned. This patch is used to resolve this potential issue. 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: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/BootMaintUi: Add error handling codes when AllocatePool failBi, Dandan2016-07-063-26/+35
| | | | | | | | | | | | | | The AllocateCopyPool in function ExtractFileNameFromDevicePath may return NULL, so need to do error handling. This patch is to add error handling codes for function ExtractFileNameFromDevicePath and its caller functions. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@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: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/UefiHiiLib: Add error handling codes when AllocatePool failBi, Dandan2016-07-061-2/+12
| | | | | | | | Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg UefiPxeBcDxe: Fix build error for lastest VS2015 compilerHao Wu2016-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | The UefiPxeBcDxe module encounters a build error for IA32 arch using the latest version of VS2015: UefiPxe4BcDxe.lib(PxeBcDhcp.obj) : error LNK2001: unresolved external symbol __allmul The cause is line 1659 in file MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c. The third parameter for gBS->SetTimer() function is of type UINT64, so the multiplication should use the MultU64x32() function. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> 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: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
* MdeModulePkg: Skip registering BootManagerMenu if absentSunny Wang2016-07-053-25/+70
| | | | | | | | | | | | | | | | | This is a enhancement to support the case when platform firmware doesn't support Boot Manager Menu. For now, if BootManagerMenu FFS can not be retrieved from FV, BDS core code will still register a boot option for it. Then, this non-functional boot option will still be booted by user's request (like HotKey or Exit from shell) to cause additional boot time and error status code reported. Therefore, it would be good to skip BootManagerMenu boot option registration and then return error status and Invalid BootOption data for this case so that the BootManagerBoot() or other consumers can directly return without doing anything. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg MemoryProfileInfo: Handle "/" character in the PDB pathStar Zeng2016-07-051-1/+1
| | | | | | | 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 DxeIplPeim: Add ASSERTs for unexpected AllocatePages failureHao Wu2016-07-051-1/+3
| | | | | | | | Cc: Star Zeng <star.zeng@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> 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 MemoryProfile: Add ASSERTs to make sure pointers are not NULLHao Wu2016-07-052-0/+6
| | | | | | | | | | | | Code logic ensures that both pointers 'DriverInfoData' and 'AllocInfoData' will not be NULL when they are used. Add ASSERTs as warning for cases that will not happen. Cc: Star Zeng <star.zeng@intel.com> 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/EmmcDxe: Don't expose BlockIo interface for RPMB partitionFeng Tian2016-07-011-93/+45
| | | | | | | | | | | | | This change is to avoid UEFI SCT failure as UEFI SCT has no knowledge about how to accessing a EMMC RPMB partition. The user needs to access RPMB partition should get access through EFI_SD_MMC_PASS_THRU protocol with authentication key & mac. 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>
* MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hangFeng Tian2016-07-015-40/+75
| | | | | | | | | | | | | | | | | | We have to upgrade the TPL level used by SdMmc stack because the following flow: DiskIo2ReadWriteDisk() in logical partition -> PartitionReadBlocksEx() in logical partition at TPL callback level -> ProbeMediaStatusEx() with sync request -> DiskIo2ReadWriteDisk() in physical partition -> waiting for async task completion. if the low layer driver doesn't run at TPL_NOTIFY level, it will have no time to trigger async task and cause system hang. 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>
* MdeModulePkg PiSmmCoreMemoryAllocLib: Extend to support MemoryProfileLibStar Zeng2016-07-019-23/+490
| | | | | | | 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 DxeCoreMemoryAllocationLib: Extend to support MemoryProfileLibStar Zeng2016-07-019-29/+503
| | | | | | | 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: Implement new library instance SmmMemoryAllocationProfileLibStar Zeng2016-07-015-0/+1369
| | | | | | | 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>