summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Guid
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Define the VarCheckPolicyLib and SMM interfaceBret Barkelew2020-11-171-0/+54
| | | | | | | | | | | | | | | | | | | 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/Core: Create Migrated FV Info Hob for calculating hash ↵Guomin Jiang2020-07-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | (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/VariableSmmRuntimeDxe: switch to MM communicate 2Ard Biesheuvel2020-05-121-3/+3
| | | | | | | | | Switch to the new MM communicate 2 protocol which supports both traditional and standalone MM. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdeModulePkg/Variable: Add RT GetVariable() cache supportMichael Kubacki2019-11-051-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* NetworkPkg: Move network related header files from MdeModulePkg to NetworkPkgLiming Gao2019-10-083-63/+0
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2196 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg: Extend the support keyboard type of Terminal consoleZhichao Gao2019-09-241-0/+17
| | | | | | | | | | | | | | | | | | 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: 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>
* 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: 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-0955-390/+55
| | | | | | | | | | | | | | | | | | | | | 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 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: 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/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-2837-238/+238
| | | | | | | | | | 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 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: 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>
* MdeModulePkg/RecoveryDevice.h: Remove semicolon after GUID definitionsHao Wu2018-02-241-5/+5
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=877 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: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/Performance.h: Remove the useless definitionDandan Bi2018-02-121-26/+1
| | | | | | | | | | Remove the definitions related to old perf codes. Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> 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:Add definitions for new Performance infrastructureGao, Liming2018-02-082-1/+303
| | | | | | | | | | | | V3: Add "FPDT_" prefix for related definitions. Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Update PCD driver to support the optimized PcdDataBaseLiming Gao2017-12-251-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=546 BaseTools will generate the optimized PCD database to save the image size at build time for multiple SKUs. The optimized PCD database layout will be like below, the PCD database will be composed of the full default SKU data (PCD_DATABASE_INIT) and the non-default SKU delta data(PCD_DATABASE_SKU_DELTA). PCD driver will build HOB to store the full default SKU data, and patch HOB data based on non-default SKU delta data for the SKU set by SetSku(), it can save memory resource at boot time. // // PCD database layout: // +---------------------------------+ // | PCD_DATABASE_INIT (DEFAULT SKU) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU A) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU B) | // +---------------------------------+ // | ...... | // +---------------------------------+ // BaseTools, PCD database and driver updates are needed for this proposal. For single SKU (default) case, this proposal is expected to have no impact. For multi-SKU case, PCD database format will be changed. So, PcdDataBase Version is also updated from 6 to 7. 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: Enable Firmware to retrieve the default settingLiming Gao2017-12-251-0/+69
| | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=611 Add two PCDs and new PCD DB format definition 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: Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuidStar Zeng2017-12-121-0/+26
| | | | | | | | | | | | | | | Rename SmmEndOfS3ResumeProtocolGuid to EndOfS3ResumeGuid as the GUID may be used to install PPI in future to notify PEI phase code. The references in UefiCpuPkg are also being updated. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.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> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESSZhang, Chao B2017-11-011-2/+7
| | | | | | | | | | | | | | Mark EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS as deprecated. 1. Make SetVariable/QueryVariableInfo return EFI_UNSUPPORTED with this attribute 2. No change to GetVariable/GetNextVariableName Also update several function descriptors accordingly Cc: Long Qin <qin.long@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
* MdeModulePkg: Add GUID/flags to implement BitField supportDandan Bi2017-09-211-1/+19
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=545 Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 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 SmiHandlerProfile: Use fixed data type in data structureStar Zeng2017-05-241-20/+21
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=568 Use fixed data type in data structure and make the structure be natural aligned. Without this update, the code must assume DXE and SMM are using same data type (same size of UINTN), but it may be not true at some case, for example, after standalone SMM feature is enabled. With this update, the data structure will be phase independent and convenient for consumer to parse the data. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg: move PlatformHasAcpiGuid from EmbeddedPkgArd Biesheuvel2017-04-051-0/+35
| | | | | | | | | | | | Given the agreement on the edk2-devel regarding the fact that the notion whether or not a 'platform has ACPI' is a universal one, move the PlatformHasAcpi GUID to MdeModulePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: "Zeng, Star" <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* MdeModulePkg/SmiHandlerProfile: Add Context support in UnregisterJiewen Yao2017-03-131-1/+40
| | | | | | | | | | | | | | | | | The reason is that we observe that a platform may use same Handler for different context. In order to support Unregister such handler, we have to input context information as well. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add performance property configuration tableStar Zeng2017-02-231-1/+11
| | | | | | | | | | | | | | | | | Define PERFORMANCE_PROPERTY, and install performance property configuration table in DxeCorePerformanceLib and SmmCorePerformanceLib. Cc: Andrew Fish <afish@apple.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Cinnamon Shia <cinnamon.shia@hpe.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/include: Add SmiHandlerProfile header file.Jiewen Yao2017-02-221-0/+177
| | | | | | | | | | | | | | | | This header file defines: 1) An SMI handler profile protocol. So that SmmChildDispatch module can register the hardware SMI handler information. 2) The SMI handler profile communication buffer. So that a shell application can use SMM communication to get the SMI handler profile info. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg: introduce non-discoverable device protocolArd Biesheuvel2016-12-071-0/+58
| | | | | | | | | | | Introduce a protocol that can be exposed by a platform for devices that are not discoverable, usually because they are wired straight to the memory bus rather than to an enumerable bus like PCI or USB. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Tested-by: Marcin Wojtas <mw@semihalf.com>
* MdeModulePkg/Include: Add PiSmmMemoryAttributesTable.hJiewen Yao2016-11-171-0/+51
| | | | | | | | | | | | | | | | | | | | | This table describes the SMM memory attributes. The new GUID gEdkiiPiSmmMemoryAttributesTableGuid and its associated structure are based on the EFI_MEMORY_ATTRIBUTES_TABLE and GUID from the UEFI Specification. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> [lersek@redhat.com: update commit message as requested by Michael Kinney] Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg PCD: Update PCD database structure definition to match BaseToolsStar Zeng2016-09-201-7/+7
| | | | | | | | | | | | | | | | | | | | To follow PI1.4a, BaseTools has be updated to fix artificial limitation of SkuId range. This patch is to update PCD database structure definition to match BaseTools. Note: The source code and BaseTools need to be upgraded at the same time, and if they are not upgraded at the same time, build error like below will be triggered to help user identify the problem. "Please make sure the version of PCD PEIM Service and the generated PCD PEI Database match." Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg 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>
* MdeModulePkg: Extend memory profile definitions for memory leak detectionStar Zeng2016-07-011-9/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current memory profile feature: 1. Shows which line of code calls gBS->AllocateXXX(). But most entries are from MemoryAllocationLib. 2. Records at the start. 3. Records all modules. Enhanced memory profile feature: 1. User can know which line of code calls AllocateXXX() API instead of gBS->Allocate(). 2. User can know which line of code calls a specific API that will call AllocateXXX(). 3. User can know total memory allocated by a specific line of code. 4. User can configure to record single module. 5. User can configure when to enable recording. 6. User can know RVA<->Symbol (Function, Source, Line). For the enhanced memory profile feature, 1. Extend MEMORY_PROFILE_DRIVER_INFO to include PdbString. 2. Extend MEMORY_PROFILE_ALLOC_INFO to include ActionString. 3. Extend MEMORY_PROFILE_ACTION to indicate action in memory allocation lib and user defined action. 4. Extend memory profile protocol to include GetRecordingState/ SetRecordingState/Record. 5. Define SMM memory profile protocol. 6. Extend PcdMemoryProfilePropertyMask to support disable recording at the start. 7. Introduce new PCD PcdMemoryProfileDriverPath to control which drivers need memory profile data. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table.Cinnamon Shia2016-06-291-5/+25
| | | | | | | | | | | Let data of DXE memory status code can be used by other modules. 1. Save the address of DXE memory status code table to DxeConfigurationTable. 2. Save the address of SMM memory status code table to SmmConfigurationTable. 3. Move RUNTIME_MEMORY_STATUSCODE_HEADER to its public header file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg-FPDT(1): Add SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET ↵Liming Gao2016-04-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | definition. This patch enhance performance data SMM communication by using fixed SMM communication buffer. A new command SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET is added, because we need to support get partial PerformanceData to fixed SMM communication buffer. If performance data is bigger than fixed SMM communication buffer, the DXE agent need to call SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET multiple times to get all data out. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> 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-MemoryProfile(1): Add ↵Star Zeng2016-04-291-5/+22
| | | | | | | | | | | | | | | | | | | | | | | SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET definition. This patch enhance SMM memory profile SMM communication by using fixed SMM communication buffer. A new command SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET is added, because we need to support get partial ProfileData to fixed SMM communication buffer. If profile data is bigger than fixed SMM communication buffer, the DXE agent need to call SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET multiple times to get all data out. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add EDKII_PI_SMM_COMMUNICATION_REGION_TABLE definition.Jiewen Yao2016-04-291-0/+63
| | | | | | | | | | | | | | | | This configuration table is used to describe platform pre-allocated memory for SMM communication buffer. If DXE driver wants to communicate with SMM agent, it can use this memory as SMM communication buffer instead of allocate new memory region. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add RamDiskDxe driver implementationHao Wu2016-02-291-0/+25
| | | | | | | | | | | | | The RamDiskDxe driver will: 1. Produce the EFI RAM Disk Protocol 2. Install RAM disk device path and block I/O related protocols on the RAM disk device handle. 3. Install RAM disk configuration form to HII database Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Add BS+RT+AT variable attribute definitionChao Zhang2016-02-021-1/+2
| | | | | | | | | | | Add BS+RT+AT variable attribute definition. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19785 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Refine the code comments in UiAppDandan Bi2015-08-041-1/+0
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18151 6f19259b-4bc3-4df7-8a09-765794883524
* UiApp code split from IntelFrameworkModulePkg/Universal/BdsDxe driver.Eric Dong2015-07-301-0/+29
| | | | | | | | | | This is the UI part of the old BdsDxe driver, also remove the legacy boot option related code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18111 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove Ip4ConfigDxe and related guid definitionJiaxin Wu2015-07-102-95/+0
| | | | | | | | | | | | | | | | | | | | | Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)). Dependent network drivers, libraries and applications have been migrated to (or extended to) the new protocol version. For example: git 7c25b7ea (SVN r17869): ping & ifconfig git 00a6ad1b (SVN r17870): UefiHandleParsingLib git 6c5c70d6 (SVN r17873): DxeNetLib git 39561686 (SVN r17874): IpSecDxe git c581e503 (SVN r17875): EfiSocketLib This patch is based on related packages(MdeModulePkg, Nt32Pkg, ArmPlatformPkg, ArmVirtPkg, EmulatorPkg, OvmfPkg, Vlv2TbltDevicePkg) clean-up work finished. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17917 6f19259b-4bc3-4df7-8a09-765794883524
* Add "TtyTerm" terminal type to TerminalDxeRoy Franz2015-07-091-0/+25
| | | | | | | | | | | | | | | This patch a adds new terminal type, TtyTerm, to TerminalDxe. This terminal type provides a place to add support for various *nix terminals that don't behave like standard VT terminals. The goal is to 'just work' with as many terminals as possible, rather than properly emulating any one specific terminal. Signed-off-by: Roy Franz <roy.franz@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17895 6f19259b-4bc3-4df7-8a09-765794883524