From nobody Fri May 17 05:54:26 2024 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+105725+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+105725+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685969318; cv=none; d=zohomail.com; s=zohoarc; b=RB445duh4uYqD/GEGRzAcX9VWTSxVAyq/HlwpECBEIKOuIjMGyDZCI4KBytpu4A+vNHycctdkrrr5+CSHh7z/85ZnfA5lIsPTiuBOtqJI8X8bEwnfxawnSV7eZRyUaHeatDrlWoHea3uqLZW2z/brI6cZ+v4LGnC5s9eFV6+2z0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685969318; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+Iu3CBI07C+oi/2laXpGvi1atv3nwVFgOCWUq69R9g8=; b=KTauUg6PslKTCDbRK1S3MpArtv1hSC+TZHaMAqzzXf86HhWLqeevnFe4AHMDOJvX11CNXn6B09YQH/uFCVETAbgkI4AM78Z2gZz6YiMOD+qfHccZu9FCYYPnFcgB77QzkAhVNUQ8nRSYwiUT9GM5xFlCHX4YNJXNLBlAIuNUaNM= 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+105725+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685969318904837.2560111391236; Mon, 5 Jun 2023 05:48:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tUK4YY1788612xJfyn0vbic9; Mon, 05 Jun 2023 05:48:38 -0700 X-Received: from zg8tmtyylji0my4xnjqumte4.icoremail.net (zg8tmtyylji0my4xnjqumte4.icoremail.net [162.243.164.118]) by mx.groups.io with SMTP id smtpd.web11.6606.1685969316659470068 for ; Mon, 05 Jun 2023 05:48:37 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-6 (Coremail) with SMTP id AQAAfwAH0tei2n1k7cC2AQ--.44545S2; Mon, 05 Jun 2023 20:52:50 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwBXgyOI2X1kQagAAA--.994S4; Mon, 05 Jun 2023 20:48:13 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, devel@edk2.groups.io, chenbaozi@phytium.com.cn, marcin.juszkiewicz@linaro.org, peter.maydell@linaro.org, Yuquan Wang Subject: [edk2-devel] [PATCH v1 1/3] Platform/Qemu/SbsaQemu/SbsaQemu.dsc: define XHCI Pcd settings Date: Mon, 5 Jun 2023 20:47:24 +0800 Message-Id: <20230605124726.124268-2-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> References: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwBXgyOI2X1kQagAAA--.994S4 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icFhQAAsc X-Coremail-Antispam: 1Uk129KBjvJXoW7ZFW8AF4fWFWrGF15Jry8Grg_yoW8GFWrpr 1xZF93CrWkJryaqw47C3WrXa1YkF1aya18GrsFqw18ursxXF1jqr4jk3W0yry7ZFnxW34D AF1IvryjvF4ruaDanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: lVnLGL0iG9a7uKER03rjQ3XZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685969318; bh=fMdo6HrEtyDix6rmAfGDWdOpHZ4L9kBnrsny5z4lHtU=; h=Cc:Date:From:Reply-To:Subject:To; b=Q06gV3a3vU4/a/gR2O89n7W43qfk8RkHXTw07y1UGSslAPHQ258ptS7qOCWSNDNC12A 4fJRsXiAAA8gTQ4BimhcGzBA+9moDKx3p0iWAuAh5mRvd4NJeZETGNuEe4MBEqpn7GNCB Lt5WM/RWnpZKK0L+yjcP9wZlOatmEyBAbLM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685969320337100007 Content-Type: text/plain; charset="utf-8" Define the pcd settings for identifying the base address of XHCI and XHCI's mmio size, and remove relevant EHCI settings. Signed-off-by: Yuquan Wang --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index 79dd200c..7ffe8635 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -435,11 +435,11 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE =3D FALSE # Initial Device Tree Location gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000 =20 - # Non discoverable devices (AHCI,EHCI) + # Non discoverable devices (AHCI,XHCI) gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase|0x60100000 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x00010000 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase|0x60110000 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x00010000 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase|0x60110000 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize|0x00010000 =20 # PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x60000000 --=20 2.34.1 -=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 (#105725): https://edk2.groups.io/g/devel/message/105725 Mute This Topic: https://groups.io/mt/99339354/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- From nobody Fri May 17 05:54:26 2024 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+105724+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+105724+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685969316; cv=none; d=zohomail.com; s=zohoarc; b=ANJh3xTL6wNg0Kul1WCZagWoXVRaBi+WOqbVRxwiSDPPeUQhg8VGT7jHqy2Mjjb9TBY5Mml6s2xM1bVrYxlumvT3X0UuMKw4URXA7rN6x8fzwGfzDippGZ4hKlza36QUv0BbuA7Vk3xOi55gCgN9dC1Iyttjc9pN8VEn/bwKhjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685969316; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=RBhVM2b6BM1ruCB0H5TT2fhPUhgYakfeOUUQMZZh2Mk=; b=YtF6IcaM3WRYzRE+WQPmWIAA2TyLo6DwmBRzfLIRZIzXBDavtYXalLop8RfYhCvo5m2qjAgslaaFsYXr2kwLzc/SzH5CLMPsVEOjUqCiT5kPpnaw7NbB0Ma8Ca5IWJ2pVhxyNwZ6A+IjJxVAztEyA/Qla8zYOWxpSXN9aI1BgOE= 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+105724+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685969316506897.5885278110433; Mon, 5 Jun 2023 05:48:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 62s8YY1788612xu9g34WECg5; Mon, 05 Jun 2023 05:48:36 -0700 X-Received: from zg8tmtyylji0my4xnjqumte4.icoremail.net (zg8tmtyylji0my4xnjqumte4.icoremail.net [162.243.164.118]) by mx.groups.io with SMTP id smtpd.web10.6617.1685969313243431833 for ; Mon, 05 Jun 2023 05:48:34 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-6 (Coremail) with SMTP id AQAAfwCXXtSa2n1kocC2AQ--.51093S2; Mon, 05 Jun 2023 20:52:42 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwBXgyOI2X1kQagAAA--.994S5; Mon, 05 Jun 2023 20:48:14 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, devel@edk2.groups.io, chenbaozi@phytium.com.cn, marcin.juszkiewicz@linaro.org, peter.maydell@linaro.org, Yuquan Wang Subject: [edk2-devel] [PATCH v1 2/3] SbsaQemu: Drivers: Add initial support for XHCI Date: Mon, 5 Jun 2023 20:47:25 +0800 Message-Id: <20230605124726.124268-3-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> References: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwBXgyOI2X1kQagAAA--.994S5 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icFhAAAsd X-Coremail-Antispam: 1Uk129KBjvJXoWxXFW7AF4fGFy8Xw4UGFyDWrg_yoWrCw17pF 10vFZ3Cw1xGryayw43Ga4rXr4YkFyakrWDGrsIqF10kwsxXF1UXw4YqFy8ZF9rJFnxXw4D Ar10y34jyFs5urJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: tIVineT6eF6StAvNHPO2bsb6x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685969316; bh=bbL3Qe4hvtBtMunTqbrD/8susL+VDjdM8JBQgJzGHms=; h=Cc:Date:From:Reply-To:Subject:To; b=nmONHxBUSU7iqsC24+TvtU+8+eHjQwgdgx+1fO4rqfAtgbJ99K7Fu2s/pF2RtLaIUd+ e5UeHAPrq0Uc0U02Zy5Bvry6nhQ2vZZvMoUOtdLpAg2bEj4m2QV7Bl2LUqJ3mA/Pjvyqt qnUcfOFQSXSC6JwGP8fxf7ES6EYGy3k/Zrw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685969317480100003 Content-Type: text/plain; charset="utf-8" This registers the non-discoverable XHCI for sbsa-ref. Signed-off-by: Yuquan Wang --- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 40 ++++++++++++++----- .../SbsaQemuPlatformDxe.inf | 2 + Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 4 +- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlat= formDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatf= ormDxe.c index b7270a07..1a34773f 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .c @@ -24,18 +24,19 @@ InitializeSbsaQemuPlatformDxe ( ) { EFI_STATUS Status; - UINTN Size; - VOID* Base; + UINTN AhciSize, XhciSize; + VOID* AhciBase; + VOID* XhciBase; =20 DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNC= TION__)); =20 - Base =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformAhciBase); - ASSERT (Base !=3D NULL); - Size =3D (UINTN)PcdGet32 (PcdPlatformAhciSize); - ASSERT (Size !=3D 0); + AhciBase =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformAhciBase); + ASSERT (AhciBase !=3D NULL); + AhciSize =3D (UINTN)PcdGet32 (PcdPlatformAhciSize); + ASSERT (AhciSize !=3D 0); =20 DEBUG ((DEBUG_INFO, "%a: Got platform AHCI %llx %u\n", - __FUNCTION__, Base, Size)); + __FUNCTION__, AhciBase, AhciSize)); =20 Status =3D RegisterNonDiscoverableMmioDevice ( NonDiscoverableDeviceTypeAhci, @@ -43,13 +44,34 @@ InitializeSbsaQemuPlatformDxe ( NULL, NULL, 1, - Base, Size); + AhciBase, AhciSize); =20 if (EFI_ERROR(Status)) { DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install AHCI device = @%p (Staus =3D=3D %r)\n", - __FUNCTION__, Base, Status)); + __FUNCTION__, AhciBase, Status)); return Status; } =20 + XhciBase =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformXhciBase); + ASSERT (XhciBase !=3D NULL); + XhciSize =3D (UINTN)PcdGet32 (PcdPlatformXhciSize); + ASSERT (XhciSize !=3D 0); + + DEBUG ((DEBUG_INFO, "%a: Got platform XHCI %llx %u\n", + __FUNCTION__, XhciBase, XhciSize)); + + Status =3D RegisterNonDiscoverableMmioDevice ( + NonDiscoverableDeviceTypeXhci, + NonDiscoverableDeviceDmaTypeCoherent, + NULL, + NULL, + 1, + XhciBase, XhciSize); + + if (EFI_ERROR(Status)) { + DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install XHCI device = @%p (Staus =3D=3D %r)\n", + __FUNCTION__, XhciBase, Status)); + return Status; + } return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlat= formDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPla= tformDxe.inf index 21d2135f..41cdcf16 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .inf @@ -35,6 +35,8 @@ [Pcd] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize =20 [Depex] TRUE diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/Sbs= aQemu.dec index 94488529..028c2974 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -32,8 +32,8 @@ # Non discoverable devices Pcds gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase|0|UINT64|0x00= 000001 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x10000|UINT3= 2|0x00000002 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase|0|UINT64|0x00= 000003 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x10000|UINT3= 2|0x00000004 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase|0|UINT64|0x00= 000003 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize|0x10000|UINT3= 2|0x00000004 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000|UINT64|0x00000005 =20 # PCDs complementing PCIe layout pulled into ACPI tables --=20 2.34.1 -=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 (#105724): https://edk2.groups.io/g/devel/message/105724 Mute This Topic: https://groups.io/mt/99339353/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- From nobody Fri May 17 05:54:26 2024 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+105727+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+105727+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685969320; cv=none; d=zohomail.com; s=zohoarc; b=JNr9Fa3yG+cjSFsxWKqo0hB9+ASb8eOSh5PNl6nz3Mo/18bXf4NCbgwftY4u652SnzvEPeV5Obmf4/MYcz6UrFmi4Axf/MV52P0izfo8Swy2mKmouW33KWiEjP8aEWqyYBNJCLmC2aG/A/fbbKxgHdzdVXtPZ/lymJgPhFuDqqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685969320; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qwkK+/9dV4l1dpmaducKOD4W5tvPwRrSeJK/IUeP8Vg=; b=PHOwTjLi4o85hUisMrnBqVvo7XkUBho1mCT787XHyNoNR20DvvPSl8z0QcUZHpj57UdN4GjgMfIAz2tkPwIm4yGlPMEb8oulNI8Cccs3NU9WdkZ32/fnz2LE7JsfUwH5O13kffBIcxS2CRxa34SCBMrVV8sCordoqNYRDZF30bE= 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+105727+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685969320782553.5539875408133; Mon, 5 Jun 2023 05:48:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id B5HyYY1788612xH1lKi0hOJL; Mon, 05 Jun 2023 05:48:40 -0700 X-Received: from zg8tmtyylji0my4xnjqumte4.icoremail.net (zg8tmtyylji0my4xnjqumte4.icoremail.net [162.243.164.118]) by mx.groups.io with SMTP id smtpd.web10.6619.1685969319126596545 for ; Mon, 05 Jun 2023 05:48:39 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-6 (Coremail) with SMTP id AQAAfwAHztOl2n1kBcG2AQ--.57892S2; Mon, 05 Jun 2023 20:52:53 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwBXgyOI2X1kQagAAA--.994S6; Mon, 05 Jun 2023 20:48:16 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, devel@edk2.groups.io, chenbaozi@phytium.com.cn, marcin.juszkiewicz@linaro.org, peter.maydell@linaro.org, Yuquan Wang Subject: [edk2-devel] [PATCH v1 3/3] SbsaQemu: AcpiTables: Add XHCI info into DSDT Date: Mon, 5 Jun 2023 20:47:26 +0800 Message-Id: <20230605124726.124268-4-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> References: <20230605124726.124268-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwBXgyOI2X1kQagAAA--.994S6 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icFiAAAsR X-Coremail-Antispam: 1Uk129KBjvJXoWxXFW5WFyUCFyfXFy5Aw47urg_yoWrCrW7pr 17ZFWfCr4kCrn8tr1Ygw10vrn3AFy0yF4qkwnFqr1UJws7KF4UXr45Ga48KFyUJanxZF1j 9Fn2vFWqvF1kWw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: nVdlyn1uH3g1crFFCATtmtaAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685969320; bh=N7IsZ05bRUXwSz9YQ8nxqkLwF83VBj0wzpUfkI61Apg=; h=Cc:Date:From:Reply-To:Subject:To; b=KwNrILRWK4GOcZWzduYVTlKTEnHDlQMSzsMQQpa0/lLEO9/6Psm41nYSzqokyvfJ+j6 leOFrEIoxmMMZVAVzjuPlzbLOn5hGlmZSaOGkrCdzpdWvzXLbYecld60x4BbFrBFo95P1 EzqsPZF2f9B2/XMVRg03eSZ8r8hk0Dyic4w= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685969321500100013 Content-Type: text/plain; charset="utf-8" As sbsa-ref board uses xhci to replace ehci, the DSDT is updated to match the platform xhci controller. This also removes previous ehci structure. Signed-off-by: Yuquan Wang --- .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 4 +- Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl | 125 ++---------------- 2 files changed, 15 insertions(+), 114 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu= /SbsaQemu/AcpiTables/AcpiTables.inf index 176d8fab..f9caca96 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -72,5 +72,5 @@ =20 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl b/Silicon/Qemu/SbsaQ= emu/AcpiTables/Dsdt.asl index 33579165..b4ef2c1f 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl @@ -68,120 +68,21 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", } } =20 - // USB EHCI Host Controller - Device (USB0) { - Name (_HID, "LNRO0D20") - Name (_CID, "PNP0D20") + // USB XHCI Host Controller + Device (XHCI) { + Name (_HID, "PNP0D10") // _HID: Hardware ID + Name (_UID, 0x00) // _UID: Unique ID + Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, + FixedPcdGet32 (PcdPlatformXhciBase), + FixedPcdGet32 (PcdPlatformXhciSize)) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 4= 3 } + }) Method (_STA) { - Return (0xF) - } - Method (_CRS, 0x0, Serialized) { - Name (RBUF, ResourceTemplate() { - Memory32Fixed (ReadWrite, - FixedPcdGet32 (PcdPlatformEhciBase), - FixedPcdGet32 (PcdPlatformEhciSize)) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive)= { 43 } - }) - Return (RBUF) + Return (0xF) } - - // 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 - 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_PRT3 - - Device (PRT4) { - Name (_ADR, 0x00000004) - 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_PRT4 - } // USB0_RHUB_HUB1 - } // USB0_RHUB - } // USB0 + } =20 Device (PCI0) { --=20 2.34.1 -=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 (#105727): https://edk2.groups.io/g/devel/message/105727 Mute This Topic: https://groups.io/mt/99339356/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-