DynamicTablesPkg: Add PCCT Generator

The Platform Communication Channel Table (PCCT) generator collates
the relevant information required for generating a PCCT table from
configuration manager using the configuration manager protocol.
The DynamicTablesManager then install the PCCT table.

From ACPI 6.4, s14 PLATFORM COMMUNICATIONS CHANNEL (PCC):
  The platform communication channel (PCC) is a generic mechanism
  for OSPM to communicate with an entity in the platform.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Pierre Gondois 2022-10-10 11:20:55 +02:00 committed by mergify[bot]
parent dab7bac94c
commit 8405b1480f
5 changed files with 1264 additions and 2 deletions

View File

@ -1,7 +1,7 @@
## @file
# Dsc include file for Dynamic Tables Framework.
#
# Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
# Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@ -33,6 +33,7 @@
DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.inf
DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.inf
DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/AcpiSratLibArm.inf
DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf
# AML Fixup
DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortLibArm.inf
@ -57,6 +58,7 @@
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.inf
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.inf
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/AcpiSratLibArm.inf
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/AcpiPcctLibArm.inf
# AML Fixup
NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortLibArm.inf

View File

@ -1,6 +1,6 @@
/** @file
Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@ -98,6 +98,7 @@ typedef enum StdAcpiTableId {
EStdAcpiTableIdSsdtCmn600, ///< SSDT Cmn-600 Generator
EStdAcpiTableIdSsdtCpuTopology, ///< SSDT Cpu Topology
EStdAcpiTableIdSsdtPciExpress, ///< SSDT Pci Express Generator
EStdAcpiTableIdPcct, ///< PCCT Generator
EStdAcpiTableIdMax
} ESTD_ACPI_TABLE_ID;

View File

@ -0,0 +1,30 @@
## @file
# Pcct Table Generator
#
# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x0001001B
BASE_NAME = AcpiPcctLibArm
FILE_GUID = 38FE945C-D6ED-4CD6-8D20-FCEF3260D15A
VERSION_STRING = 1.0
MODULE_TYPE = DXE_DRIVER
LIBRARY_CLASS = NULL|DXE_DRIVER
CONSTRUCTOR = AcpiPcctLibConstructor
DESTRUCTOR = AcpiPcctLibDestructor
[Sources]
PcctGenerator.c
PcctGenerator.h
[Packages]
DynamicTablesPkg/DynamicTablesPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseLib

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
/** @file
PCCT Table Generator
Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
- ACPI 6.4 Specification - January 2021
s14 PLATFORM COMMUNICATIONS CHANNEL (PCC)
**/
#ifndef PCCT_GENERATOR_H_
#define PCCT_GENERATOR_H_
#pragma pack(1)
/** Structure used to map a Pcc Subspace to an index.
*/
typedef struct MappingTable {
/// Mapping table for Subspace Ids.
/// Subspace ID/Index <-> CM_ARM_PCC_SUBSPACE_TYPE[X]_INFO pointer
VOID **Table;
/// Number of entries in the Table.
UINT32 MaxIndex;
} MAPPING_TABLE;
/** A structure holding the Pcct generator and additional private data.
*/
typedef struct AcpiPcctGenerator {
/// ACPI Table generator header
ACPI_TABLE_GENERATOR Header;
// Private fields are defined from here.
/// Table to map: Subspace ID/Index <-> CM_ARM_PCC_SUBSPACE_TYPE[X]_INFO pointer
MAPPING_TABLE MappingTable;
} ACPI_PCCT_GENERATOR;
#pragma pack()
#endif // PCCT_GENERATOR_H_