Files
system76-edk2/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortTemplate.asl
Himanshu Sharma 1ae5bee967 DynamicTablesPkg/SsdtSerialPortFixupLib: Add Interrupt node for SPIs only
Add interrupt node to the AML description of the serial-port only if the
IRQ ID from the Configuration Manager is a valid SPI (shared processor
interrupt) or an extended SPI. So, for DBG2 UART ports where interrupt
is not mandatory, adding of an interrupt node in the AML description
using Serial Port Fixup Library can be ignored if the UART is not
defined with a valid SPI, like in N1SDP.

This update generates the interrupt node for the valid SPI range using
the AML Codegen API instead of updating it using the AML Fixup API.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Himanshu Sharma <Himanshu.Sharma@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
2024-03-04 09:58:10 +00:00

66 lines
2.4 KiB
Plaintext

/** @file
SSDT Serial Template
Copyright (c) 2019 - 2024, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
- Arm Server Base Boot Requirements (SBBR), s4.2.1.8 "SPCR".
@par Glossary:
- {template} - Data fixed up using AML Fixup APIs.
- {codegen} - Data generated using AML Codegen APIs.
**/
DefinitionBlock ("SsdtSerialPortTemplate.aml", "SSDT", 2, "ARMLTD", "SERIAL", 1) {
Scope (_SB) {
// UART PL011
Device (COM0) { // {template}
Name (_UID, 0x0) // {template}
Name (_HID, "HID0000") // {template}
Name (_CID, "CID0000") // {template}
Method(_STA) {
Return(0xF)
}
Name (_CRS, ResourceTemplate() {
QWordMemory (
, // ResourceUsage
, // Decode
, // IsMinFixed
, // IsMaxFixed
, // Cacheable
ReadWrite, // ReadAndWrite
0x0, // AddressGranularity
0xA0000000, // AddressMinimum // {template}
0xAFFFFFFF, // AddressMaximum // {template}
0, // AddressTranslation
0x10000000, // RangeLength // {template}
, // ResourceSourceIndex
, // ResourceSource
, // DescriptorName
, // MemoryRangeType
// TranslationType
) // QWordMemory
// The Interrupt information is generated using AmlCodegen.
//
// Interrupt ( // {codegen}
// ResourceConsumer, // ResourceUsage
// Level, // EdgeLevel
// ActiveHigh, // ActiveLevel
// Exclusive, // Shared
// , // ResourceSourceIndex
// , // ResourceSource
// // DescriptorName
// ) {
// <IRQ> // <spi>
// } // Interrupt
}) // Name
} // Device
} // Scope (_SB)
}