summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library
Commit message (Collapse)AuthorAgeFilesLines
...
* DynamicTablesPkg: Fix Proc node length assignmentSami Mujawar2020-03-291-3/+4
| | | | | | | | | | | | | | | | | | The length field for the Processor Hierarchy node structure is 8-bit wide while the number of private resource field is 32-bit wide. Therefore, the GetProcHierarchyNodeSize() returns the size as a 32-bit value. The VS2017 compiler reports 'warning C4244: '=': conversion from 'UINT32' to 'UINT8', possible loss of data' while assigning the length field of the Processor Hierarchy node structure. To fix this, a type cast is added. In addition, there is a check to ensure that the Processor Hierarchy node size does not exceed MAX_UINT8. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
* DynamicTablesPkg: Fix serial port subtype warningSami Mujawar2020-03-291-1/+14
| | | | | | | | | | | | | | | | | | | | | | | The VS2017 compiler reports 'warning C4244: '=': conversion from 'UINT16' to 'UINT8', possible loss of data' for the SPCR InterfaceType field assignment. The SPCR InterfaceType field uses the same encoding as that of the DBG2 table Port Subtype field. However SPCR.InterfaceType is 8-bit while the Port Subtype field in DBG2 table is 16-bit. Since the Configuration Manager represents the Serial port information using the struct CM_ARM_SERIAL_PORT_INFO, the PortSubtype member in this struct is 16-bit. To fix the warning an explicit type case is added. A validation is also added to ensure that the Serial Port Subtype value provided by the Configuration Manager is within the 8-bit range (less than 256). Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* DynamicTablesPkg: Fix missing local header warningSami Mujawar2020-03-292-1/+3
| | | | | | | | | | | | The edk2 BaseTools report a warning if a local header file is not listed under the [Sources] section in the INF file. Add header files to the [Sources] section in the respective INF files to fix the warnings. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* DynamicTablesPkg: Fix entry point param definitionSami Mujawar2020-03-299-36/+36
| | | | | | | | | | | | | | VS2017 reports 'warning C4028: formal parameter 2 different from declaration' for the library constructor and destructor interfaces for the Generator modules. VS2017 compiler also reports similar warnings for the DXE entry points. Remove the CONST qualifier for the SystemTable pointer (the second parameter to the constructor/destructor/DXE Entry point) to make it compatible with the formal declaration. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
* DynamicTablesPkg: Update FADT generator to ACPI 6.3Sami Mujawar2020-03-261-51/+51
| | | | | | | Update FADT table generator to support ACPI revision 6.3 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
* DynamicTablesPkg: Arm SRAT Table GeneratorSami Mujawar2019-10-212-0/+864
| | | | | | | | | | | | | | | | | | | | | | | | | | The SRAT generator uses the configuration manager protocol to obtain the affinity information for the GICC, GIC ITS, Memory, Generic Initiator, etc. and generates the SRAT table. The table generator supports ACPI 6.3, SRAT table revision 3. The ACPI and PCI device handles of the Generic Initiator Affinity structures are represented using tokens. The generator invokes the configuration manager protocol interfaces and requests for objects referenced by tokens to get the device handle information. The Configuration Manager object definition for the GICC has been updated to include the Proximity Domain, Clock Domain and associated flag information. Similarly the Configuration Manager object for the GIC ITS has been updated to include the Proximity Domain information. These changes should not impact any existing implementations as the new fields have been added towards the end of the Configuration Manager Objects. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
* DynamicTablesPkg: GTDT updates for ACPI 6.3Pierre Gondois2019-06-111-30/+38
| | | | | | | | | | The ACPI 6.3 specification adds support for describing ARMv8.1 EL2 virtual timers. Update GTDT Generator to extend this support. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add dynamic PPTT table generation supportKrzysztof Koch2019-06-113-0/+1747
| | | | | | | | | | | | | | | | | The PPTT generator uses the configuration manager protocol to obtain information about platform's processor topology and caches. This data is then used to generate the PPTT table. The table generator supports ACPI 6.3, PPTT table revision 2. The dynamic PPTT generator also carries out extensive input validation which includes cycle detection and MADT-PPTT cross-validation. A number of architectural compliance checks are also performed. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add ACPI 6.3 SPE support to MADT generatorKrzysztof Koch2019-06-101-46/+59
| | | | | | | | | | | | | The Dynamic Tables Framework now supports generating Multiple APIC Description Table (MADT) revision 5 for ARM platforms while maintaining backward-compatibility with ACPI 6.2. The relevant change is the enablement of the Statistical Profiling Extension (SPE). Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Test for duplicate GT Block frame numbersKrzysztof Koch2019-06-101-2/+64
| | | | | | | | | Check for duplicate frame numbers when populating the GT Block Timer Frames inside the GTDT table generator. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Test for duplicate UIDs in MADT generatorKrzysztof Koch2019-06-101-7/+83
| | | | | | | | | Check for duplicate ACPI Processor UIDs when populating the GIC CPU (GICC) Interface structures inside the MADT table generator. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add code for finding duplicate values in arraysKrzysztof Koch2019-06-101-0/+64
| | | | | | | | | | | | Added generic function for detecting duplicate values in an array. Also defined a function prototype to test if two objects are equal. The prototype is used as an argument to the 'FindDuplicateValues' function. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add frame number validation to GTDT generatorKrzysztof Koch2019-06-101-0/+9
| | | | | | | | | | | | Added code to check if the Generic Timer Block Structure's frame number provided by the platform repository is within the allowed range (0-7). References: - ACPI 6.2 Errata A, Table 5-122, September 2017 Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0919-133/+19
| | | | | | | | | | | | | | | | | | | | 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: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Remove GIC Distributor Id fieldSami Mujawar2019-03-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was originally merged in edk2 master at d3a15f435f9716aa2f2ea5e9b35fcda04f267ab4. However, this was later reverted at 82c4426a176c271d24915b403b267a431bdc52f5 as it was merged during the Soft Feature Freeze for edk2-stable201903. Resubmitting this patch as the edk2 merge window is now open. According to ACPI 6.2 Specification - Errata A, 'One, and only one, GIC distributor structure must be present in the MADT for an ARM based system'. Therefore, the GIC Distributor ID field in the ACPI MADT GICD substructure can be set to zero and there is no need for the Configuration Manager to provide this information. Update the CM_ARM_GICD_INFO structure to remove the GicId field. Similarly update the MADT Generator to set the GicId field in the GICD substructure to zero. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: DGB2: Update DBG2_DEBUG_PORT_DDISami Mujawar2019-03-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | This patch was originally merged in edk2 master at 6814256083a90ef218e7ae240e51922045175df1. However, this was later reverted at db8382ef5e44bd07654fb4726b77f3c329210561 as it was merged during the Soft Feature Freeze for edk2-stable201903. Resubmitting this patch as the edk2 merge window is now open. The DBG2_DEBUG_PORT_DDI() macro supports adding only one Generic Base Address Register. Therefore, removed the superfluous parameter NumReg and updated the macro to use DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS which has a value 1. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Add OEM InfoSami Mujawar2019-03-208-14/+26
| | | | | | | | | | | | | | | | | | | This patch originally merged in edk2 master at c788bdaba47536447ae37518a96d92e0da54aad7. However, this was later reverted at bdbbedea949eb4b10d24110c0e559b03c7a6bce4 as it was merged during the Soft Feature Freeze for edk2-stable201903. Resubmitting this patch as the edk2 merge window is now open. Added option for OEMs to provide OEM Table ID and OEM Revision for ACPI tables. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Rename enum used for ID MappingSami Mujawar2019-03-201-3/+3
| | | | | | | | | | | | | | | | | | | This patch was originally merged in edk2 master at 1d49a75367ef6827b8b8f77f61e9ce245d1bdee3. However, this was later reverted at 334111b0dab80394aeb1ebb8f0f3314847e2dc1f as it was merged during the Soft Feature Freeze for edk2-stable201903. Resubmitting this patch as the edk2 merge window is now open. Renamed the enum EArmObjIdMapping to EArmObjIdMappingArray and updated the IORT generator accordingly. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: correct LibraryClass dependencies for Arm/DBG2Leif Lindholm2019-03-191-1/+1
| | | | | | | | | This patch changes the stated dependency in AcpiDbg2LibArm.inf from currently listed SerialPortLib to actually required PL011UartLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* Revert "DynamicTablesPkg: Rename enum used for ID Mapping"Sami Mujawar2019-02-261-3/+3
| | | | | | | | | | | | | This reverts commit 1d49a75367ef6827b8b8f77f61e9ce245d1bdee3. Reverting this patch as Soft Feature Freeze for edk2-stable201903 started on 22 Feb 2019. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* Revert "DynamicTablesPkg: Add OEM Info"Sami Mujawar2019-02-268-26/+14
| | | | | | | | | | | | | This reverts commit c788bdaba47536447ae37518a96d92e0da54aad7. Reverting this patch as Soft Feature Freeze for edk2-stable201903 started on 22 Feb 2019. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* Revert "DynamicTablesPkg: DGB2: Update DBG2_DEBUG_PORT_DDI"Sami Mujawar2019-02-261-1/+4
| | | | | | | | | | | | | This reverts commit 6814256083a90ef218e7ae240e51922045175df1. Reverting this patch as Soft Feature Freeze for edk2-stable201903 started on 22 Feb 2019. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* Revert "DynamicTablesPkg: Remove GIC Distributor Id field"Sami Mujawar2019-02-261-3/+1
| | | | | | | | | | | | | This reverts commit d3a15f435f9716aa2f2ea5e9b35fcda04f267ab4. Reverting this patch as Soft Feature Freeze for edk2-stable201903 started on 22 Feb 2019. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Alexei Fedorov <alexei.fedorov@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Remove GIC Distributor Id fieldSami Mujawar2019-02-251-1/+3
| | | | | | | | | | | | | | | | | According to ACPI 6.2 Specification - Errata A, 'One, and only one, GIC distributor structure must be present in the MADT for an ARM based system'. Therefore, the GIC Distributor ID field in the ACPI MADT GICD substructure can be set to zero and there is no need for the Configuration Manager to provide this information. Update the CM_ARM_GICD_INFO structure to remove the GicId field. Similarly update the MADT Generator to set the GicId field in the GICD substructure to zero. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: DGB2: Update DBG2_DEBUG_PORT_DDISami Mujawar2019-02-251-4/+1
| | | | | | | | | | | | The DBG2_DEBUG_PORT_DDI() macro supports adding only one Generic Base Address Register. Therefore, removed the superfluous parameter NumReg and updated the macro to use DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS which has a value 1. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Add OEM InfoSami Mujawar2019-02-258-14/+26
| | | | | | | | | Added option for OEMs to provide OEM Table ID and OEM Revision for ACPI tables. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Rename enum used for ID MappingSami Mujawar2019-02-251-3/+3
| | | | | | | | | Renamed the enum EArmObjIdMapping to EArmObjIdMappingArray and updated the IORT generator accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg/AcpiSpcrLibArm: Support 16550 UART.Ashish Singhal2019-02-251-0/+2
| | | | | | | | | | Add support for 16550 UART to ACPI SPCR table as it is a supported UART type by HLOS. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm IORT Table GeneratorSami Mujawar2019-02-193-0/+2173
| | | | | | | | | | | | | | | | | | | | | | The IORT generator uses the configuration manager protocol to obtain information about the PCI Root Complex, SMMU, GIC ITS, Performance Monitoring counters etc. and generates the IORT table. The mappings between the components are represented using tokens. The generator invokes the configuration manager protocol interfaces and requests for objects referenced by tokens to establish the link. This table data is then used by the Table Manager to install the IORT table. The Table Manager then invokes the generator interface to free any resources allocated by the IORT table generator. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm PCI MCFG Table GeneratorSami Mujawar2019-02-192-0/+412
| | | | | | | | | | | | | | | | The MCFG generator uses the configuration manager protocol to obtain the PCI Configuration space information from the platform configuration manager and builds the MCFG table. This table data is then used by the Table Manager to install the MCFG table. The Table Manager then invokes the generator interface to free any resources allocated by the MCFG table generator. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm DBG2 Table GeneratorSami Mujawar2019-02-192-0/+511
| | | | | | | | | | | | The DBG2 generator uses the configuration manager protocol to obtain the debug serial port information from the platform configuration manager. It then updates a template DBG2 table structure. This table data is used by the Table Manager to install the DBG2 table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm SPCR Table GeneratorSami Mujawar2019-02-192-0/+389
| | | | | | | | | | | The SPCR generator uses the configuration manager protocol to obtain the serial port information from the platform configuration manager. It then updates a template SPCR table structure. This table data is used by the Table Manager to install the SPCR table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm ACPI GTDT GeneratorSami Mujawar2019-02-192-0/+742
| | | | | | | | | | | | | | | The GTDT generator uses the configuration manager protocol to obtain information about the architectural and platform timers available on the platform and generates the ACPI GTDT table. This table data is then used by the Table Manager to install the GTDT table. The Table Manager then invokes the generator interface to free any resources allocated by the GTDT table generator. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm ACPI MADT GeneratorSami Mujawar2019-02-192-0/+787
| | | | | | | | | | | | | | The MADT generator uses the configuration manager protocol to obtain information about the Arm interrupt controllers (GICC, GICD, etc.) and generates the ACPI MADT table. This table data is then used by the Table Manager to install the MADT table. The Table Manager then invokes the generator interface to free any resources allocated by the MADT table generator. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm ACPI FADT GeneratorSami Mujawar2019-02-192-0/+731
| | | | | | | | | | | | The FADT generator collates the relevant information required for generating a FADT table from configuration manager using the configuration manager protocol. It then updates a template FADT table structure. This table data is used by the Table Manager to install the FADT table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Arm Raw/DSDT/SSDT GeneratorSami Mujawar2019-02-192-0/+192
| | | | | | | | | | | | A Raw generator is a simple generator. This generator provides the ability to install a binary blob (that contains ACPI table data) as an ACPI table. The binary blob could be pre-generated ACPI table data or it may be the pre-compiled output from an iAsl compiler for a DSDT or SSDT table. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
* DynamicTablesPkg: Table Helper LibrarySami Mujawar2019-02-192-0/+212
A helper library that implements common functionality for use by table generators. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>