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>
82 lines
3.6 KiB
Plaintext
82 lines
3.6 KiB
Plaintext
/** @file
|
|
SSDT CMN-600 Template
|
|
|
|
Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
@par Reference(s):
|
|
- Arm CoreLink CMN-600 Coherent Mesh Network Technical Reference Manual r3p0
|
|
- Generic ACPI for Arm Components 1.0 Platform Design Document
|
|
|
|
@par Glossary:
|
|
- {template} - Data fixed up using AML Fixup APIs.
|
|
- {codegen} - Data generated using AML Codegen APIs.
|
|
**/
|
|
|
|
DefinitionBlock ("SsdtCmn600.aml", "SSDT", 2, "ARMLTD", "CMN-600", 1) {
|
|
Scope (_SB) {
|
|
// CMN-600 device object for a X * Y mesh, where (X >= 4) || (Y >= 4).
|
|
Device (CMN0) { // {template}
|
|
Name (_HID, "ARMHC600")
|
|
Name (_UID, 0x0) // {template}
|
|
|
|
Name (_CRS, ResourceTemplate () {
|
|
// Descriptor for 256 MB of the CFG region at offset PERIPHBASE.
|
|
QWordMemory (
|
|
ResourceConsumer, // bit 0 of general flags is 0.
|
|
PosDecode,
|
|
MinFixed, // Range is fixed.
|
|
MaxFixed, // Range is Fixed.
|
|
NonCacheable,
|
|
ReadWrite,
|
|
0x00000000, // Granularity
|
|
0xA0000000, // MinAddress // {template}
|
|
0xAFFFFFFF, // MaxAddress // {template}
|
|
0x00000000, // Translation
|
|
0x10000000, // RangeLength // {template}
|
|
, // ResourceSourceIndex
|
|
, // ResourceSource
|
|
CFGR // DescriptorName
|
|
) // QWordMemory
|
|
|
|
// Descriptor for the root node. This is a 16 KB region at offset
|
|
// ROOTNODEBASE. In this example, ROOTNODEBASE starts at the 16 KB
|
|
// aligned offset of PERIPHBASE.
|
|
QWordMemory (
|
|
ResourceConsumer, // bit 0 of general flags is 0.
|
|
PosDecode,
|
|
MinFixed, // Range is fixed.
|
|
MaxFixed, // Range is Fixed.
|
|
NonCacheable,
|
|
ReadWrite,
|
|
0x00000000, // Granularity
|
|
0xA0000000, // MinAddress // {template}
|
|
0xAFFFFFFF, // MaxAddress // {template}
|
|
0x00000000, // Translation
|
|
0x10000000, // RangeLength // {template}
|
|
, // ResourceSourceIndex
|
|
, // ResourceSource
|
|
ROOT // DescriptorName
|
|
) // QWordMemory
|
|
|
|
// The Interrupt information is generated using AmlCodegen.
|
|
// Interrupt on PMU0 overflow, attached to DTC [0], with GSIV = <gsiv0>.
|
|
//
|
|
// Interrupt ( // {codegen}
|
|
// ResourceConsumer, // ResourceUsage
|
|
// Level, // EdgeLevel
|
|
// ActiveHigh, // ActiveLevel
|
|
// Exclusive, // Shared
|
|
// , // ResourceSourceIndex
|
|
// , // ResourceSource
|
|
// // DescriptorName
|
|
// ) {
|
|
// 0xA5 // <gsiv0 >
|
|
// } // Interrupt
|
|
|
|
}) // Name
|
|
} // Device
|
|
} // _SB
|
|
} // DefinitionBlock
|