summaryrefslogtreecommitdiff
path: root/MdePkg
AgeCommit message (Collapse)AuthorFilesLines
2025-09-09MdePkg: Add the COHERENCY_SFW_NO CPUID bit fieldTom Lendacky1-2/+7
Update the CPUID 0x8000001F EBX definition to add the COHERENCY_SFW_NO bit field. The COHERENCY_SFW_NO bit is used to indicate that the SEV-SNP cache coherency mitigation is not needed. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
2025-09-09MdePkg/IndustryStandard: Define enums for DSP0134 SMBIOS Spec v3.9.0Giri Mudusuru1-5/+28
Add new enums for Type3 Chassis & Type17 Memory Signed-off-by: Giri Mudusuru <girimudusuru@microsoft.com>
2025-09-09MdePkg: Add MockSpiNorFlashProtocolPaddyDeng1-0/+113
Add MockSpiNorFlashProtocol for google test components to use. Signed-off-by: PaddyDeng <paddydeng@ami.com>
2025-09-08Global: fix ArmFfaLibRun() caller couldn't get ret-argsLevi Yun1-2/+4
When ArmFfaLibDirectMsgReq(2) is preempted, caller of these functions should resume it works via ArmFfaLibRun() and the secure partition will be return with FFA_DIRECT_MSG_RESP(2) with return arguments. However, since ArmFfaLibRun() gets its return in its stack variable, So caller of ArmFfaLibRun() doesn't get the return arguments from secure partition. To resolve this, add output parameter to ArmFfaLibRun() to receive return arguments. Continuous-integration-options: PatchCheck.ignore-multi-package Fixes: 5d1b38dd07c4 ("ArmPkg: Add ArmFfaLib used in Dxe driver") Reported-by: Mariam Elshakfy <Mariam.Elshakfy@arm.com> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-09-05MdePkg/Inclde: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUIDGowtham M2-14/+0
EFI_UNICODE_COLLATION_PROTOCOL_GUID is deprecated in the previous commit. Hence, removing related guid definition. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg/Include: Deprecate EFI_DEVICE_IO_PROTOCOLGowtham M2-265/+0
EFI_DEVICE_IO_PROTOCOL is deprecated in the previous commit. Hence, removing related header file and guid definition. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg/Include: Deprecate UNICODE_COLLATION_INTERFACEGowtham M1-5/+0
Remove UNICODE_COLLATION_INTERFACE typedef since unused and removed from UEFI 2.10A and 2.11 specifications. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg/Include: Deprecate EFI_NVDIMM_LABEL_FLAGS_UPDATINGGowtham M1-5/+0
The EFI_NVDIMM_LABEL_FLAGS_UPDATING flag is used in UEFI to indicate that an update was in progress across multiple Label Storage Areas (LSAs) on NVDIMM devices. Its purpose was to help ensure atomicity in the event of interruptions like power loss or system crashes. It is deprecated in UEFI 2.10 and 2.11, as label index blocks and checksums now provide better atomicity and consistency without requiring this flag. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg/Include: Deprecate EFI_NVDIMM_LABEL_FLAGS_RESERVEDGowtham M1-6/+0
EFI_NVDIMM_LABEL_FLAGS_RESERVED is a reserved bit in the NVDIMM label flags field, intended for future use. It was removed in UEFI 2.10A and 2.11 as it had no defined function and was unused in implementations. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg/Include: Deprecate EFI_IP4_CONFIG_PROTOCOLGowtham M2-179/+0
EFI_IP4_CONFIG_PROTOCOL is deprecated in the previous commit. Hence, removing related header file and guid definition. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-09-05MdePkg: Add support for PCIe Extended IDsNanjinmoorthyj1-0/+42
Add PTM (001F) structure in MdePkg. Signed-off-by: Nanjinmoorthy <nanjinmoorthyj@ami.com>
2025-09-05MdePkg: Enable CompilerIntrinsicsLib for LoongArchChao Li2-0/+12
When arrays are lager enough, LoongArch compilers(such as GCC or Clang) will replace some libc functions to improve performace, which may cause building failures. Enabling this library can link edk2's own libc functions and fix this problem. Signed-off-by: Chao Li <lichao@loongson.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
2025-09-04MdePkg/Nvme.h: Add Power Loss Signaling definationHunter Chang1-3/+34
Add Nvme 2.1 spec update, specifically for Power Loss Signaling. 1. Update field in Identify Controller Data for Power Loss Signaling Information. 2. Add Power Loss Signaling Mode defination. 3. Add Power Loss Signaling feature identifer defination. Signed-off-by: Hunter Chang <hunter.chang@intel.com>
2025-09-03MdePkg/ArmFfaMemMgmtLib: Fix typo in structure definition and commentsVishal Oliyil Kunnil1-3/+3
Fix typo in FFA_ENDPOINT_MEMORY_ACCESS_DESCRIPTOR member and comments. Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2025-09-02MdePkg/IndustryStandard: Add MRDIMM into Smbios.hNing Feng1-2/+4
Added the MRDIMM (0x08) entry to the MemoryDeviceMemoryTechnologyTable in Smbios.h. This enables proper display and decoding of MRDIMM memory technology in SMBIOS Type 17 structures. Signed-off-by: Ning Feng <ning.feng@intel.com>
2025-09-02MdePkg/Library/BaseRngLib/Riscv: use CPU RNG instructions onlyAdriano Cordova1-92/+3
Generate random number using risc-v CPU RNG instructions only, as for the other architectures. This is safer than using Mersenne Twister from a seed, which is the current implementation, as the latter is known to be cryptographically unsafe (e.g. see https://www.schutzwerk.com/en/blog/attacking-a-rng/) Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
2025-09-02MdePkg: Correct comments for ResolutionY and ResolutionZ in SimplePointer.hYang Gang1-2/+2
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2025-08-26MdePkg/BaseFdtLib: Remove unused macros and string APIsThamballi Sreelalitha1-20/+11
Removed legacy macros and string helper APIs that are no longer used in the BaseFdtLib implementation. Specifically: - Dropped strcmp macro that incorrectly expected 3 arguments but ignored the third parameter. - Cleaned up other unused macros and redundant string APIs. These changes align with the current upstream libfdt module and reduce dead code. Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
2025-08-12MdePkg, EmbeddedPkg: Move Fdt Table Guid to MdePkgPrachotan Bathi2-0/+21
Move Fdt Table Guid from EmbeddedPkg to MdePkg to avoid unnecessary dependencies on EmbeddedPkg for packages like ShellPkg. This change may affect modules dependent on EmbeddedPkg but not on MdePkg, which is unlikely. Also, per 8c721d6, MdePkg has a more refined implementation of Fdt as compared to the EmbeddedPkg which was the initial implementation. Not moving gFdtVariableGuid since it'll be moved to platform code. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-08-07MdePkg: added mocks for DevicePathLib and OpenProtocolAlexander Gryanko6-3/+282
Added Google Mock test support for DevicePathLib. Added OpenProtocol and CloseProtocol for UefiBootServicesTableLib mock library. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-06MdePkg/Library: Remove MM_STANDALONE LibraryClass in UefiDevicePathLib.infGowtham M1-1/+1
UefiDevicePathLib.inf consumes Boot Services in MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c - DevicePathFromHandle(). And so cannot be used by MM_STANDALONE drivers. Instead, MM_STANDALONE drivers can use UefiDevicePathLibBase.inf as the DevicePathLib of choice. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-08-06MdePkg/Library: Remove UefiDevicePathLibStandaloneMm.infGowtham M2-79/+0
The file UefiDevicePathLibStandaloneMm.inf was reintroduced in [#3187] to give downstream platforms time to transition to UefiDevicePathLibBase.inf As nearly three years have passed since that change, and downstream consumers have had sufficient time to migrate, this library can now be safely removed. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-07-21MdePkg/Acpi50: Add revision macro for Serial Bus UART structureAbdul Lateef Attar1-0/+34
The Serial Bus UART structure was introduced in ACPI 5.0. This patch defines a revision macro for this structure and also adds type specific flag macros. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-21MdePkg: Acpi66: Update FADT and MADT versionsSunil V L1-2/+2
According to the recently released ACPI 6.6 specification, the minor version of the Fixed ACPI Description Table (FADT) should be updated to revision 6, and the Multiple APIC Description Table (MADT) should use revision 7. Update the macros to reflect this. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-07-21MdePkg: Acpi66: Add newly defined RISC-V affinity structureSunil V L1-0/+15
ACPI 6.6 defines new affinity structure for RISC-V Intc. Add their definitions. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-07-21MdePkg: Acpi66: Add RISC-V MADT and RHCT structuresSunil V L1-0/+165
ACPI 6.6 introduced new MADT structures for RISC-V and a new static table RHCT. Add the definitions for these new structures. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-07-15MdePkg: RISC-V: Add PeiServicesTablePointerLibTuan Phan4-0/+126
Based on PI 1.9, the PEI service pointer will be stored in the scratch register. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-15MdePkg: RISC-V: Remove firmware context APIsTuan Phan2-117/+0
Eliminate the APIs using the scratch register as PI 1.9 specifies it for the PEI service table pointer. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-15MdePkg/BaseCpuLib: Add FPU initialization support for RISC-VTuan Phan3-2/+25
Enable RISC-V support for the InitializeFloatingPointUnits function. Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
2025-07-15MdePkg: Include: Add defines for AA64PFR2 system registerSarah Walker2-6/+19
The AA64PFR2 system register is required to detect GICv5 support. Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-07-14MdePkg: Add DEBUG_SECURITY Bit in PcdDebugPrintErrorLevelOliver Smith-Denny2-1/+4
Tcg2Dxe and its libraries are currently the noisiest modules in edk2. For a sample platform printing at INFO level, Tcg2Dxe printed 4,000 lines out of 5,700 total lines printed. This commit defines a DEBUG_SECURITY bit to control the debug output of Tcg2Dxe and other security related components. Most of the output is not useful except for deep debugging of TPM transactions, so it is appropriate to only print when the DEBUG_SECURITY bit is present. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-08MdePkg, EmbeddedPkg: Moved definition of Fdt Guid to MdePkgAkshay Behl2-0/+23
MdePkg has a more refined implementation of Fdt as compared to the EmbeddedPkg which was the initial implementation, hence moving the Fdt Guid from EmbeddedPkg to MdePkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
2025-07-08MdePkg: Remove UGA supportGuoMinJ8-462/+0
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-04MdePkg: Correct spelling errors and typosAbdul Lateef Attar2-2/+5
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-06-26MdePkg: ArmFfaMemMgmtLib: Introduce FF-A memory protocol libraryKun Qin6-0/+1263
This change introduced a library interface that implements the FF-A memory protocol v1.3 ALP1: https://developer.arm.com/documentation/den0140/f Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-26MdePkg, MdeModulePkg: ArmFfaLib: Expose FFA_ARGS and ArmCallFfaKun Qin1-0/+36
FFA is a framework that supports various protocols built on top. i.e. memory protocol, which is nothing that can be done through existing interfaces. Instead of requiring protocol authors to check conduit PCD in every implementation, exposing the ArmCallFfa is a unified way to allow other protocols to leverage FFA interfaces. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-25MdePkg: Add ACPI 5.1 table definition for WAETDionna Glaze1-0/+19
This is a struct needed for virtualizing Windows. https://uefi.org/acpi entry for WAET links to https://learn.microsoft.com/en-us/previous-versions/gg487524(v=msdn.10) which describes the 32-bit flags field with bits 0 and 1 defined. Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2025-06-24MdePkg: Use Library/GoogleTestLib.hMichael D Kinney5-5/+5
Update unit tests to use GoogleTestLib.h instead of gtest.h so the edk2 extensions for google tests are always available. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-06-20MdePkg/Acpi66.h: Add ACPI 6.6 headerCeping Sun2-1/+3364
Create Acpi66.h, which is copied from Acpi65.h, and make the following changes: 1. Replace all occurences of "6.5/6_5" with "6.6/6_6". 2. Add "ResetVector" in Multiprocessor Wakeup Structure. 3. Add "Test" command for Multiprocessor Wakeup Mailbox. 4. Make Acpi66.h the latest ACPI definitions that Acpi.h contains. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2025-06-12MdePkg: Fix EFI_SUCCESS typosGao Qihang1-2/+2
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-11MdePkg: Fix definition typosDongyan Qian7-8/+8
`defintion`->`definition` Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-05MdePkg: BaseLib: Add UUID-GUID conversion functionKun Qin3-0/+217
With interactions between Standalone MM partitions and normal UEFI environment, there is constant need to convert UUID to GUID and back. This change added 2 new interfaces to BaseLib that support such usage. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-05-30MdePkg/BaseFdtLib: fix declaration/definition misalignmentLeif Lindholm1-1/+1
Commit e25331fc4591 ("MdePkg,UefiPayloadPkg: clean up BaseFdtLib API confusion"), missed out aligning the wrapper for fdt_node_offset_by_property_value between heade and implementation. Fix this by updating the header to declare FdtNodeOffsetByPropValue instead of FdtNodeOffsetByPropertyValue. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-05-30MdePkg/BaseFdtLib: add a few new function wrappersLeif Lindholm2-0/+77
Add FdtSetPropString(), FdtDelNode() and FdtGetPath(). Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-05-28MdePkg/IndustryStandard: update Tpm2Acpi table to revision 5levi.yun1-3/+30
Tpm2AcpiTable revision 5 adds new START_METHOD with Arm FF-A transfer. add related information and update its generator. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-05-28MdePkg: Added MockHiiDatabase protocolBhavani Subramanian1-0/+162
Signed-off-by: Bhavani Subramanian <v-bhavanisu@microsoft.com>
2025-05-28MdePkg/IndustryStandard: add CRB Cap value in TpmPtp.hLevi Yun1-0/+34
add some value macro used for discerning CRB capabilties Links: https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/ Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-05-26MdePkg: Add comment describing address parameter in PciSegmentLibVarshitPandya3-0/+36
MdePkg/Include/Library/PciSegmentLib.h includes address parameter definition, add the same comment here for explaining the INVALID_PCI_SEGMENT_ADDRESS flag. Signed-off-by: VarshitPandya <varshit.pandya@arm.com>
2025-04-30MdePkg/IndustryStandard: fix PASID supported bitAbhishek Mainkar1-2/+8
Fix #define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_SUPPORTED from BIT1 to BIT0 based on IO Remapping Table Platform Design Document Issue E.f Add macros for minimum and maximum PASID capabilites for PCI root complex node. Signed-off-by: Abhishek Mainkar <abmainkar@nvidia.com>
2025-04-30MdePkg/BaseFdtLib: add FdtGetPropertyW wrapperLeif Lindholm2-0/+45
Add wrapper for fdt_get_property_w. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>