From d23bd33161278b03e571d87704467f11b4bc562c Mon Sep 17 00:00:00 2001 From: "Evie (Ivi) Ballou" Date: Sun, 1 Feb 2026 03:08:06 +0200 Subject: [PATCH] acpi/dsdt_top.asl: Move `RBUF` out of the _CRS method This solves the remark: ``` dsdt.asl 28: Name (RBUF, ResourceTemplate () Remark 2173 - ^ Creation of named objects within a method is highly inefficient, use globals or method local variables instead (\_SB.PERC._CRS) ``` Change-Id: Ifff2678e351cf6d92a7fba5d3cf64413e15393c0 Signed-off-by: Evie (Ivi) Ballou Reviewed-on: https://review.coreboot.org/c/coreboot/+/91037 Tested-by: build bot (Jenkins) Reviewed-by: Alicja Michalska Reviewed-by: Paul Menzel Reviewed-by: Patrick Rudolph --- src/acpi/dsdt_top.asl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/acpi/dsdt_top.asl b/src/acpi/dsdt_top.asl index 7539f00e57..a99d80bbf4 100644 --- a/src/acpi/dsdt_top.asl +++ b/src/acpi/dsdt_top.asl @@ -57,22 +57,22 @@ Scope(\_SB) { Device (PERC) // PCI ECAM Resource Consumption { Name (_HID, EisaId("PNP0C02")) + Name (RBUF, ResourceTemplate () + { + QWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, + NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity + 0x0000000000000000, // _MIN + 0x0000000000000001, // _MAX + 0x0000000000000000, // Translation + 0x0000000000000002, // _Len + ,, _Y00, AddressRangeMemory, TypeStatic) + }) Method (_CRS, 0, Serialized) { - Name (RBUF, ResourceTemplate () - { - QWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, - NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000000000000000, // _MIN - 0x0000000000000001, // _MAX - 0x0000000000000000, // Translation - 0x0000000000000002, // _Len - ,, _Y00, AddressRangeMemory, TypeStatic) - }) - CreateQWordField (RBUF, \_SB.PERC._CRS._Y00._MIN, MIN1) - CreateQWordField (RBUF, \_SB.PERC._CRS._Y00._MAX, MAX1) - CreateQWordField (RBUF, \_SB.PERC._CRS._Y00._LEN, LEN1) + CreateQWordField (RBUF, \_SB.PERC._Y00._MIN, MIN1) + CreateQWordField (RBUF, \_SB.PERC._Y00._MAX, MAX1) + CreateQWordField (RBUF, \_SB.PERC._Y00._LEN, LEN1) MIN1 = CONFIG_ECAM_MMCONF_BASE_ADDRESS MAX1 = (MIN1 + CONFIG_ECAM_MMCONF_LENGTH -1) LEN1 = CONFIG_ECAM_MMCONF_LENGTH