public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Thomas Abraham <thomas.abraham@arm.com>,
	Sami Mujawar <sami.mujawar@arm.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Subject: [PATCH edk2-platforms 3/3] Platform/ARM/JunoPkg: Reserve the ECAM area in ACPI with RES0 device
Date: Fri,  4 Mar 2022 21:19:55 -0700	[thread overview]
Message-ID: <20220305041955.20918-4-rebecca@bsdio.com> (raw)
In-Reply-To: <20220305041955.20918-1-rebecca@bsdio.com>

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

Signed-off-by: Rebecca Cran <rebecca@bsdio.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


  parent reply	other threads:[~2022-03-05  4:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05  4:19 [PATCH edk2-platforms 0/3] JunoPkg: Fix AcpiSsdtRootPci.asl to use spaces and reserve ECAM area Rebecca Cran
2022-03-05  4:19 ` [PATCH edk2-platforms 1/3] Platform/ARM/JunoPkg: Convert AcpiSsdtRootPci.asl from tabs to spaces Rebecca Cran
2022-03-16 15:40   ` Sami Mujawar
2022-03-05  4:19 ` [PATCH edk2-platforms 2/3] Platform/ARM/JunoPkg: Use MdePkg PcdPciExpressBaseAddress for ECAM addr Rebecca Cran
2022-03-17  9:54   ` Sami Mujawar
2022-03-19 19:56     ` Rebecca Cran
2022-03-05  4:19 ` Rebecca Cran [this message]
2022-03-17  9:55   ` [PATCH edk2-platforms 3/3] Platform/ARM/JunoPkg: Reserve the ECAM area in ACPI with RES0 device Sami Mujawar
2022-03-19 19:56     ` Rebecca Cran
2022-03-15  2:44 ` [PATCH edk2-platforms 0/3] JunoPkg: Fix AcpiSsdtRootPci.asl to use spaces and reserve ECAM area Rebecca Cran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220305041955.20918-4-rebecca@bsdio.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox