summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phaseAlbecki, Mateusz2019-07-011-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1882 The new notify phase allows platform to configure additional bus parameters in addition to parameters that can already be configured with capability override. Specifically we allow to configure bus width, clock frequency and driver strength. If platform doesn't wish to configure some of the parameters it can left it on default values and driver will assume it's standard behavior with respect to those parameters. The definition of the SD_MMC_BUS_MODE has been extended to incorporate SD card default speed and high speed. Tests on Marvell boards were also performed by Marcin Wojtas <mw@semihalf.com>: https://edk2.groups.io/g/devel/message/42999 Board 1 (out of tree): SD - OK, MMC - OK Board 2: (Armada80x0McBin): SD - OK, MMC - OK Board 3: (Armada70x0Db): SD - problems, MMC - OK Please note that the problem on Armada70x0Db SD devices are introduced by adding new types of SD bus modes, a subsequent patch within edk2-platforms repository will be proposed to address it. (More details can be referred from the above link.) Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Regression-tested-by: Sumit Garg <sumit.garg@linaro.org>
* MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.Wei6 Xu2019-06-261-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://github.com/tianocore/tianocore.github.io/wiki/ UEFI-Capsule-on-Disk-Introducation CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in "OsIndications" Variable is enabled. It is used to indicate whether capsule on disk is provisioned in normal boot path. CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags, including "OsIndications" and "BootNext" variable. CoDRelocateCapsule() is to relocate the capsules from EFI system partition. Depends on PcdCapsuleInRamSupport, there are two solutions to relocate the capsule on disk images: When Capsule In Ram is supported, the Capsule On Disk images are relocated into memory, and call UpdateCapsule() service to deliver the capsules. When Capsule In Ram is not supported, the Capsule On Disk images are relocated into a temp file which will be stored in root directory on a platform specific storage device. CapsuleOnDiskLoadPei PEIM will retrieve the capsules from the relocation temp file and report capsule hobs for them. CoDRemoveTempFile() is to remove the relocation temp file in the next boot after capsules are processed. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add Capsule On Disk related definition.Wei6 Xu2019-06-261-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://github.com/tianocore/tianocore.github.io/wiki/ UEFI-Capsule-on-Disk-Introducation This patch will add Capsule On Disk related definition, including GUID, PPI and PCDs: The Capsule On Disk Name GUID indicates the capsule is to store Capsule On Disk file names. The Pei Capsule On Disk PPI provides service to retrieve capsules from Capsule On Disk temp relocation file on mass storage devices and create capsule hob for these capsules. Pei Boot In CapsuleOnDisk Mode Ppi indicates current boot mode is capsule on disk mode. PcdCapsuleOnDiskSupport is used to enable/disable Capsule On Disk. PcdCapsuleInRamSupport is used to enable/disable Capsule In Ram. PcdCoDRelocationFileName specifies the Capsule On Disk temp relocation file name. PcdCodRelocationDevPath specifies platform specific device to store Capsule On Disk temp relocation file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add definitions for NVM Express Passthru PPIChu, Maggie2019-06-241-0/+156
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1879 This commit will add the definitions of Nvm Express PassThru PPI. This PPI will provide services that allow NVM commands to be sent to NVM Express devices during PEI phase. More specifically, the PPI will provide services to: * Sends an NVM Express Command Packet to an NVM Express controller or namespace (by service 'PassThru'); * Get the list of the attached namespaces on a controller (by services 'GetNextNameSpace'); * Get the identification information (DevicePath) of the underlying NVM Express host controller (by service 'GetDevicePath'). Signed-off-by: Maggie Chu <maggie.chu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com>
* Revert "Capsule-on-Disk entire PatchZhang, Chao B2019-06-212-132/+1
| | | | | | | | | | | | | | | | This reverts commit 0d4aa276d1f6e0cb9d71a7fb88b30c416ba6d5a3, 6470a43160183cd48cad8901c912a48811f18b13, fd7286089542ee7a98cfea00be45ceb3561e0b20, 7837d1249807b4248079699097bc993254235d7a, 6b32af2e105f9b5454a55b581f2dc365c5eb6397, 8636f70b5a763ed1c03b292708f9c5543e531ea9, f17935321a5b818a66e999632ef371b374b98f0c due to incorrect review process. Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.Wei6 Xu2019-06-201-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule- on-Disk-Introducation CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in "OsIndications" Variable is enabled. It is used to indicate whether capsule on disk is provisioned in normal boot path. CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags, including "OsIndications" and "BootNext" variable. CoDRelocateCapsule() is to relocate the capsules from EFI system partition. Depends on PcdCapsuleInRamSupport, there are two solutions to relocate the capsule on disk images: When Capsule In Ram is supported, the Capsule On Disk images are relocated into memory, and call UpdateCapsule() service to deliver the capsules. When Capsule In Ram is not supported, the Capsule On Disk images are relocated into a temp file which will be stored in root directory on a platform specific storage device. CapsuleOnDiskLoadPei PEIM will retrieve the capsules from the relocation temp file and report capsule hobs for them. CoDRemoveTempFile() is to remove the relocation temp file in the next boot after capsules are processed. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* MdeModulePkg: Add Capsule On Disk related definition.Wei6 Xu2019-06-201-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule- on-Disk-Introducation This patch will add Capsule On Disk related definition, including GUID, PPI and PCDs: The Capsule On Disk Name GUID indicates the capsule is to store Capsule On Disk file names. The Pei Capsule On Disk PPI provides service to retrieve capsules from Capsule On Disk temp relocation file on mass storage devices and create capsule hob for these capsules. Pei Boot In CapsuleOnDisk Mode Ppi indicates current boot mode is capsule on disk mode. PcdCapsuleOnDiskSupport is used to enable/disable Capsule On Disk. PcdCapsuleInRamSupport is used to enable/disable Capsule In Ram. PcdCoDRelocationFileName specifies the Capsule On Disk temp relocation file name. PcdCodRelocationDevPath specifies platform specific device to store Capsule On Disk temp relocation file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
* MdeModulePkg: Introduce EDKII_SERIAL_PORT_LIB_VENDOR_GUIDAnthony PERARD2019-06-141-0/+19
| | | | | | | | | | | | | | | SERIAL_DXE_FILE_GUID is used in different places, create a single define that other can use. Also fix SerialDxe to actually use EDKII_SERIAL_PORT_LIB_VENDOR_GUID in the device path instead of the FILE_GUID. Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20190606131459.1464-2-anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkgLiming Gao2019-05-276-4017/+0
| | | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg/Library: Remove BaseUefiTianoCustomDecompressLibDandan Bi2019-05-151-22/+0
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722 Since we have merged this one into MdePkg, remove it now. Cc: Liming Gao <liming.gao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/ResetUtilityLib: Add a new API ResetSystemWithSubtypeBret Barkelew2019-04-281-4/+30
| | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1458 Add a new API ResetSystemWithSubtype's prototype declaration in header file. Also add the required data type header file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/ResetSystemLib.h: Change comments of ResetSystemZhichao Gao2019-04-281-3/+1
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific or not. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: introduce PE/COFF image emulator protocolArd Biesheuvel2019-04-141-0/+107
| | | | | | | | | Introduce a protocol that can be invoked by the image loading services to execute foreign architecture PE/COFF images via an emulator. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: Move BaseUefiTianoCustomDecompressLib toDandan Bi2019-04-101-0/+22
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1683 We will remove IntelFrameworkModulePkg, but BaseUefiTianoCustomDecompressLib may still need to be used. So move BaseUefiTianoCustomDecompressLib from IntelFrameworkModulePkg to MdeModulePkg. Cc: Liming Gao <liming.gao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-09155-1143/+155
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Add definitions for EDKII DEBUG PPIZhichao Gao2019-04-021-0/+82
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1549 Add a debug PPI for PEI phase. This PPI will provide basic services of debug. PEI debug lib instance can use these services to implement debug function to reduce the PEIMs which consume the debug lib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Rename confusion function nameChen A Chen2019-02-251-1/+2
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1536 To avoid the confusion caused by function name, rename EfiBootManagerGetNextFullDevicePath to EfiBootManagerGetNextLoadOptionDevicePath. As an API function should add EFIAPI prefix for this function. Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg: Add the new API ResetSystem in the head fileZhichao Gao2019-02-221-1/+27
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1460 Add the new API ResetSystem in the related head file so that the consumer can use it through the combination of library instance and head file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/SmmLockBoxLib: Support LockBox enlarge in UpdateLockBox()Hao Wu2019-02-221-2/+5
| | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 This commit will add the support to enlarge a LockBox when using the LockBoxLib API UpdateLockBox(). Please note that the new support will ONLY work for LockBox with attribute LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY set. The functional uni-test for the commit is available at: https://github.com/hwu25/edk2/tree/lockbox_unitest Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Add GUID for LockBox to save storage dev to init in S3Hao Wu2019-02-221-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 This commit will add the GUID definitions for LockBox which is used to save a list of storage devices that need to get initialized during the S3 resume. The content of the LockBox will be a DevicePath structure that contains zero or more DevicePath instances. Each instance denotes a storage device that needs to get initialized during the S3 resume. The producers of the content of this LockBox will be drivers like OpalPassword DXE driver. This kind of drivers requires some specific storage devices to be initialized during the PEI phase of in S3 resume. (For the OpalPassword case, it requires the managing devices to be automatically unlocked during the S3 resume). The attribute of the LockBox should be set to LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY. The consumers of the content of this LockBox will be PEI storage device controller/bus drivers (e.g. NvmExpressPei) during S3 resume. This kind of drivers can use the DevicePath instances stored in the LockBox to get a list of devices that need to get initialized. In such way, an on-demand (partial) device enumeration/initialization can be performed to benefit the S3 resume performance. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@Intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Add definitions for Storage Security Command PPIHao Wu2019-02-221-0/+283
| | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 This commit will add the definitions for Storage Security Command (SSC) PPI. This PPI will be be used to abstract mass storage devices to allow code running in the PEI phase to send security protocol commands to mass storage devices without specific knowledge of the type of device or controller that manages the device. More specifically, the PPI will provide services to: * Get the number of mass storage devices managed by a instance of the SSC PPI (by service 'GetNumberofDevices'); * Get the identification information (DevicePath) of a managing mass storage devices (by service 'GetDevicePath'); * Send security protocol commands to mass storage devices (by services 'ReceiveData' and 'SendData'). Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Add definitions for EDKII PEI ATA PassThru PPIHao Wu2019-02-221-0/+219
| | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 This commit will add the definitions for EDKII PEI ATA PassThru PPI. This PPI will provide services that allow ATA commands to be sent to ATA devices attached to an ATA controller in the PEI phase. More specifically, the PPI will provide services to: * Send ATA commands to an ATA device (by service 'PassThru'); * Get the list of the attached ATA device on a controller (by services 'GetNextPort' and 'GetNextDevice'); * Get the identification information (DevicePath) of the underlying ATA host controller (by service 'GetDevicePath'). Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Add definitions for ATA AHCI host controller PPIHao Wu2019-02-221-0/+89
| | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 This commit will add the definitions for ATA AHCI host controller PPI. The purpose of the PPI in to provide: * MMIO base address * Controller identification information (DevicePath) for ATA host controllers working under AHCI mode. Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/CapsuleApp: Add a function used to get next DevicePathChen A Chen2019-01-311-1/+20
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482 Add a new function to support Capsule-on-Disk feature. This function is used to get next full DevicePath from a load option. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequencyMarcin Wojtas2018-11-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some SdMmc host controllers are run by clocks with different frequency than it is reflected in Capabilities Register 1. It is allowed by SDHCI specification ver. 4.2 - if BaseClkFreq field value of the Capability Register 1 is zero, the clock frequency must be obtained via another method. Because the bitfield is only 8 bits wide, a maximum value that could be obtained from hardware is 255MHz. In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient to be used for setting the clock speed in SdMmcHcClockSupply function. This patch adds new UINT32 array ('BaseClkFreq[]') to SD_MMC_HC_PRIVATE_DATA structure for specifying the input clock speed for each slot of the host controller. All routines that are used for clock configuration are updated accordingly. This patch also adds new IN OUT BaseClockFreq field in the Capability callback of the SdMmcOverride, protocol which allows to update BaseClkFreq value. The patch reuses original commit from edk2-platforms: 20f6f144d3a8 ("Marvell/Drivers: XenonDxe: Allow overriding base clock frequency") Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverrideTomasz Michalec2018-11-201-0/+1
| | | | | | | | | | | | | Some SD Host Controlers need to do additional operations after clock frequency switch. This patch add new callback type to NotifyPhase of the SdMmcOverride protocol. It is called after SdMmcHcClockSupply. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocolTomasz Michalec2018-11-201-0/+17
| | | | | | | | | | | | | | | Some SD Host Controllers use different values in Host Control 2 Register to select UHS Mode. This patch adds a new UhsSignaling type routine to the NotifyPhase of the SdMmcOverride protocol. UHS signaling configuration is moved to a common, default routine (SdMmcHcUhsSignaling). After it is executed, the protocol producer can override the values if needed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhaseMarcin Wojtas2018-11-201-1/+3
| | | | | | | | | | | | | In order to ensure bigger flexibility in the NotifyPhase routine of the SdMmcOverride protocol, enable using an optional phase-specific data. This will allow to exchange more information between the protocol producer driver and SdMmcPciHcDxe in the newly added callbacks. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-061-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Remove trailing white spaceStar Zeng2018-09-061-1/+1
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1144 Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* MdeModulePkg/Network: Add 32bit subnet mask support for IP4 PXE boot.Fu Siyuan2018-09-031-2/+3
| | | | | | | | | | | | | This patch updates IP4 stack to support 32bit subnet mask in PXE boot process. When 32bit subnet mask is used, the IP4 driver couldn't use the subnet mask to determine whether destination IP address is on-link or not, so it will always try to send all the packets to the destination IP address directly first, if failed it will continue to try the default gateway. Contributed-under: TianoCore Contribution Agreement 1.1 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/PlatformBootManager: Add PlatformBootManagerUnableToBootRuiyu Ni2018-07-271-0/+13
| | | | | | | | | | | | | | The patch adds a new API PlatformBootManagerUnableToBoot() to PlatformBootManagerLib. The new API is provided by platform bds library and is called when no boot option could be launched. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
* MdeModulePkg/PerformanceMeasurement.h: Correct the licenseDandan Bi2018-07-131-22/+9
| | | | | | | | | | | Corrected to use the BSD license. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Dmitry Antipov <dmanti@microsoft.com>
* MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.Eric Dong2018-07-051-1/+1
| | | | | | | | | It is caused by change d1102dba7210b95e41d06c2338a22ba6af248645. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Clean up source filesLiming Gao2018-06-2891-1142/+1142
| | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Update performance library instancesBi, Dandan2018-06-261-6/+0
| | | | | | | | | | | | | | | Update the performance library instances in MdeModulePkg to implement the APIs used for new added Perf macros. V2: Share the common logics of creating FPDT record for new added Perf macros and existing Perf macros. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/ExtendedFirmwarePerf: Remove PerfId definitionsBi, Dandan2018-06-261-25/+0
| | | | | | | | | | | Remove the definitions of performance identifier since they have been added into PerformanceLib.h. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Add PERFORMANCE_MEASUREMENT_PROTOCOLBi, Dandan2018-06-261-0/+91
| | | | | | | | | | Add PerformanceMeasurement protocol to log performance info. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Add GUID for recovery capsule on NVM Express devicesHao Wu2018-06-251-0/+9
| | | | | | | | | Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Add definitions for EDKII PEI NVME host controller PPIHao Wu2018-06-251-0/+92
| | | | | | | | | | | | | | | | | | | | | | Introduces the below PPI: struct EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI { EDKII_NVM_EXPRESS_HC_GET_MMIO_BAR GetNvmeHcMmioBar; EDKII_NVM_EXPRESS_HC_GET_DEVICE_PATH GetNvmeHcDevicePath; }; The GetNvmeHcMmioBar service will provide the caller with the MMIO BAR address of each NVMe HC within the system; The GetNvmeHcDevicePath service will provide the caller with the device path information of each NVMe HC. Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: Add AtaAtapiPolicy protocol definitionRuiyu Ni2018-06-081-0/+59
| | | | | | | | | The patch adds AtaAtapiPolicy protocol which is produced by platform and consumed by AtaAtapiPassThruDxe driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Add DisplayUpdateProgressLib classMichael D Kinney2018-05-282-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=801 Based on content from the following branch/commits: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport Add the DisplayUpdateProgressLib class that is used to inform the user of progress during updates of firmware images in firmware devices. A platform specific instance of this library can be used to customize how the user is informed of progress. Add the EDK II Firmware Management Progress Protocol. This is an optional protocol that must be installed onto the same handle as a Firmware Management Protocol. This new protocol provides the color of a progress bar that allows different firmware devices to use different colors during a firmware update. It also provides a watchdog timer value in seconds that is armed each time the Progress() service passed into Firmware Management Protocol SetImage() is called. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/UefiBootManagerLib: fix AddLoadOptionVariable docs/prototypeRuiyu Ni2018-04-231-8/+18
| | | | | | | | | | | | | | | | | | | | | Clean up the leading comment and the prototype of EfiBootManagerAddLoadOptionVariable(): - the function may modify Option on output, annotate the parameter with OUT and update the documentation; - "@retval EFI_STATUS" and "@retval Others" are not idiomatic documentation, use @return instead; - sync comment and prototype between lib instance and lib class header. Change-Id: I8a609d6502b6f8929b2f568acaa147065003b6f4 Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg SmmMemoryAttribute.h: Refine some commentsStar Zeng2018-04-041-10/+7
| | | | | | | | | | | | | 1. Fix some "support" to "supported". 2. Fix some "set" to "clear" in ClearMemoryAttributes interface. 3. Remove redundant comments for GetMemoryAttributes interface. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Fix coding style issues in file/function commentsDandan Bi2018-03-191-1/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/PciHostBridgeLib.h: add address TranslationHeyi Guo2018-03-151-0/+19
| | | | | | | | | | | | | | | | | | | | Add Translation field to PCI_ROOT_BRIDGE_APERTURE. Translation is used to represent the difference between device address and host address, if they are not the same on some platforms. In UEFI 2.7, "Address Translation Offset" is "Offset to apply to the Starting address to convert it to a PCI address". This means: Translation = device address - host address So we also use the above calculation for this Translation field to keep consistent. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Signed-off-by: Yi Li <phoenix.liyi@huawei.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdeModulePkg PCD: Remove PCD_TYPE_SKU_ENABLED in PCD_TYPE_ALL_SETStar Zeng2018-03-131-1/+1
| | | | | | | | | | | | | Remove PCD_TYPE_SKU_ENABLED in PCD_TYPE_ALL_SET. This change was missing at e8d2a9805286a2fd4f613697cf0cccb4a1ebc90d. Cc: Liming Gao <liming.gao@intel.com> Cc: Thomas Lamprecht <t.lamprecht@proxmox.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg PCD: Remove unused PCD attribute PCD_TYPE_SKU_ENABLEDGao, Liming2018-03-131-2/+1
| | | | | | | | | PcdDb optimization has handled PCD DB for each SKU, not for single PCD. So, this PCD attribute is not used any more. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLYStar Zeng2018-03-081-3/+11
| | | | | | | | | | | | With this flag, the LockBox can be restored in S3 resume only. The LockBox can not be restored after SmmReadyToLock in normal boot and after EndOfS3Resume in S3 resume. It can not be set together with LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg: Add S3SmmInitDone definitionStar Zeng2018-03-031-0/+27
| | | | | | | | | | | | Add gEdkiiS3SmmInitDoneGuid, after S3 SMM initialization is done and before S3 boot script is executed, this GUID is installed as PPI in PEI and protocol in SMM environment. It allows for PEIMs or SMM drivers to hook this point and do the required tasks. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>