summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/DynamicTablesPkg.dec
Commit message (Collapse)AuthorAgeFilesLines
* DynamicTablesPkg: Add PcdDevelopmentPlatformRelaxations PcdPierre Gondois2024-01-291-0/+4
| | | | | | | | | | | | Some development platforms might not be compliant on some points of some specifications. In order to have a generic code accurately checking against specifications while still allowing some relaxation on specific points for the platforms that desire it, add a Pcd acting as a bitfield to warn instead of returning an error in case of non-compliance. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add DynamicTablesScmiInfoLibPierre Gondois2024-01-291-0/+4
| | | | | | | | | | | | | The SCP holds some power information that could be advertised through the _CPC object. The communication with the SCP is done through SCMI protocols (c.f. ArmScmiDxe). Use the SCMI protocols to query information and feed it to the DynamicTablesPkg. Acked-by: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Add SMBIOS String table helper librarySami Mujawar2023-03-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Section 6.1.3, SMBIOS specification version 3.6.0 describes the handling of test strings in SMBIOS tables. Text strings are added at the end of the formatted portion of the SMBIOS structure and are referenced by index in the SMBIOS structure. Therefore, introduce a SmbiosStringTableLib to simplify the publishing of the string set. SmbiosStringTableLib introduces a concept of string table which records the references to the SMBIOS strings as they are added and returns an string reference which is then assigned to the string field in the formatted portion of the SMBIOS structure. Once all strings are added, the library provides an interface to get the required size for the string set. This allows sufficient memory to be allocated for the SMBIOS table. The library also provides an interface to publish the string set in accordance with the SMBIOS specification. Example: EFI_STATUS BuildSmbiosType17Table () { STRING_TABLE StrTable; UINT8 DevLocatorRef; UINT8 BankLocatorRef; SMBIOS_TABLE_TYPE17 *SmbiosRecord; CHAR8 *StringSet; ... // Initialize string table for 7 strings StringTableInitialize (&StrTable, 7); StringTableAddString (&StrTable, "SIMM 3", &DevLocatorRef); StringTableAddString (&StrTable, "Bank 0", &BankLocatorRef); ... SmbiosRecord = AllocateZeroPool ( sizeof (SMBIOS_TABLE_TYPE17) + StringTableGetStringSetSize (&StrTable) ); ... SmbiosRecord->DeviceLocator = DevLocatorRef; SmbiosRecord->BankLocator = BankLocatorRef; ... // get the string set area StringSet = (CHAR8*)(SmbiosRecord + 1); // publish the string set StringTablePublishStringSet ( &StrTable, StringSet, StringTableGetStringSetSize (&StrTable) ); // free string table StringTableFree (&StrTable); return EFI_SUCCESS; } Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Ashish Singhal <ashishsingha@nvidia.com> Cc: Nick Ramirez <nramirez@nvidia.com> Cc: William Watson <wwatson@nvidia.com> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
* DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UIDJeff Brasen2022-09-151-0/+3
| | | | | | | | | | | Add support for selecting to use index or segment number as UID and name. This allows the path of the nodes to be well known. For example, if the PCIe node needs to be notified from by an interrupt for a Generic Event Device Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: AcpiSsdtPcieLibArm: Create support libraryJeff Brasen2022-07-191-0/+3
| | | | | | | | | | Add support library to allow for customization of _OSC and slot info. The functions in the library are unchanged, with the exception of adding PciInfo pointer to the APIs. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Definition for DynamicPlatRepoLib interfacePierre Gondois2021-12-141-0/+3
| | | | | | | | | | | | | | | | | | | The DynamicPlatRepoLib library allows to handle dynamically created CmObj. The dynamic platform repository can be in the following states: 1 - Non-initialised 2 - Transient: Possibility to add CmObj to the platform, but not to query them. 3 - Finalised: Possibility to query CmObj, but not to add new. A token is allocated to each CmObj added to the dynamic platform repository (except for reference tokens CmObj). This allows to retrieve dynamic CmObjs among all CmObj (static CmObj for instance). This patch defines the library interface of the DynamicPlatRepo. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Definition for HwInfoParser interfacePierre Gondois2021-12-141-0/+3
| | | | | | | | | | | | | | | | | | Hardware information parser is an optional module defined by the Dynamic Tables Framework. It can either parse an XML, a Device Tree or a Json file containing the platform hardware information to populate the platform information repository. The Configuration Manager can then utilise this information to generate ACPI tables for the platform. Therefore, define an interface for the HwInfoParser library class. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Co-authored-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Joey Gouly <joey.gouly@arm.com>
* DynamicTablesPkg: Extract AcpiHelperLib from TableHelperLibPierre Gondois2021-10-011-0/+4
| | | | | | | | | | | | | The TableHelperLib contains helper functions. Some rely on DynamicTablesPkg definitions (they use Configuration Manager objects). Some others are more generic. To allow using these generic functions without including DynamicTablesPkg definitions, move them to a new AcpiHelperLib library. Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
* DynamicTablesPkg: Add an override for 16550 HID in SSDTJoey Gouly2021-02-111-0/+3
| | | | | | | | | | Some platforms advertise support for a 16550 UART, but are not compatible with the PNP0500 HID. Allow them to override the HID by setting PcdNonBsaCompliant16550SerialHid. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Don't use gEfiMdeModulePkgTokenSpaceGuidJoey Gouly2021-02-111-4/+6
| | | | | | | | | Introduce gEdkiiDynamicTablesPkgTokenSpaceGuid and use that instead. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: SSDT Serial Port Fixup libraryPierre Gondois2020-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Additionally, it is often desirable to describe the serial ports available on a platform so that they are available for use by a rich OS. To facilitate the description of serial ports on a platform a common SSDT Serial Port Fixup library is introduced. It provides interfaces to build a SSDT serial port definition block table based on the serial port information. The SSDT Serial Port Fixup library is used by the SPCR, DBG2 and SSDT Serial Port generator to describe the serial port information in a definition block. +------------+ +------------+ +------------+ | SPCR Gen | | DBG2 Gen | | SERIAL Gen | +------------+ +------------+ +------------+ +----------------------------------+ | SSDT Serial Port Fixup library | +----------------------------------+ The SSDT Serial Port Fixup library: - Parses the SSDT Serial Port template using the AmlLib library to generate an AML tree. - Updates the _UID, _HID and _CID values. - Fixes up the Serial port base address, length and the interrupt number in the _CRS descriptor. - Fixes up the serial-port name. - Serialises the AML Tree to a buffer containing the definition block data. The definition block data is then installed by the corresponding table generator. 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: Dynamic AML: Add AmlLib libraryPierre Gondois2020-08-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI Definition blocks are implemented using AML which has a complex grammar making run-time generation of definition blocks difficult. Dynamic AML is a feature of Dynamic Tables framework that provides a solution for dynamic generation of ACPI Definition block tables. Since, AML bytecode represents complex AML grammar, an AmlLib library is introduced to assist parsing and traversing of the AML bytecode at run-time. The AmlLib library parses a definition block and represents it as an AML tree. The AML objects, methods and data are represented as tree nodes. Since the AML data is represented as tree nodes, it is possible to traverse the tree, locate a node and modify the node data. The tree can then be serialized to a buffer (that represents the definition block). This definition block containing the fixed-up AML code can then be installed as an ACPI Definition Block table. Dynamic AML introduces the following techniques: * AML Fixup * AML Codegen * AML Fixup + Codegen AML Fixup is a technique that involves compiling an ASL template file to generate AML bytecode. This template AML bytecode can be parsed at run-time and a fixup code can update the required fields in the AML template. AML Codegen employs generating small segments of AML code. AmlLib provides a rich set of APIs to operate on AML data for AML Fixup and Codegen. 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-2/+5
| | | | | | | | | | | | | | | | | 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: 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: Dynamic Table Factory DxeSami Mujawar2019-02-191-0/+11
| | | | | | | | | | | | | The dynamic table factory dxe implements the dynamic table factory protocol. It also implements the ACPI, SMBIOS and DT table factories. The table generators register themselves with the respective table factories and the factories are responsible for instantiating instances of the generators to build the firmware 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: Dynamic Table Factory ProtocolSami Mujawar2019-02-191-0/+3
| | | | | | | | | | This patch introduces the dynamic table factory protocol that provides an interface to register and retrieve registered 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>
* DynamicTablesPkg: Configuration Manager ProtocolSami Mujawar2019-02-191-0/+5
| | | | | | | | | | | | | | | | Introduce configuration manager protocol interface that is used by the dynamic tables framework core to communicate with configuration manager. Configuration manager is a platform specific module that implements the configuration manager protocol. Table generators use this interface to retrieve the hardware information from the configuration manager. 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 Generator definitionSami Mujawar2019-02-191-0/+24
A Table generator is a component that implements the logic for building a firmware table. This is typically implemented as a library and registers itself with a table factory. Table generators are further classified based on type of table it generates, a namespace that signifies if the implementation is standard or an OEM specific implementation and a table Id. This patch introduces the definitions used for describing a 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>