public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dimitrije Pavlov" <Dimitrije.Pavlov@arm.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Graeme Gregory <graeme@nuviainc.com>,
	Radoslaw Biernacki <rad@semihalf.com>,
	Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Sunny Wang <Sunny.Wang@arm.com>,
	Jeremy Linton <Jeremy.Linton@arm.com>
Subject: [edk2-platforms][PATCH v1 1/1] Silicon/Qemu: Provide _STA ACPI method
Date: Tue, 28 Jun 2022 11:26:11 -0500	[thread overview]
Message-ID: <20220628162611.6252-1-Dimitrije.Pavlov@arm.com> (raw)

SBBR requires platforms to provide the _STA ACPI method for each
defined device. This patch implements a stub method that always
indicates devices are present and functional.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Graeme Gregory <graeme@nuviainc.com>
Cc: Radoslaw Biernacki <rad@semihalf.com>
Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Cc: Jeremy Linton <Jeremy.Linton@arm.com>

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
---
 Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl | 38 +++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
index 1bf9fbb99e75..3357916571fe 100644
--- a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
+++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl
@@ -16,6 +16,9 @@
             Name (_PRS, ResourceTemplate() {                                   \
                 Interrupt (ResourceProducer, Level, ActiveHigh, Exclusive) { Irq } \
             })                                                                 \
+            Method (_STA) {                                                    \
+              Return (0xF)                                                     \
+            }                                                                  \
             Method (_CRS, 0) { Return (_PRS) }                                 \
             Method (_SRS, 1) { }                                               \
             Method (_DIS) { }                                                  \
@@ -40,6 +43,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                        0x00001000)
         Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 33 }
       })
+      Method (_STA) {
+        Return (0xF)
+      }
     }
 
     // AHCI Host Controller
@@ -57,13 +63,18 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                        FixedPcdGet32 (PcdPlatformAhciSize))
         Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 42 }
       })
+      Method (_STA) {
+        Return (0xF)
+      }
     }
 
     // USB EHCI Host Controller
     Device (USB0) {
         Name (_HID, "LNRO0D20")
         Name (_CID, "PNP0D20")
-
+        Method (_STA) {
+          Return (0xF)
+        }
         Method (_CRS, 0x0, Serialized) {
             Name (RBUF, ResourceTemplate() {
                 Memory32Fixed (ReadWrite,
@@ -77,6 +88,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
         // Root Hub
         Device (RHUB) {
             Name (_ADR, 0x00000000)  // Address of Root Hub should be 0 as per ACPI 5.0 spec
+            Method (_STA) {
+              Return (0xF)
+            }
 
             // Ports connected to Root Hub
             Device (HUB1) {
@@ -87,6 +101,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                     0x00000000, // Reserved 0 must be zero
                     0x00000000  // Reserved 1 must be zero
                 })
+                Method (_STA) {
+                  Return (0xF)
+                }
 
                 Device (PRT1) {
                     Name (_ADR, 0x00000001)
@@ -102,6 +119,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                             0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                         }
                     })
+                    Method (_STA) {
+                      Return (0xF)
+                    }
                 } // USB0_RHUB_HUB1_PRT1
                 Device (PRT2) {
                     Name (_ADR, 0x00000002)
@@ -117,6 +137,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                             0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                         }
                     })
+                    Method (_STA) {
+                      Return (0xF)
+                    }
                 } // USB0_RHUB_HUB1_PRT2
 
                 Device (PRT3) {
@@ -133,6 +156,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                             0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                         }
                     })
+                    Method (_STA) {
+                      Return (0xF)
+                    }
                 } // USB0_RHUB_HUB1_PRT3
 
                 Device (PRT4) {
@@ -149,6 +175,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
                             0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                         }
                     })
+                    Method (_STA) {
+                      Return (0xF)
+                    }
                 } // USB0_RHUB_HUB1_PRT4
             } // USB0_RHUB_HUB1
         } // USB0_RHUB
@@ -164,6 +193,10 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
       Name (_UID, "PCI0")
       Name (_CCA, One)    // Initially mark the PCI coherent (for JunoR1)
 
+      Method (_STA) {
+        Return (0xF)
+      }
+
       Method (_CBA, 0, NotSerialized) {
           return (FixedPcdGet32 (PcdPciExpressBaseAddress))
       }
@@ -402,6 +435,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT",
            FixedPcdGet64 (PcdPciExpressBarSize),     // Length
            ,, , AddressRangeMemory, TypeStatic)
         })
+        Method (_STA) {
+          Return (0xF)
+        }
       }
 
       // OS Control Handoff
-- 
2.34.1


             reply	other threads:[~2022-06-28 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 16:26 Dimitrije Pavlov [this message]
2022-06-28 17:25 ` [edk2-platforms][PATCH v1 1/1] Silicon/Qemu: Provide _STA ACPI method Ard Biesheuvel

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=20220628162611.6252-1-Dimitrije.Pavlov@arm.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