Commit Graph

13 Commits

Author SHA1 Message Date
Abdul Lateef Attar 238ccc5944 DynamicTablesPkg: Adds generic ACPI Creator ID
Adds generic creator id as DYNT.
Updates the common ACPI tables with generic CreatorId.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2024-09-02 16:34:00 +00:00
Dat Mach 75a9afa540 DynamicTablesPkg: ACPI TPM2 generator
Generate ACPI TPM2 table using the information obtained from
Tpm2InterfaceInfo CM object.

Signed-off-by: Dat Mach <dmach@nvidia.com>
2024-08-08 01:52:47 +00:00
Abdul Lateef Attar bc0fc75637 DynamicTablesPkg/AcpiFadtLib: Adds FADT X64 generator
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4781

Updates FADT X64 generator to collect below configuration
information and update the table accordingly.
      - SCI interrupt
      - SCI command
      - PM Block
      - GPE Block
      - PM Block 64-bit
      - GPE Block 64-bit
      - Sleep block
      - Reset block
      - Miscellaneous legacy information

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2024-08-02 08:05:57 +00:00
Pierre Gondois be1d408773 DynamicTablesPkg: Add EFIAPI to generators hooks
For X64 builds, the EFIAPI is replaced by '(__attribute__((ms_abi))'.
This might lead to build error for some ACPI tablte generators
due to function prototype mismatch.

Add the EFIAPI to ACPI table generator hooks:
- ACPI_TABLE_GENERATOR_BUILD_TABLEEX
- ACPI_TABLE_GENERATOR_FREE_TABLEEX

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois 7537028fa5 DynamicTablesPkg: Fix conversion compiler warnings
Some CM objects fields are wider than the targeted field in ACPI
tables. Some assignments are also subject to data loss and
trigger the following warnings:
- '<': signed/unsigned mismatch
- '=': conversion from 'UINTxx' to 'UINTyy', possible loss of data
with xx > yy.

Add checks/cast to remove the warnings.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois 40a0dbdd18 DynamicTablesPkg: FdtHwInfoParserLib: Create wrapper to get INTC addr cells
Parent interrupt controller's address cells is arch specific. So,
create a wrapper function which can be implemented differently for
different archs. Move current implementation to ARM specific file.

Suggested-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois dfd867bd83 DynamicTablesPkg: AcpiSsdtCpuTopologyLib: Avoid dependency on GICC
The GICC is an ARM specific structure. Other architectures have different
local interrupt controller structures from which CPU topology can be
created. Avoid the GICC reference in common code by:
- creating a wrapper CreateTopologyFromIntC() instead of
  CreateTopologyFromGicC() so that different archs can implement
  it differently.
- implementing arch specific functions to get the AcpiProcessorUid,
  CpcToken, EtToken and use them instead of using the GicC CM object
  directly.

Suggested-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois c6e0eed072 DynamicTablesPkg: AcpiSratLib: Prepare to support other archs
Allow other architectures to reuse the AcpiSratLib by extracting
the Arm specific part of the table generation.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois acaf99827f DynamicTablesPkg: AcpiSpcrLib: Prepare to support other archs
Remove the Arm name from the generator to show the generator
can be used by other archs.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois 2e6076edaf DynamicTablesPkg: AcpiDbg2Lib: Prepare to support other archs
Allow other architectures to reuse the AcpiDbg2Lib by extracting
the Arm specific part of the table generation.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois e69e1eea2c DynamicTablesPkg: AcpiFadtLib: Prepare to support other archs
Allow other architectures to reuse the AcpiFadtLib by extracting
the Arm specific part of the table generation.

Suggested-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois b242de55e2 DynamicTablesPkg: Acpi: Prepare common libraries to support other archs
Allow other architectures to reuse ACPI common libraries by:
- Removing the Arm prefix from the BASE_NAME
- Moving Arm specific libraries/packages to ARM/AARCH64
  specific sections in the .inf files
Also remove the empty .inf sections.

Suggested-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00
Pierre Gondois e640c04a7b DynamicTablesPkg: Acpi: Move generic libraries to common folder
Some of the ACPI table generators are generic enough to be re-used
by other architectures. Move the following generators to a
'Common' folder:
- AcpiDbg2Lib
- AcpiFadtLib
- AcpiMcfgLib
- AcpiPcctLib
- AcpiPpttLib
- AcpiRawLib
- AcpiSpcrLib
- AcpiSratLib
- SsdtSerialPortLib
- SsdtCpuTopologyLib
- SsdtPcieLib
and update DynamicTables.dsc.inc accordingly.

Suggested-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2024-07-29 13:44:55 +00:00