From nobody Fri Dec 19 18:44:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109589+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109589+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697200139; cv=none; d=zohomail.com; s=zohoarc; b=gaYQKLwZwtJ19cDJpYx5vcMRvW89US+BZpTg28ewKCgwefXIbcHJ6B2tQeV/9GgP48V2GsrjXbj06UKI4ZEv49hV9kbYvEK7ng1L0HEO52L765wp4BIIu0zEcbPXhHA6FGMyiXhfbNre+CybJx4RzFVDhUo+l0lvU1HQzBiwUoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697200139; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=mboYWsr7fSP9AS9xWXe5l62Jcv/9xJoWVsbvu+iscf8=; b=fVNjLA+NmRZUtYhGdJiEahs6IDO4nlNxivt1rVpVu/prrB99Rj+L8KDuOSS8A0tnxacX/H2XMjZiJURsLvTXjEF4C+esMwgPO4S6Bt+LGUvZpa6j+u6SmSnBFRo6Ve+2/xfkVm/7eAy5Wb7uPcqrFJAfGSJwIN6ule/Taud5s98= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109589+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1697200139514148.67749568886416; Fri, 13 Oct 2023 05:28:59 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=UYhuKYesdbcNpGpJwWzSBFa4s7AGP63RRuVWzIi0Nbc=; 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=mVgRVgqcvI3CcXqYSiAIoE+3tkYmFEu6Z2AoZ2rtP1itiJViwOHAplI9usNlbWSA2JLYPtM/ VehZo3QTDUfkV2FqaHJlRjAB3uUJqoOXvlLVk8mia3L4Fs7Q5BaFnyvXvfsIv5AMCuKptG24N4W n0UA0FcLzFnIvfbwKDOKH3Do= X-Received: by 127.0.0.2 with SMTP id iaRrYY1788612xuuKuN21T53; 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: 4HJt7by9niSoM238iFIbtOJ2x1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1697200141074100013 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-