summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/MdeModulePkg.dec
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Change default value of PcdPcieResizableBarSupport to FALSELuo, Heng2021-01-141-1/+1
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3138 Change default value of PcdPcieResizableBarSupport to FALSE, avoid it impacts existing platforms. Cc: Ray Ni <ray.ni@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Heng Luo <heng.luo@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg/Bus/Pci/PciBusDxe: Support PCIe Resizable BAR CapabilityLuo, Heng2021-01-041-1/+7
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=313 Add PcdPcieResizableBarSupport to enable/disable PCIe Resizable BAR Capability fearture. Program the Resizable BAR Register if the device suports PCIe Resizable BAR Capability and PcdPcieResizableBarSupport is TRUE. Cc: Ray Ni <ray.ni@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Heng Luo <heng.luo@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg/Core/Dxe: limit FwVol encapsulation section recursionLaszlo Ersek2020-11-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DXE Core sets up a protocol notify function in its entry point, for instances of the Firmware Volume Block2 Protocol: DxeMain() [DxeMain/DxeMain.c] FwVolDriverInit() [FwVol/FwVol.c] Assume that a 3rd party UEFI driver or application installs an FVB instance, with crafted contents. The notification function runs: NotifyFwVolBlock() [FwVol/FwVol.c] installing an instance of the Firmware Volume 2 Protocol on the handle. (Alternatively, assume that a 3rd party application calls gDS->ProcessFirmwareVolume(), which may also produce a Firmware Volume 2 Protocol instance.) The EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() member performs "a depth-first, left-to-right search algorithm through all sections found in the specified file" (quoting the PI spec), as follows: FvReadFileSection() [FwVol/FwVolRead.c] GetSection() [SectionExtraction/CoreSectionExtraction.c] FindChildNode() [SectionExtraction/CoreSectionExtraction.c] FindChildNode() // recursive call FindChildNode() is called recursively for encapsulation sections. Currently this recursion is not limited. Introduce a new PCD (fixed-at-build, or patchable-in-module), and make FindChildNode() track the section nesting depth against that PCD. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1743 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201119105340.16225-3-lersek@redhat.com>
* MdeModulePkg: Define the VarCheckPolicyLib and SMM interfaceBret Barkelew2020-11-171-0/+4
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2522 VariablePolicy is an updated interface to replace VarLock and VarCheckProtocol. This is an instance of a VarCheckLib that is backed by the VariablePolicyLib business logic. It also publishes the SMM calling interface for messages from the DXE protocol. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bret Barkelew <brbarkel@microsoft.com> Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Define the VariablePolicyHelperLibBret Barkelew2020-11-171-0/+5
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2522 VariablePolicy is an updated interface to replace VarLock and VarCheckProtocol. Add the VariablePolicyHelperLib library, containing several functions to help with the repetitive process of creating a correctly structured and packed VariablePolicy entry. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bret Barkelew <brbarkel@microsoft.com> Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Define the VariablePolicyLibBret Barkelew2020-11-171-0/+3
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2522 VariablePolicy is an updated interface to replace VarLock and VarCheckProtocol. Add the VariablePolicyLib library that implements the portable business logic for the VariablePolicy engine. Also add host-based CI test cases for the lib. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bret Barkelew <brbarkel@microsoft.com> Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Define the VariablePolicy protocol interfaceBret Barkelew2020-11-171-1/+13
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2522 VariablePolicy is an updated interface to replace VarLock and VarCheckProtocol. Add the VariablePolicy protocol interface header and add to the MdeModulePkg.dec file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bret Barkelew <brbarkel@microsoft.com> Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Create PCDs to be used in support of SEV-ESTom Lendacky2020-08-161-0/+9
| | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under OVMF: - PcdGhcbBase: UINT64 value that is the base address of the GHCB allocation. - PcdGhcbSize: UINT64 value that is the size, in bytes, of the GHCB allocation (size is dependent on the number of APs). Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash ↵Guomin Jiang2020-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | (CVE-2019-11098) REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 When we allocate pool to save the rebased PEIMs, the address will change randomly, therefore the hash will change and result PCR0 change as well. To avoid this, we save the raw PEIMs and use it to calculate hash. The MigratedFvInfo HOB will never produce when PcdMigrateTemporaryRamFirmwareVolumes is FALSE, because the PCD control the total feature. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Debkumar De <debkumar.de@intel.com> Cc: Harry Han <harry.han@intel.com> Cc: Catharine West <catharine.west@intel.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Add new PCD to control the evacuate temporary memory feature ↵Guomin Jiang2020-07-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (CVE-2019-11098) REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 The security researcher found that we can get control after NEM disable. The reason is that the flash content reside in NEM at startup and the code will get the content from flash directly after disable NEM. To avoid this vulnerability, the feature will copy the PEIMs from temporary memory to permanent memory and only execute the code in permanent memory. The vulnerability is exist in physical platform and haven't report in virtual platform, so the virtual can disable the feature currently. When enable the PcdMigrateTemporaryRamFirmwareVolumes, always shadow all PEIMs no matter the condition of PcdShadowPeimOnBoot or PcdShadowPeimOnS3Boot. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg.dec: Change PCDs for status code.Tan, Ming2020-06-181-13/+13
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786 In order to support enable/disable report status code through memory or serial dynamic, change the following PCDs from [PcdsFeatureFlag] to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]: PcdStatusCodeUseSerial PcdStatusCodeUseMemory The original plaforms can use PcdsFixedAtBuild in .dsc files to save size. Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Ming Tan <ming.tan@intel.com>
* MdeModulePkg: PcdAcpiExposedTableVersions default for Arm64 platformsSamer El-Haj-Mahmoud2020-04-211-0/+3
| | | | | | | | | | | | | | | Set the default value of PcdAcpiExposedTableVersions for Aarch64 platforms to 0x20. Previously, the default was set to 0x3E for all platforms. The new value removes ACPI 1.0b compatability, which forces the use of XSDT 64-bit pointer, as required by Arm SBBR specification. This also resolves an error reported by acpiview command, as seen on the RPi (see https://github.com/pftf/RPi4/issues/25). Signed-off-by: Samer El-Haj-Mahmoud <samer@elhajmahmoud.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/BrotliCustomDecompressLib: Make brotli a submoduleShenglei Zhang2020-04-161-0/+2
| | | | | | | | | | | | | | Use submodule way to access brotli in MdeModulePkg based on brotli version 666c3280cc11dc433c303d79a83d4ffbdd12cc8d. The newly added BrotliDecUefiSupport.h/.c are used by directory 'brotli'. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2559 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: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: disable properties table generation but retain the codeArd Biesheuvel2020-04-071-24/+0
| | | | | | | | | | | | | | | This is the minimal change required to stop exposing the EFI properties table, which is deprecated. Given how the implementation is entangled with the code that exposes the related memory attributes table, most of the code is retained, and further cleanups are relegated to subsequent patches. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2633 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Remove gEfiFormBrowserExProtocolGuid Protocol GuidGuoMinJ2020-03-301-1/+0
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2145 Replace the gEfiFormBrowserExProtocolGuid with gEdkiiFormBrowserExProtocolGuid, remove the unnecessary declaration. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/Capsule: Remove RT restriction in UpdateCapsule service.Siyuan Fu2020-02-071-1/+7
| | | | | | | | | | | | | | | | | | Current UpdateCapsule service will reject all non-reset capsule images and return EFI_OUT_OF_RESOURCE if the system is at runtime. This will block a platform CapsuleLib from implementing ProcessCapsuleImage() with runtime capsule processing capability. This patch removes this restriction. The change is controled by a feature PCD PcdSupportProcessCapsuleAtRuntime, and the default value is FALSE which means not enable this feature. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2501 Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg: Add EDK2 Platform Boot Manager ProtocolAshish Singhal2020-01-081-0/+4
| | | | | | | | | Add edk2 platform boot manager protocol which would have platform specific refreshes to the auto enumerated as well as NV boot options for the platform. Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg/dec: add PcdTcgPfpMeasurementRevision PCDJiewen Yao2020-01-061-0/+8
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2439 This PCD is to control the TCG PFP spec revision. The PFP 105 added new event type to support NIST SP800-155, and deprecated old event type. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg/dec: Add EdkiiDeviceSecurityProtocolGuid.Jiewen Yao2019-11-111-0/+5
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2303 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Yun Lou <yun.lou@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed by: Ray Ni <ray.ni@intel.com>
* MdeModulePkg: Enable variable runtime cache by defaultMichael Kubacki2019-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | This change enables the variable runtime cache by default by setting gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache in MdeModulePkg.dec to TRUE. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/Variable: Add RT GetVariable() cache supportMichael Kubacki2019-11-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2220 This change reduces SMIs for GetVariable () by maintaining a UEFI variable cache in Runtime DXE in addition to the pre- existing cache in SMRAM. When the Runtime Service GetVariable() is invoked, a Runtime DXE cache is used instead of triggering an SMI to VariableSmm. This can improve overall system performance by servicing variable read requests without rendezvousing all cores into SMM. The runtime cache can be disabled with by setting the FeaturePCD gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache to FALSE. If the PCD is set to FALSE, the runtime cache will not be used and an SMI will be triggered for Runtime Service GetVariable () and GetNextVariableName () invocations. The following are important points regarding the behavior of the variable drivers when the variable runtime cache is enabled. 1. All of the non-volatile storage contents are loaded into the cache upon driver load. This one time load operation from storage is preferred as opposed to building the cache on demand. An on- demand cache would require a fallback SMI to load data into the cache as variables are requested. 2. SetVariable () requests will continue to always trigger an SMI. This occurs regardless of whether the variable is volatile or non-volatile. 3. Both volatile and non-volatile variables are cached in a runtime buffer. As is the case in the current EDK II variable driver, they continue to be cached in separate buffers. 4. The cache in Runtime DXE and SMM are intended to be exact copies of one another. All SMM variable accesses only return data from the SMM cache. The runtime caches are only updated after the variable I/O operation is successful in SMM. The runtime caches are only updated from SMM. 5. Synchronization mechanisms are in place to ensure the runtime cache content integrity with the SMM cache. These may result in updates to runtime cache that are the same in content but different in offset and size from updates to the SMM cache. When using SMM variables with runtime cache enabled, two caches will now be present. 1. "Runtime Cache" - Maintained in VariableSmmRuntimeDxe. Used to service Runtime Services GetVariable () and GetNextVariableName () callers. 2. "SMM Cache" - Maintained in VariableSmm to service SMM GetVariable () and GetNextVariableName () callers. a. This cache is retained so SMM modules do not operate on data outside SMRAM. Because a race condition can occur if an SMI occurs during the execution of runtime code reading from the runtime cache, a runtime cache read lock is introduced that explicitly moves pending updates from SMM to the runtime cache if an SMM update occurs while the runtime cache is locked. Note that it is not expected a Runtime services call will interrupt SMM processing since all CPU cores rendezvous in SMM. It is possible to view UEFI variable read and write statistics by setting the gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics FeaturePcd to TRUE and using the VariableInfo UEFI application in MdeModulePkg to dump variable statistics to the console. By doing so, a user can view the number of GetVariable () hits from the Runtime DXE variable driver (Runtime Cache hits) and the SMM variable driver (SMM Cache hits). SMM Cache hits for GetVariable () will occur when SMM modules invoke GetVariable (). Cc: Dandan Bi <dandan.bi@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg: Update to support SmBios 3.3.0Abner Chang2019-10-171-2/+2
| | | | | | | | | | | | | | This commit update the revision of SMBIOS spec reported in PCDs. Bugzilla link, https://bugzilla.tianocore.org/show_bug.cgi?id=2202 Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Gilbert Chen <gilbert.chen@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Remove PCD gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSizeLiming Gao2019-10-081-6/+0
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 This PCD has been moved to NetworkPkg.dec file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Remove network related guid definitions from MdeModulePkg.decLiming Gao2019-10-081-10/+0
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2196 Network related guid definitions have been moved into NetworkPkg.dec. So, they can be removed from MdeModulePkg.dec. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Extend the support keyboard type of Terminal consoleZhichao Gao2019-09-241-0/+4
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2186 A common terminal console software Putty support various types of keyboard type, such as normal mode, Linux mode, Xterm R6, Vt400, VT100+ and SCO. Refer to the link: https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter4.html#config-funkeys Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Remove PcdRealTimeClockUpdateTimeoutRay Ni2019-09-041-4/+0
| | | | | | | | | | The PCD is moved to PcAtChipsetPkg so remove it from MdeModulePkg. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com>
* MdeModulePkg/MdeModulePkg.dec: Remove gEfiDpcProtocolGuidShenglei Zhang2019-08-151-3/+0
| | | | | | | | | | | Since the transfer has been finished in previous patches, gEfiDpcProtocolGuid can be removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1949 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add definition of the EDKII_UFS_HC_PLATFORM_PROTOCOLAlbecki, Mateusz2019-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1343 EDKII_UFS_HC_PLATFORM_PROTOCOL will allow the platform to inject platform specific logic into standard UFS flows. Right now we support callbacks pre and post host controller enable and pre and post link startup. Provided callbacks allow the platform driver to inject UIC programming after HCE is set which is a standard initialization step covered by UFS specification as well as cover some additional use cases during other callbacks. For instance platform driver may switch to fast mode after link startup. We also allow the platform to override host controller capabilities and version which might be useful to manage silicon bugs or allow testing experimental features from new versions of the specification. Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/DxeIpl: Introduce PCD PcdUse5LevelPageTableNi, Ray2019-08-091-0/+7
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2008 The PCD indicates if 5-Level Paging will be enabled in long mode. 5-Level Paging will not be enabled when the PCD is TRUE but CPU doesn't support 5-Level Paging. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg: Remove RecoveryLib.h and PeiRecoveryLibNullZhang, Shenglei2019-08-051-5/+0
| | | | | | | | | | | | RecoveryLib.h and PeiRecoveryLibNull have been deprecated from 2009, so remove them. https://bugzilla.tianocore.org/show_bug.cgi?id=1299 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Remove S3Lib.h and PeiS3LibNullZhang, Shenglei2019-08-051-5/+0
| | | | | | | | | | | S3Lib.h and PeiS3LibNull have been deprecated since 2009, so remove them. https://bugzilla.tianocore.org/show_bug.cgi?id=1299 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add a pcd to set the OS indications bitBret Barkelew2019-07-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1678 Add a pcd PcdPlatformRecoverySupport to conditionally set an OS indications bit and set the 'PlatformRecovery####' variable. This pcd would also control whether the BDS support platform recovery or not. Update the uni file to add the prompt and help string base on the description in dec 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: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: Add Capsule On Disk related definition.Wei6 Xu2019-06-261-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | 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-211-48/+0
| | | | | | | | | | | | | | | | 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 related definition.Wei6 Xu2019-06-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | 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>
* MdeModulePkg: Remove network library header file from package DEC fileLiming Gao2019-05-271-23/+0
| | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/Library: Remove BaseUefiTianoCustomDecompressLibDandan Bi2019-05-151-4/+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: Remove PcdFrameworkCompatibilitySupportDandan Bi2019-05-091-8/+0
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 Currently Framework compatibility support is not needed and PcdFrameworkCompatibilitySupport will be removed from edk2. So remove the usage of this PCD firstly. Cc: Liming Gao <liming.gao@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: BaseSerialPortLib16550: Add Mmio32 supportTien Hock, Loh2019-04-291-0/+7
| | | | | | | | | Some buses doesn't allow 8 bit MMIO read/write, this adds support for 32 bits read/write Signed-off-by: "Tien Hock, Loh" <tien.hock.loh@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg: introduce PE/COFF image emulator protocolArd Biesheuvel2019-04-141-0/+4
| | | | | | | | | 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/+4
| | | | | | | | | | | | | | | | 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-091-7/+1
| | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | 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: Add GUID for LockBox to save storage dev to init in S3Hao Wu2019-02-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | 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: Refine description a little for PcdEmuVariableNvStoreReservedStar Zeng2019-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | This patch is not related directly to REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323 Merge EmuVariable and Real variable driver. PcdEmuVariableNvStoreReserved actually defines the base address of reserved memory range. This patch refines description a little for PcdEmuVariableNvStoreReserved. Suggested-by: Jian J Wang <jian.j.wang@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: Star Zeng <star.zeng@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Tested-by: Julien Grall <julien.grall@arm.com> Acked-by: Julien Grall <julien.grall@arm.com>