Add a RES0 device to the SSDT to reserve the PCI ECAM area.

This fixes the warning that Linux prints:

acpi PNP0A08:00: [Firmware Bug]: ECAM area [mem 0x40000000-0x4fffffff]
not reserved in ACPI namespace

With this change, the "Firmware Bug" message is no longer printed, but
a different warning is displayed:

"system 00:00: [mem 0x40000000-0x4fffffff window] could not be reserved"

It appears this is a harmless message though: a discussion about it can
be seen at https://lore.kernel.org/all/20210603141641.GA17284@lpieralisi/#t

Signed-off-by: Rebecca Cran <rebe...@bsdio.com>
Tested-by: Sami Mujawar <sami.muja...@arm.com>
Reviewed-by: Sami Mujawar <sami.muja...@arm.com>
---
 Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf      |  4 ++++
 Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl | 13 +++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf 
b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
index f140febc4ad4..9a76475765f0 100644
--- a/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
+++ b/Platform/ARM/JunoPkg/AcpiTables/AcpiTables.inf
@@ -45,6 +45,10 @@ [FixedPcd]
   gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
   gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
 
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
+  gArmJunoTokenSpaceGuid.PcdPciConfigurationSpaceSize
+  gArmJunoTokenSpaceGuid.PcdPciConfigurationSpaceLimit
+
   #
   # PL011 UART Settings for Serial Port Console Redirection
   #
diff --git a/Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl 
b/Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl
index 317b621e013e..e60fc42a3340 100644
--- a/Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl
+++ b/Platform/ARM/JunoPkg/AcpiTables/AcpiSsdtRootPci.asl
@@ -140,6 +140,19 @@ DefinitionBlock("SsdtPci.aml", "SSDT", 1, "ARMLTD", 
"ARM-JUNO", EFI_ACPI_ARM_OEM
         Return (RBUF)
       } // Method(_CRS)
 
+      Device (RES0) {
+        Name (_HID, "PNP0C02" /* PNP Motherboard Resources */)  // _HID: 
Hardware ID
+        Name (_CRS, ResourceTemplate () {                       // _CRS: 
Current Resource Settings
+           QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, 
NonCacheable, ReadWrite,
+           0x0000000000000000,                                  // Granularity
+           FixedPcdGet64 (PcdPciExpressBaseAddress),            // Range 
Minimum
+           FixedPcdGet64 (PcdPciConfigurationSpaceLimit),       // Range 
Maximum
+           0x0000000000000000,                                  // Translation 
Offset
+           FixedPcdGet64 (PcdPciConfigurationSpaceSize),        // Length
+           ,, , AddressRangeMemory, TypeStatic)
+        })
+      }
+
       //
       // OS Control Handoff
       //
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#87767): https://edk2.groups.io/g/devel/message/87767
Mute This Topic: https://groups.io/mt/89895617/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to