From: Andrei Warkentin <andrey.warken...@gmail.com>

Per https://github.com/MicrosoftDocs/windows-uwp/issues/1751,
MsftFunctionConfig () calls can be replaced by PinFunction () calls.

Since these had been converted to VendorLong () blobs due to lack of
implementation of MsftFunctionConfig (), we replace them back now
that PinFunction () is available.

Signed-off-by: Pete Batard <p...@akeo.ie>
---
 Platform/RaspberryPi/AcpiTables/Dsdt.asl | 94 ++------------------
 Platform/RaspberryPi/AcpiTables/Uart.asl | 16 +---
 2 files changed, 7 insertions(+), 103 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl 
b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
index 2aa7d10bd40c..2e63091cdba0 100644
--- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl
+++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
@@ -338,22 +338,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2)
       {
         MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C1_LENGTH, RMEM)
         Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 
BCM2836_I2C1_INTERRUPT }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer,) {2, 3}
-        //
-        VendorLong ()      // Length = 0x31
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1D, 0x00, 0x01, 0x10, 0x00, 0x01,  // 
/.......
-          /* 0018 */  0x04, 0x00, 0x12, 0x00, 0x00, 0x16, 0x00, 0x20,  // 
........
-          /* 0020 */  0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x5C,  // 
........
-          /* 0028 */  0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30,  // 
_SB.GPI0
-          /* 0030 */  0x00                                             // .
-        }
+        PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 2, 3 }
       })
       Method (_CRS, 0x0, Serialized)
       {
@@ -401,49 +386,9 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2)
       {
         MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI0_LENGTH, RMEM)
         Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 
BCM2836_SPI0_INTERRUPT }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig (Exclusive, PullDown, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {9, 10, 11} // MISO, MOSI, SCLK
-        VendorLong ()      // Length = 0x33
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1F, 0x00, 0x01, 0x10, 0x00, 0x02,  // 
/.......
-          /* 0018 */  0x04, 0x00, 0x12, 0x00, 0x00, 0x18, 0x00, 0x22,  // 
......."
-          /* 0020 */  0x00, 0x00, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0B,  // 
........
-          /* 0028 */  0x00, 0x5C, 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50,  // 
.\_SB.GP
-          /* 0030 */  0x49, 0x30, 0x00                                 // I0.
-        }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {8}     // CE0
-        VendorLong ()      // Length = 0x2F
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x01,  // 
/.......
-          /* 0018 */  0x04, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E,  // 
........
-          /* 0020 */  0x00, 0x00, 0x00, 0x08, 0x00, 0x5C, 0x5F, 0x53,  // 
.....\_S
-          /* 0028 */  0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00         // 
B.GPI0.
-        }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {7}     // CE1
-        VendorLong ()      // Length = 0x2F
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x01,  // 
/.......
-          /* 0018 */  0x04, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E,  // 
........
-          /* 0020 */  0x00, 0x00, 0x00, 0x07, 0x00, 0x5C, 0x5F, 0x53,  // 
.....\_S
-          /* 0028 */  0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00         // 
B.GPI0.
-        }
+        PinFunction (Exclusive, PullDown, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 9, 10, 11 } // MISO, MOSI, SCLK
+        PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 8 } // CE0
+        PinFunction (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 7 } // CE1
       })
 
       Method (_CRS, 0x0, Serialized)
@@ -468,35 +413,8 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2)
       {
         MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI1_LENGTH, RMEM)
         Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { 
BCM2836_SPI1_INTERRUPT }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {19, 20, 21} // MISO, MOSI, SCLK
-        VendorLong ()      // Length = 0x33
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1F, 0x00, 0x01, 0x10, 0x00, 0x02,  // 
/.......
-          /* 0018 */  0x03, 0x00, 0x12, 0x00, 0x00, 0x18, 0x00, 0x22,  // 
......."
-          /* 0020 */  0x00, 0x00, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15,  // 
........
-          /* 0028 */  0x00, 0x5C, 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50,  // 
.\_SB.GP
-          /* 0030 */  0x49, 0x30, 0x00                                 // I0.
-        }
-
-        //
-        // MsftFunctionConfig is encoded as the VendorLong.
-        //
-        // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {16} // CE2
-        VendorLong ()      // Length = 0x2F
-        {
-          /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-          /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-          /* 0010 */  0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x02,  // 
/.......
-          /* 0018 */  0x03, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E,  // 
........
-          /* 0020 */  0x00, 0x00, 0x00, 0x10, 0x00, 0x5C, 0x5F, 0x53,  // 
.....\_S
-          /* 0028 */  0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00         // 
B.GPI0.
-        }
+        PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 19, 20, 21 } // MISO, MOSI, SCLK
+        PinFunction (Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 16 } // CE2
       })
 
       Method (_CRS, 0x0, Serialized)
diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl 
b/Platform/RaspberryPi/AcpiTables/Uart.asl
index c466247bb33b..f6a14d6fd069 100644
--- a/Platform/RaspberryPi/AcpiTables/Uart.asl
+++ b/Platform/RaspberryPi/AcpiTables/Uart.asl
@@ -77,21 +77,7 @@ Device (URTM)
     // the kernel debugger is enabled to prevent another client
     // from muxing the pins away.
 
-    //
-    // MsftFunctionConfig is encoded as the VendorLong.
-    //
-    // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT5, "\\_SB.GPI0", 0, 
ResourceConsumer, ) {14, 15}
-    // VendorLong  ()      // Length = 0x31
-    // {
-    //   /* 0000 */  0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60,  // 
.`D....`
-    //   /* 0008 */  0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD,  // 
J...-#0.
-    //   /* 0010 */  0x2F, 0x8D, 0x1D, 0x00, 0x01, 0x10, 0x00, 0x02,  // 
/.......
-    //   /* 0018 */  0x02, 0x00, 0x12, 0x00, 0x00, 0x16, 0x00, 0x20,  // 
.......
-    //   /* 0020 */  0x00, 0x00, 0x00, 0x0E, 0x00, 0x0F, 0x00, 0x5C,  // 
.......\
-    //   /* 0028 */  0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30,  // 
_SB.GPI0
-    //   /* 0030 */  0x00                                             // .
-    //}
-
+    // PinFunction (Exclusive, PullDown, BCM_ALT5, "\\_SB.GPI0", 0, 
ResourceConsumer, , ) { 14, 15 }
   })
   Method (_CRS, 0x0, Serialized)
   {
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56396): https://edk2.groups.io/g/devel/message/56396
Mute This Topic: https://groups.io/mt/72561824/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to