summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg/Library/Acpi
AgeCommit message (Collapse)AuthorFilesLines
3 daysDynamicTablesPkg/AcpiFadtLib: Preserve platform flags on Arm and RISC-VHEADmasterDjordje Nedic2-2/+2
BuildFadtTable() adds platform-provided fixed-feature flags before calling FadtArchUpdate(). The Arm and RISC-V implementations assign Fadt->Flags, discarding the flags already added by the platform. Use bitwise OR assignment to add architecture defaults without overwriting the existing flags. Leave the generation order, validation masks, ACPI revision handling, and architecture defaults unchanged. Signed-off-by: Djordje Nedic <djordje.nedic@nextsilicon.com>
10 daysDynamicTablesPkg: Add ACPI ERST table generatorAmrathesh2-0/+552
Add a common Error Record Serialization Table (ERST) generator based on the ACPI 6.6 definition. Introduce an architecture-common Configuration Manager object to provide serialization instruction entries. Validate actions, instructions, flags, register masks, action grouping, and GOTO targets before generating the table. Signed-off-by: Amrathesh <amrathesh@arm.com>
11 daysDynamicTablesPkg: Add ACPI BERT table generatorAmrathesh2-0/+308
Add a common Boot Error Record Table (BERT) generator based on the ACPI 6.6 definition. Introduce an architecture-common Configuration Manager object that provides the boot error region address and length. Signed-off-by: Amrathesh <amrathesh@arm.com>
12 daysDynamicTablesPkg: Library: fix wrong iteration ITS affinity in SRATsecurity-advisory/cve-2026-92258/advisoryYeoreum Yun1-1/+2
For GicV5 ITS, it should be iterated with GicItsV5Info not GicItsInfo in SratGenerator. Fix wrong iteration. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
12 daysDynamicTablesPkg: Library: fix IWB node device index in IORT generatorYeoreum Yun3-8/+23
Up to 16 IWB devices can currently be created dynamically. However, the device name is derived from GicIwbId, which causes problems when GicIwbId is greater than 16. Use a separate index to generate the device name instead. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
13 daysDynamicTablesPkg: MadtGenerator: make GICD info as optionLevi Yun1-15/+32
GICD information is not a mandatory in the platform where use the GicV5 interrupt controller. Therefore, make GICD information as optional one. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
13 daysDynamicTablesPkg,MdePkg: generate IORT table for GICv5Sarah Walker5-31/+830
Generate GICv5 related information in IORT table. Continuous-integration-options: PatchCheck.ignore-multi-package Co-Developed-by: Yeoreum Yun <yeoreum.yun@arm.com> Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
13 daysDynamicTablesPkg,MdePkg: validate number of ItsGroupCount in IORTYeoreum Yun1-1/+12
Since the IORT specification version E.g[0], Number of ITS node (a.k.a ITS Group node) must be "1". To ensure compliance with the specification, add a sanity check for the number of ITS Group nodes. Link: https://developer.arm.com/documentation/den0049/latest [0] Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
13 daysDynamicTablesPkg: generate SRAT table for GICv5Sarah Walker2-20/+159
Generate GICv5 related information in SRAT table. Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
13 daysDynamicTablesPkg: generate MADT table for GICv5Sarah Walker1-34/+399
Generate GICv5 related information in MADT table. Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2026-09-10DynamicTablesPkg: Generalize the CMN SSDT generatorVarshit Pandya5-208/+309
Extend the CMN Configuration Manager object with an implementation type and optional root-node region length. Map the implementation type to the ACPI hardware IDs for CMN-600, CMN-650, CMN-700 and CMN-S3. Apply CMN-600-specific address restrictions only when the CMN-600 implementation type is selected. Rename the CMN-600 generator, identifiers and files to reflect support for multiple CMN implementations. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-09-09DynamicTablesPkg: Rename the DMC 620 PMU generatorVarshitPandya3-117/+117
Rename the DMC-620 PMU generator and its Configuration Manager objects to remove the DMC-620-specific naming. Update the generator ID, library paths, parser definitions and associated documentation to use generic DMC PMU terminology. Signed-off-by: Varshit Pandya <Varshit.Pandya@arm.com>
2026-08-31DynamicTablesPkg: Add ACPI MSCT table generatorAbdul Lateef Attar6-0/+1753
Add MSCT table ID to the ESTD_ACPI_TABLE_ID enumeration. Introduces an ACPI MSCT (Maximum System Characteristics Table) generator library that retrieves the following information from the configuration manager: - Maximum physical address - Processor proximity information - Memory proximity information - Clock proximity information The generator calculates: - Maximum memory length per memory domain - Maximum contiguous processor domain - Maximum memory and processor domain combination Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2026-08-27DynamicTablesPkg/AcpiEinjLib: Fix undefined shift for 64-bit masksVarshit Pandya1-1/+5
The EINJ generator validates that an instruction mask fits within the register region width by shifting the 64-bit mask by RegisterBitWidth. When RegisterBitWidth is 64, this shifts a UINT64 value by its full width, which is undefined behavior in C. A 64-bit mask always fits within a 64-bit register and does not require this check. Only perform the shift when RegisterBitWidth is less than 64, and reject widths greater than 64 because the EINJ Mask field is 64 bits. Signed-off-by: Varshit Pandya <Varshit.Pandya@arm.com>
2026-08-27DynamicTablesPkg/Acpi: Add LoongArch64 MADT generatorDongyan Qian2-0/+1119
Add a MADT generator for LoongArch64 Core, LIO, HT, EIO, MSI, BIO, and LPC interrupt controllers. Validate required objects, structure versions, identifiers, reserved flags, invalid physical CoreIds, address ranges, MSI vector ranges, and table size before writing the ACPI table. Support MADT revisions from ACPI 6.5, where the LoongArch64 interrupt controller structures were introduced, through ACPI 6.6. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2026-08-27DynamicTablesPkg: add APMT generatorYeoreum Yun2-0/+1094
Add Arm Performance Monitoring Unit Table (APMT) generator. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-07-31DynamicTablesPkg: Remove ACPI_AML_STA_PROC_SUPPORTEDPierre Gondois1-14/+1
Remove the ACPI_AML_STA_PROC_SUPPORTED macro to make use of the new MdePkg macro: ACPI_AML_STA_BASE_SUPPORTED. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-07-31DynamicTablesPkg: Add support for _STA in SSDT topology tablesPierre Gondois1-0/+98
Make use of the previously introduced StaToken field to generate a _STA method describing the status of a processor or processor container. staSupp Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2026-07-31DynamicTablesPkg: AcpiDbg2Lib: Adding host based instanceKun Qin1-0/+43
The current instance does not support host based test on AArch64 host system due to its dependency on hardware UART library. This change created a new instance that does not initialize the serial port for host based test applications. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-07-21DynamicTablesPkg/RiscV: Fix unused variables warningsSunil V L1-0/+5
Either use the variables or get rid of them. Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
2026-07-06DynamicTablesPkg: Add HMAT generator testsOleksandr Tymoshenko3-11/+754
- Add unit tests for HMAT generator. Co-authored-by: Ryan Heise <heiserya@google.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
2026-07-06DynamicTablesPkg: Add HMAT generatorOleksandr Tymoshenko2-0/+780
- Generate HMAT table from ConfigurationManager objects. Co-authored-by: Ryan Heise <heiserya@google.com> Co-authored-by: Sophia Wang <yodagump@google.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
2026-06-18EmbeddedPkg,MdeModulePkg,DynamicTablesPkg: Move ACPI helper macrosVarshitPandya2-13/+14
Move the ACPI table helper macros from EmbeddedPkg's AcpiLib.h to MdeModulePkg's AcpiHelperMacros.h. These macros describe ACPI data initializers and do not depend on the AcpiLib library interface. Keeping them in AcpiLib.h forces users that only need the macros to include the AcpiLib library header unnecessarily. Place the macros in a common MdeModulePkg public header so ACPI table producers can include the macro definitions directly without implying use of AcpiLib. The companion edk2-platforms change is: "Global: Include AcpiHelperMacros.h for ACPI helper macros" Tested: DynamicTablesPkg: X64/AARCH64 DEBUG/RELEASE/NOOPT MdeModulePkg: X64/AARCH64 DEBUG/RELEASE/NOOPT EmbeddedPkg: X64/AARCH64 DEBUG/RELEASE/NOOPT Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-05-27DynamicTablesPkg: Adds ACPI EINJ Table generation supportGlen Yeldho2-0/+421
Add an ACPI Error Injection (EINJ) table generator that uses the Configuration Manager to obtain the platform error-injection instruction entries. Ref: ACPI Specification, Section 18.6 (Error Injection—EINJ table). Co-authored-by: Varshit Pandya <varshit.pandya@arm.com> Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-04-30DynamicTablesPkg: add Hest table generatorYeoreum Yun3-0/+1991
Add ACPI Hardware Error Source Table (HEST) generator. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-04-28DynamicTablesPkg: AcpiIortLibArm: Support SMMUv3 revision 5Kun Qin1-2/+170
This change modified the SMMUv3 node logic to add a specific condition for revision 05 and a default branch for setting revision 5. It also adds a validity check for the IORT references when device ID valid bit is set in the flag. Co-authored-by: Ronny Hansen <Hansen.Ronny@microsoft.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-04-28DynamicTablesPkg: AcpiIortLibArm: Support IORT revision 6Ronny Hansen1-1/+1
This change updated the ACPI IORT generator’s supported revision from `EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05` to `EFI_ACPI_IO_REMAPPING_TABLE_REVISION_06`. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-02-24DynamicTablesPkg: Replace include guards with #pragma onceMichael Kubacki11-44/+11
Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-01-16DynamicTablesPkg: add SSDT DMC620 PMU table generatorSughosh Ganu3-0/+781
The Generic ACPI for Arm Components 1.2 Platform Design Document [1], section 2.6.1.2 "ASL reference code for the DMC620 PMU" provides information to describe the Arm Corelink DMC620 Dynamic Memory Controller's Performance Monitoring Unit (PMU) block using an ASL definition block table. Add support for a table generator for the DMC620 PMU block. The table generator uses the Configuration Manager protocol to obtain the following information. - Number of sockets on the platform - DMC620 devices per socket After obtaining the socket based topology, information is obtained on individual DMC620 devices. This includes - PMU register base address and length - Information on the associated PMU interrupt The table generator uses the Dynamic AML CodeGen API's for generating the table from the information obtained through the Configuration Manager protocol. [1] - https://developer.arm.com/documentation/den0093/1-2eac1/ Signed-off-by: Sughosh Ganu <sughosh.ganu@arm.com>
2025-12-02DynamicTablesPkg/RISC-V: Add AcpiSsdtPlicAplicLib librarySunil V L2-0/+471
Add AcpiSsdtPlicAplicLib to create PLIC and APLIC device entries in the RISC-V namespace. These interrupt controller devices are essential for accurate ACPI namespace representation on RISC-V platforms. This library facilitates SSDT generation for PLIC and APLIC, enabling proper OS discovery and configuration. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/Acpi: Add RHCT generator for RISC-VSunil V L3-0/+1287
Add a generator for the RISC-V Hart Capabilities Table (RHCT), a new ACPI table used to convey CPU feature information to the operating system. This generator enables firmware to describe RISC-V hart capabilities in a standardized way as part of the ACPI table set. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/Acpi: Add MADT generator for RISC-VSunil V L2-0/+810
Add a MADT (Multiple APIC Description Table) generator implementation for RISC-V. RISC-V platforms may use one or more of the following interrupt controllers: RINTC, IMSIC, PLIC, and APLIC. This generator constructs the appropriate MADT entries for the supported controllers and enables MADT generation for RISC-V platforms. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/AcpiSratLib: Add RISC-V supportSunil V L2-1/+204
Add support for generating the ACPI SRAT (System Resource Affinity Table) for RISC-V platforms. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/AcpiDbg2Lib: Add RISC-V supportSunil V L2-1/+63
Add support for generating the ACPI DBG2 (Debug Port Table) for RISC-V platforms. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/AcpiFadtLib: Add RISC-V supportSunil V L2-0/+61
Add support for generating the Fixed ACPI Description Table (FADT) for RISC-V platforms using the common FADT generator. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/AcpiSsdtCpuTopologyLib: Add RISC-V supportSunil V L2-0/+192
Add support for generating CPU topology information for RISC-V platforms based on RINTC structures. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-12-02DynamicTablesPkg/AcpiSsdtPcieLib: Restrict IRQ range check to ARM onlySunil V L1-0/+3
Modify the interrupt flags SPI range validation to apply only for ARM architectures. This check ensures that interrupt flags are valid SPIs, but it is ARM-specific and may cause false assertions on other architectures. By enabling this check exclusively for ARM, we avoid erroneous assertions on non-ARM platforms. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
2025-11-22DynamicTablesPkg: Fix always true conditionVarshit Pandya1-1/+1
In "if (RpInfo[Index].Sun != MAX_UINT64)", "RpInfo[Index].Sun" is UINT32 type. Which means it is never going to be equal to MAX_UINT64, so use "RpInfo[Index].Sun != MAX_UINT32" instead. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2025-10-23DynamicTablesPkg: PCIE SSDT Add root port devicesAbdul Lateef Attar1-0/+244
This change introduces support for root port devices and their corresponding _PRT (PCI Routing Table) entries in the PCIe SSDT. Updates the PCIe SSDT generator to detect and use the root port token. When available, the generator reads the configuration and creates device entries with appropriate _PRT tables. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-10-23DynamicTablesPkg: Enhance X64 PCIe SSDT _CRS generationAbdul Lateef Attar2-0/+78
X64 platforms supports WordIo and uncached PCIe resources. Hence, include WordIo and uncached PCIe resources in _CRS. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-09-26DynamicTablesPkg: Drop ARM32 SupportOliver Smith-Denny5-8/+8
edk2 is dropping support for the ARM32 architecture. This commit removes ARM32 code from DynamicTablesPkg. This also drops irrelevant VALID_ARCHITECTURES comments from infs that are not arch specific. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-22DynamicTablesPkg: Drop IA32 supportAbdul Lateef Attar6-10/+13
All DynamicTablesPkg libraries and drivers execute in the DXE phase, where both AMD and Intel platforms operate in X64 (64-bit) mode. Therefore, IA32 (32-bit) support is no longer required for DynamicTablesPkg. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-08-01DynamicTablesPkg: Add alias for EArchCommonObjPciConfigSpaceInfoAbdul Lateef Attar1-4/+23
Introduce EArchCommonObjMcfgPciConfigSpaceInfo as an alias for EArchCommonObjPciConfigSpaceInfo. The CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO object is utilized by both the MCFG and ACPI SSDT PCIE generators. Assigning a unique configuration object ID ensures the platform configuration driver supplies the correct data. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-29DynamicTablesPkg: add Tpm2DeviceTableLib to generate Tpm2 device tableLevi Yun2-49/+207
Introduce Tpm2DeviceTableLib to generate SSDT table which describes Tpm2 devices. This dynamic table generation is controlled by PcdGenTpm2DeviceTable which default value is FALSE. When it is TRUE, the TPM2 device ssdt table is generated when TPM2 ACPI table is generated. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-21DynamicTablesPkg: Implement X64-specific SsdtSerialPortFixupLibAbdul Lateef Attar2-0/+565
Introduce an X64-specific implementation of the SsdtSerialPortFixupLib library class. Utilizes the AML library to generate COM or serial device dynamically. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-06-24DynamicTablesPkg: Use Library/GoogleTestLib.hMichael D Kinney2-4/+0
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-19DynamicTablesPkg: Enhance SPCR support for interrupt and terminal typesAbdul Lateef Attar1-0/+247
Introduce optional configuration objects to specify interrupt and terminal types. When the platform supplies this information, the SPCR table is updated to reflect the provided values. If the interrupt type is 8259, the corresponding IRQ number is set in the SPCR table. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-06-16DynamicTablesPkg: Add SLIT table generator libraryabdattar2-0/+655
Introduce a common architecture SLIT table generator library that retrieves locality domain distance information from the configuration manager and generates the table accordingly. Signed-off-by: abdattar <AbdulLateef.Attar@amd.com>
2025-06-11DynamicTablesPkg: AcpiSratLib: Handle new ProximityDomainInfo CmObjPierre Gondois4-32/+144
Following the addition of the CM_ARCH_COMMON_PROXIMITY_DOMAIN_INFO object, rework the Srat Generator. A Warning message is issued when the Original ProximityDomain fields are used. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Check cluster's VALID bit based on SSDT Topology tablePierre Gondois5-14/+62
The ACPI specification v6.5, sTable 5.158: Processor Structure Flags states that: """ The processor container will have a matching ID value returned through the _UID method. As not every pro- cessor hierarchy node structure in PPTT may have a matching processor container, this flag indicates whether the ACPI pro- cessor ID points to valid entry. Where a valid entry is possible the ACPI Processor ID and _UID method are mandatory. """ And in: Table 5.157: Processor Hierarchy Node Structure """ If the processor structure rep- resents a group of associated processors, the structure might match a processor container in the name space. In that case this entry will match the value of the _UID method of the as- sociated processor container. Where there is a match it must be represented. The flags field, described in Processor Struc- ture Flags, includes a bit to describe whether the ACPI pro- cessor ID is valid. """ The DynamicTablesPkg currently creates a processor container: - in the SSDT CPU Topology generator, with the _HID=ACPI0010, and with a valid _UID - in the PPTT table for each CM_ARCH_COMMON_PROC_HIERARCHY_INFO structure. Thus: - all the processor containers should have the VALID bit set if the SSDT CPU Topology table is present. - if the SSDT CPU Topology table is present, but there is no PPTT table, then the state of the VALID bit is ignored. A contrario, an example where the VALID bit should not be set would be if: - the SSDT CPU Topology generator is absent - no processor container is created in the SSDT topology, i.e. if a flat hierarchy is created. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>