Pierre Gondois 375683654d DynamicTablesPkg: Add SSDT CMN-600 Table generator
The Generic ACPI for Arm Components 1.0 Platform Design
Document, s2.6.4 "ASL code examples" provides information
to describe an Arm CoreLink CMN-600 Coherent Mesh Network
using an ASL definition block table.

The SSDT CMN-600 Table Generator uses the Configuration
Manager protocol to obtain the following information about
the CMN-600 device on the platform:
 - the PERIPHBASE address location and address range;
 - the ROOTNODEBASE address location;
 - the number of Debug and Trace Controller (DTC)
   and their respective interrupt number;

The CMN-600 mesh is described using the CM_ARM_CMN_600_INFO
and CM_ARM_EXTENDED_INTERRUPT structures in the Configuration
Manager.

The SSDT CMN-600 Table generator:
 - gets the CMN-600 hardware information
   from the configuration manager.
 - uses the AmlLib interfaces to parse the AML
   template BLOB and construct an AML tree.
 - uses the AmlLib to update:
   - the "_UID" value;
   - the address location and range of the PERIPHBASE;
   - the address location of the ROOTNODEBASE;
   - the number of Debug and Trace Controller (DTC)
     and their respective interrupt number;
 - serializes the AML tree to an output buffer.
   This output buffer contains the fixed-up AML code,
   which is then installed as an ACPI SSDT table.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Co-authored-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-11-03 09:09:22 +00:00

52 lines
1.5 KiB
C

/** @file
Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Glossary:
- Cm or CM - Configuration Manager
- Obj or OBJ - Object
- Std or STD - Standard
@par Reference(s):
- Arm CoreLink CMN-600 Coherent Mesh Network Technical Reference Manual r3p0
- Generic ACPI for Arm Components 1.0 Platform Design Document
**/
#ifndef SSDT_CMN600_GENERATOR_H_
#define SSDT_CMN600_GENERATOR_H_
/** PeriphBase maximum address length is 256MB (0x10000000)
for a (X >= 4) || (Y >= 4) dimensions mesh.
*/
#define PERIPHBASE_MAX_ADDRESS_LENGTH SIZE_256MB
/** PeriphBase minimum address length is 64MB (0x04000000)
for a (X < 4) && (Y < 4) dimensions mesh.
*/
#define PERIPHBASE_MIN_ADDRESS_LENGTH SIZE_64MB
/** RootNodeBase address length is 16KB (0x00004000).
*/
#define ROOTNODEBASE_ADDRESS_LENGTH SIZE_16KB
/** Maximum number of CMN-600 Debug and Trace Logic Controllers (DTC).
*/
#define MAX_DTC_COUNT 4
/** Starting value for the UID to represent the CMN600 devices.
*/
#define CMN600_DEVICE_START_UID 0
/** Maximum CMN-600 devices supported by this generator.
This generator supports a maximum of 16 CMN-600 devices.
Note: This is not a hard limitation and can be extended if needed.
Corresponding changes would be needed to support the Name and
UID fields describing the serial port.
*/
#define MAX_CMN600_DEVICES_SUPPORTED 16
#endif // SSDT_CMN600_GENERATOR_H_