From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6CCC574003C for ; Fri, 13 Oct 2023 12:29:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LtMwwoeT+Mpxj9D6Xx7vsVAAm/KHTvzemFGkHgk19i0=; c=relaxed/simple; d=groups.io; h=From:Date:Subject:MIME-Version:Message-Id:References:In-Reply-To:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697200139; v=1; b=gs2St7Q5ZADdnUukquf4l1iVl+iaHhfoX4Mj0f/PvNxSGzSy3yHKlc6bqLqiBXR6c/0xnzQ9 RxPG6wJiGRiaF1UqE9m43yDwt3UQ4hHsK/lmuyhU4y+j6XhO1RsInNen7844VTiZPJ2eW8FwTe3 5NKtwQLDeP/ZIBxVES6CWoIM= X-Received: by 127.0.0.2 with SMTP id 0034YY7687511xN06BW6kiN3; Fri, 13 Oct 2023 05:28:59 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web10.37091.1697200138072839382 for ; Fri, 13 Oct 2023 05:28:58 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id D5BA526083A; Fri, 13 Oct 2023 14:28:55 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id xPjF0KmHqiPh; Fri, 13 Oct 2023 14:28:54 +0200 (CEST) X-Received: from [172.17.0.1] (83.11.27.172.ipv4.supernova.orange.pl [83.11.27.172]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 6F4F9260B30; Fri, 13 Oct 2023 14:28:52 +0200 (CEST) From: "Marcin Juszkiewicz" Date: Fri, 13 Oct 2023 14:28:51 +0200 Subject: [edk2-devel] [PATCH edk2-platforms WIP 3/5] SbsaQemu: move XHCI to SSDT MIME-Version: 1.0 Message-Id: <20231013-ehci-xhci-fix-v1-3-f56f28e70e36@linaro.org> References: <20231013-ehci-xhci-fix-v1-0-f56f28e70e36@linaro.org> In-Reply-To: <20231013-ehci-xhci-fix-v1-0-f56f28e70e36@linaro.org> To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ukILhVqrSZdpR3EqgNf0bmJEx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=gs2St7Q5; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io I want to add EHCI/XHCI switching so platforms older than 0.3 would not complain about missing XHCI. --- Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl | 116 ----------------- Silicon/Qemu/SbsaQemu/AcpiTables/Xhci.asl | 132 ++++++++++++++++++++ 3 files changed, 133 insertions(+), 116 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu= /SbsaQemu/AcpiTables/AcpiTables.inf index 42cc203eeb7b..cd89ab346aa7 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -21,6 +21,7 @@ [Sources] Fadt.aslc Mcfg.aslc Spcr.aslc + Xhci.asl =20 [Packages] ArmPlatformPkg/ArmPlatformPkg.dec diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl b/Silicon/Qemu/SbsaQ= emu/AcpiTables/Dsdt.asl index 4ff267e00802..714636b518a5 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl @@ -68,122 +68,6 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", } } =20 - // USB XHCI Host Controller - Device (USB0) { - Name (_HID, "PNP0D10") // _HID: Hardware ID - Name (_UID, 0x00) // _UID: Unique ID - Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute - Method (_STA) { - Return (0xF) - } - Method (_CRS, 0x0, Serialized) { - Name (RBUF, ResourceTemplate() { - Memory32Fixed (ReadWrite, - FixedPcdGet32 (PcdPlatformUsbBase), - FixedPcdGet32 (PcdPlatformUsbSize)) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive)= { 43 } - }) - Return (RBUF) - } - - // 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) { - Name (_ADR, 0x00000001) - Name (_UPC, Package() { - 0x00, // Port is NOT connectable - 0xFF, // Don't care - 0x00000000, // Reserved 0 must be zero - 0x00000000 // Reserved 1 must be zero - }) - Method (_STA) { - Return (0xF) - } - - Device (PRT1) { - Name (_ADR, 0x00000001) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer(0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00= , - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT1 - Device (PRT2) { - Name (_ADR, 0x00000002) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer(0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00= , - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT2 - - Device (PRT3) { - Name (_ADR, 0x00000003) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x09, // Type C connector - USB2 and SS wit= h Switch - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer (0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00= , - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT3 - - Device (PRT4) { - Name (_ADR, 0x00000004) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x09, // Type C connector - USB2 and SS wit= h Switch - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer (0x10){ - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00= , - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT4 - } // USB0_RHUB_HUB1 - } // USB0_RHUB - } // USB0 - Device (PCI0) { Name (_HID, EISAID ("PNP0A08")) // PCI Express Root Bridge diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Xhci.asl b/Silicon/Qemu/SbsaQ= emu/AcpiTables/Xhci.asl new file mode 100644 index 000000000000..bfdcb09b28f0 --- /dev/null +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Xhci.asl @@ -0,0 +1,132 @@ +/** @file +* [DSDT] XHCI Usb Host controller +* +* Copyright (c) 2023, Linaro Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include + +DefinitionBlock (__FILE__, "SSDT", 2, "LINARO", "SBSAXHCI", 2) +{ + Scope (\_SB_) + { + // USB XHCI Host Controller + Device (USB3) { + Name (_HID, "PNP0D10") // _HID: Hardware ID + Name (_UID, 0x00) // _UID: Unique ID + Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute + Method (_STA) { + Return (0xF) + } + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate() { + Memory32Fixed (ReadWrite, + FixedPcdGet32 (PcdPlatformUsbBase), + FixedPcdGet32 (PcdPlatformUsbSize)) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 43 } + }) + Return (RBUF) + } + + // 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) { + Name (_ADR, 0x00000001) + Name (_UPC, Package() { + 0x00, // Port is NOT connectable + 0xFF, // Don't care + 0x00000000, // Reserved 0 must be zero + 0x00000000 // Reserved 1 must be zero + }) + Method (_STA) { + Return (0xF) + } + + Device (PRT1) { + Name (_ADR, 0x00000001) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer(0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT1 + Device (PRT2) { + Name (_ADR, 0x00000002) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x00, // Port connector is A + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer(0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT2 + + Device (PRT3) { + Name (_ADR, 0x00000003) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x09, // Type C connector - USB2 and SS with Switch + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer (0x10) { + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT3 + + Device (PRT4) { + Name (_ADR, 0x00000004) + Name (_UPC, Package() { + 0xFF, // Port is connectable + 0x09, // Type C connector - USB2 and SS with Switch + 0x00000000, + 0x00000000 + }) + Name (_PLD, Package() { + Buffer (0x10){ + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }) + Method (_STA) { + Return (0xF) + } + } // USB0_RHUB_HUB1_PRT4 + } // USB0_RHUB_HUB1 + } // USB0_RHUB + } // USB0 + } //\SB +} --=20 2.41.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109589): https://edk2.groups.io/g/devel/message/109589 Mute This Topic: https://groups.io/mt/101938742/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-