summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
Commit message (Collapse)AuthorAgeFilesLines
* DynamicTablesPkg: Apply uncrustify changesMichael Kubacki2021-12-071-33/+38
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the DynamicTablesPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Set the Access size for the SPCR tableJoey Gouly2021-04-191-1/+21
| | | | | | | | | | | | | | | | The SPCR table generator set the access size for the UART to DWORD (4 bytes) by default. However, according to Section B Generic UART, Arm Base System Architecture 1.0, Platform Design Document, a Generic UART can have BYTE, WORD or DWORD access sizes. To address this an AccessSize field has been introduced in CM_ARM_SERIAL_PORT_INFO object. This patch updates the SPCR generator to setup the AccessSize field in the Generic Address Structure (GAS) for the UART in the SPCR table with information provided by the platform. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add SSDT Serial port for SPCRPierre Gondois2020-08-131-61/+162
| | | | | | | | | | | | | | | | | | | | According to Arm Server Base Boot Requirements, Platform Design Document version 1.2 revision D, September 2, 2019, section '4.2.1.8 SPCR'; the SPCR console device must be included in the DSDT. The SSDT Serial port fixup library provides interfaces to generate a SSDT Serial port table based on the serial port information. Update the SPCR Generator to use the SSDT serial port fixup library to build a serial port definition block corresponding to the SPCR serial port and install the SSDT table. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
* DynamicTablesPkg: Fix issues reported by EDKII CISami Mujawar2020-08-071-3/+3
| | | | | | | | | | | | | | | | | The TianoCore EDKII project has introduced a Core CI infrastructure using TianoCore EDKII Tools PIP modules: * https://pypi.org/project/edk2-pytool-library/ * https://pypi.org/project/edk2-pytool-extensions/ More information on configuring the environment and running the builds can be found in edk2\.pytool\Readme.md This patch fixes the issues reported by the CI system mainly around fixing typo errors and package dec and dsc files. A subsequent patch enables the CI builds for the DynamicTablesPkg. 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 entry point param definitionSami Mujawar2020-03-291-4/+4
| | | | | | | | | | | | | | 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: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add OEM InfoSami Mujawar2019-03-201-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* Revert "DynamicTablesPkg: Add OEM Info"Sami Mujawar2019-02-261-1/+1
| | | | | | | | | | | | | 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>
* DynamicTablesPkg: Add OEM InfoSami Mujawar2019-02-251-1/+1
| | | | | | | | | 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/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 SPCR Table GeneratorSami Mujawar2019-02-191-0/+347
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>