public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: devel@edk2.groups.io
Cc: leif@nuviainc.com, Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: [PATCH edk2-platforms 3/4] Platform/AMD/Styx: implement PCIe _DSM #5 to preserve boot allocations
Date: Fri,  8 Jan 2021 15:28:49 +0100	[thread overview]
Message-ID: <20210108142850.14535-3-ard.biesheuvel@arm.com> (raw)
In-Reply-To: <20210108142850.14535-1-ard.biesheuvel@arm.com>

Now that we have gained support for resizable BARs in EDK2, there is no
longer a need for the OS to reallocate MMIO BAR resources. So let's
implement _DSM #5 properly to inform the OS that boot time allocations
may be preserved.

While at it, clean up the implementation of _DSM, and only retain the
methods that we actually need: #0 exposing the fact that #0 and #5 are
the only ones implemented, and #5 as explained above.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
---
 Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl | 82 +-------------------
 1 file changed, 2 insertions(+), 80 deletions(-)

diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
index 2ee6ea3b1eb1..53ad25ea9a2f 100644
--- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
+++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl
@@ -434,92 +434,14 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "AMDINC", "SEATTLE ", 3)
                   // Function 0: Return supported functions
                   //
                   case(0) {
-                    Return (Buffer() {0xFF})
-                  }
-
-                  //
-                  // Function 1: Return PCIe Slot Information
-                  //
-                  case(1) {
-                    Return (Package(2) {
-                      One, // Success
-                      Package(3) {
-                        0x1,  // x1 PCIe link
-                        0x1,  // PCI express card slot
-                        0x1   // WAKE# signal supported
-                      }
-                    })
-                  }
-
-                  //
-                  // Function 2: Return PCIe Slot Number.
-                  //
-                  case(2) {
-                    Return (Package(1) {
-                      Package(4) {
-                        2,  // Source ID
-                        4,  // Token ID: ID refers to a slot
-                        0,  // Start bit of the field to use.
-                        7   // End bit of the field to use.
-                      }
-                    })
-                  }
-
-                  //
-                  // Function 3: Return Vendor-specific Token ID Strings.
-                  //
-                  case(3) {
-                    Return (Package(0) {})
-                  }
-
-                  //
-                  // Function 4: Return PCI Bus Capabilities
-                  //
-                  case(4) {
-                    Return (Package(2) {
-                      One, // Success
-                      Buffer() {
-                        1,0,            // Version
-                        0,0,            // Status, 0:Success
-                        24,0,0,0,       // Length
-                        1,0,            // PCI
-                        16,0,           // Length
-                        0,              // Attributes
-                        0x0D,           // Current Speed/Mode
-                        0x3F,0,         // Supported Speeds/Modes
-                        0,              // Voltage
-                        0,0,0,0,0,0,0   // Reserved
-                      }
-                    })
+                    Return (Buffer() {0x21})
                   }
 
                   //
                   // Function 5: Return Ignore PCI Boot Configuration
                   //
                   case(5) {
-                    Return (Package(1) {1})
-                  }
-
-                  //
-                  // Function 6: Return LTR Maximum Latency
-                  //
-                  case(6) {
-                    Return (Package(4) {
-                      Package(1){0},  // Maximum Snoop Latency Scale
-                      Package(1){0},  // Maximum Snoop Latency Value
-                      Package(1){0},  // Maximum No-Snoop Latency Scale
-                      Package(1){0}   // Maximum No-Snoop Latency Value
-                    })
-                  }
-
-                  //
-                  // Function 7: Return PCI Express Naming
-                  //
-                  case(7) {
-                    Return (Package(2) {
-                      Package(1) {0},
-                      Package(1) {Unicode("PCI0")}
-                    })
+                    Return (0)
                   }
 
                   //
-- 
2.17.1


  parent reply	other threads:[~2021-01-08 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 14:28 [PATCH edk2-platforms 1/4] Platform/AMD/Styx: add missing TimeBaseLib resolutions Ard Biesheuvel
2021-01-08 14:28 ` [PATCH edk2-platforms 2/4] Platform/AMD/Styx: simplify PCIe root bus MMIO resources Ard Biesheuvel
2021-01-08 14:28 ` Ard Biesheuvel [this message]
2021-01-08 14:28 ` [PATCH edk2-platforms 4/4] Platform/AMD/Styx: remove unused RP0 device Ard Biesheuvel
2021-01-08 15:26 ` [PATCH edk2-platforms 1/4] Platform/AMD/Styx: add missing TimeBaseLib resolutions Leif Lindholm
2021-01-08 15:50   ` 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=20210108142850.14535-3-ard.biesheuvel@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