* [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access
@ 2021-09-01 16:46 Pete Batard
2021-09-01 17:30 ` Ard Biesheuvel
2021-09-01 18:19 ` Samer El-Haj-Mahmoud
0 siblings, 2 replies; 3+ messages in thread
From: Pete Batard @ 2021-09-01 16:46 UTC (permalink / raw)
To: devel; +Cc: ardb+tianocore, leif, samer.el-haj-mahmoud
With the upcoming release of Windows 11, Microsoft has introduced a new USB
Device-Specific Method (_DSM) function to enforce 64-bit xHCI registers to
be accessed through two sequential 32-bit requests. The new function (Query
controller register access type - Function 6) is documented at:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm-
Support for this feature is required on the raspberry Pi 4 where there is
a bug/limitation in the xHCI stack that prevents full range 64-bit access
from working correctly. It should be noted that an equivalent for this _DSM
is not required on Linux, as 64-bit xHCI register access is already broken
down into 2x32-bit by the drivers there.
With this _DSM, and unlike what is the case for Windows 10, Windows 11 can
now be installed on the Raspberry Pi 4 without having to alter any of the
installation files, as we were able to validate using the latest Windows 11
Build 22000 Insider image.
Signed-off-by: Pete Batard <pete@akeo.ie>
Tested-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/AcpiTables/Xhci.asl | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl b/Platform/RaspberryPi/AcpiTables/Xhci.asl
index 9b37277956d9..00b0cd29c69c 100644
--- a/Platform/RaspberryPi/AcpiTables/Xhci.asl
+++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl
@@ -138,6 +138,27 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI4XHCI", 2)
Debug = "xHCI enable"
Store (0x6, CMND)
}
+
+ /*
+ * Microsoft's USB Device-Specific Methods. See:
+ * https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm-
+ */
+ Name (DSMU, ToUUID ("ce2ee385-00e6-48cb-9f05-2edb927c4899"))
+
+ Method (_DSM, 4, Serialized) {
+ If (LEqual (Arg0, DSMU)) { // USB capabilities UUID
+ Switch (ToInteger (Arg2)) {
+ Case (0) { // Function 0: List of supported functions
+ Return (Buffer () { 0x41 }) // 0x41 - Functions 0 and 6 supported
+ }
+ Case (6) { // Function 6: RegisterAccessType
+ Return (Buffer () { 0x01 }) // 0x01 - Must use 32bit register access
+ }
+ Default { } // Unsupported
+ }
+ }
+ return (Buffer () { 0x00 }) // Return 0x00 for anything unsupported
+ }
} // end XHC0
} //end SCB0
} //end scope sb
--
2.30.2.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access
2021-09-01 16:46 [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access Pete Batard
@ 2021-09-01 17:30 ` Ard Biesheuvel
2021-09-01 18:19 ` Samer El-Haj-Mahmoud
1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2021-09-01 17:30 UTC (permalink / raw)
To: Pete Batard
Cc: edk2-devel-groups-io, Ard Biesheuvel, Leif Lindholm,
Samer El-Haj-Mahmoud
On Wed, 1 Sept 2021 at 18:46, Pete Batard <pete@akeo.ie> wrote:
>
> With the upcoming release of Windows 11, Microsoft has introduced a new USB
> Device-Specific Method (_DSM) function to enforce 64-bit xHCI registers to
> be accessed through two sequential 32-bit requests. The new function (Query
> controller register access type - Function 6) is documented at:
> https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm-
>
> Support for this feature is required on the raspberry Pi 4 where there is
> a bug/limitation in the xHCI stack that prevents full range 64-bit access
> from working correctly. It should be noted that an equivalent for this _DSM
> is not required on Linux, as 64-bit xHCI register access is already broken
> down into 2x32-bit by the drivers there.
>
> With this _DSM, and unlike what is the case for Windows 10, Windows 11 can
> now be installed on the Raspberry Pi 4 without having to alter any of the
> installation files, as we were able to validate using the latest Windows 11
> Build 22000 Insider image.
>
Very nice!
> Signed-off-by: Pete Batard <pete@akeo.ie>
> Tested-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Pushed as 6e68849e5545..901d3c52ed23
> ---
> Platform/RaspberryPi/AcpiTables/Xhci.asl | 21 ++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl b/Platform/RaspberryPi/AcpiTables/Xhci.asl
> index 9b37277956d9..00b0cd29c69c 100644
> --- a/Platform/RaspberryPi/AcpiTables/Xhci.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl
> @@ -138,6 +138,27 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI4XHCI", 2)
> Debug = "xHCI enable"
> Store (0x6, CMND)
> }
> +
> + /*
> + * Microsoft's USB Device-Specific Methods. See:
> + * https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm-
> + */
> + Name (DSMU, ToUUID ("ce2ee385-00e6-48cb-9f05-2edb927c4899"))
> +
> + Method (_DSM, 4, Serialized) {
> + If (LEqual (Arg0, DSMU)) { // USB capabilities UUID
> + Switch (ToInteger (Arg2)) {
> + Case (0) { // Function 0: List of supported functions
> + Return (Buffer () { 0x41 }) // 0x41 - Functions 0 and 6 supported
> + }
> + Case (6) { // Function 6: RegisterAccessType
> + Return (Buffer () { 0x01 }) // 0x01 - Must use 32bit register access
> + }
> + Default { } // Unsupported
> + }
> + }
> + return (Buffer () { 0x00 }) // Return 0x00 for anything unsupported
> + }
> } // end XHC0
> } //end SCB0
> } //end scope sb
> --
> 2.30.2.windows.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access
2021-09-01 16:46 [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access Pete Batard
2021-09-01 17:30 ` Ard Biesheuvel
@ 2021-09-01 18:19 ` Samer El-Haj-Mahmoud
1 sibling, 0 replies; 3+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-09-01 18:19 UTC (permalink / raw)
To: Pete Batard, devel@edk2.groups.io
Cc: ardb+tianocore@kernel.org, leif@nuviainc.com,
Samer El-Haj-Mahmoud
Wonderful! Thank you Pete!!
> -----Original Message-----
> From: Pete Batard <pete@akeo.ie>
> Sent: Wednesday, September 1, 2021 12:46 PM
> To: devel@edk2.groups.io
> Cc: ardb+tianocore@kernel.org; leif@nuviainc.com; Samer El-Haj-Mahmoud
> <Samer.El-Haj-Mahmoud@arm.com>
> Subject: [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM
> ACPI method for 32-bit MMIO xHCI access
>
> With the upcoming release of Windows 11, Microsoft has introduced a new
> USB
> Device-Specific Method (_DSM) function to enforce 64-bit xHCI registers to
> be accessed through two sequential 32-bit requests. The new function
> (Query
> controller register access type - Function 6) is documented at:
> https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-
> device-specific-method---dsm-
>
> Support for this feature is required on the raspberry Pi 4 where there is
> a bug/limitation in the xHCI stack that prevents full range 64-bit access
> from working correctly. It should be noted that an equivalent for this _DSM
> is not required on Linux, as 64-bit xHCI register access is already broken
> down into 2x32-bit by the drivers there.
>
> With this _DSM, and unlike what is the case for Windows 10, Windows 11 can
> now be installed on the Raspberry Pi 4 without having to alter any of the
> installation files, as we were able to validate using the latest Windows 11
> Build 22000 Insider image.
>
> Signed-off-by: Pete Batard <pete@akeo.ie>
> Tested-by: Pete Batard <pete@akeo.ie>
> ---
> Platform/RaspberryPi/AcpiTables/Xhci.asl | 21 ++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl
> b/Platform/RaspberryPi/AcpiTables/Xhci.asl
> index 9b37277956d9..00b0cd29c69c 100644
> --- a/Platform/RaspberryPi/AcpiTables/Xhci.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl
> @@ -138,6 +138,27 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN",
> "RPI4XHCI", 2)
> Debug = "xHCI enable"
>
> Store (0x6, CMND)
>
> }
>
> +
>
> + /*
>
> + * Microsoft's USB Device-Specific Methods. See:
>
> + * https://docs.microsoft.com/en-us/windows-
> hardware/drivers/bringup/usb-device-specific-method---dsm-
>
> + */
>
> + Name (DSMU, ToUUID ("ce2ee385-00e6-48cb-9f05-2edb927c4899"))
>
> +
>
> + Method (_DSM, 4, Serialized) {
>
> + If (LEqual (Arg0, DSMU)) { // USB capabilities UUID
>
> + Switch (ToInteger (Arg2)) {
>
> + Case (0) { // Function 0: List of supported functions
>
> + Return (Buffer () { 0x41 }) // 0x41 - Functions 0 and 6 supported
>
> + }
>
> + Case (6) { // Function 6: RegisterAccessType
>
> + Return (Buffer () { 0x01 }) // 0x01 - Must use 32bit register
> access
>
> + }
>
> + Default { } // Unsupported
>
> + }
>
> + }
>
> + return (Buffer () { 0x00 }) // Return 0x00 for anything
> unsupported
>
> + }
>
> } // end XHC0
>
> } //end SCB0
>
> } //end scope sb
>
> --
> 2.30.2.windows.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-01 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-01 16:46 [edk2-platforms][PATCH 1/1] Platform/RaspberryPi/RPi4: Add _DSM ACPI method for 32-bit MMIO xHCI access Pete Batard
2021-09-01 17:30 ` Ard Biesheuvel
2021-09-01 18:19 ` Samer El-Haj-Mahmoud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox